astral-sh / astral-sh/ruff-vscode

ruff runs on standard library and typeshed files

Open
#232 19 comments 10 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.7k
Forks
80
Avg merge
8h 22m
Merged PRs (30d)
22

Description

it seems like ruff tries to avoid standard library files:
```
2023-06-19 10:11:58.875 [info] [Warn - 10:11:58 AM] Skipping standard library file: c:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-zbC6VfKB-py3.11\Lib\site-packages\playwright\sync_api\_generated.py
```

but it only seems to work on third party packages. it still runs on standard library and typeshed files:
```
2023-06-19 10:12:14.871 [info] Running Ruff with: c:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-zbC6VfKB-py3.11\Scripts\ruff.exe ['--force-exclude', '--no-cache', '--no-fix', '--quiet', '--format', 'json', '-', '--stdin-filename', 'c:\\Users\\user\\AppData\\Local\\Programs\\Python\\Lib\\typing.py']
```
```
2023-06-19 10:13:47.096 [info] Running Ruff with: c:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-zbC6VfKB-py3.11\Scripts\ruff.exe ['--force-exclude', '--no-cache', '--no-fix', '--quiet', '--format', 'json', '-', '--stdin-filename', 'c:\\Users\\user\\.vscode\\extensions\\ms-python.vscode-pylance-2023.6.20\\dist\\typeshed-fallback\\stdlib\\typing.pyi']
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Ruff invocation with --stdin-filename for Python's typing.py and the Pylance typeshed typing.pyi, then compare it with the reported site-packages path. Trace how the VS Code extension handles these paths and define done as excluding standard-library and typeshed files without regressing third-party package handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.