-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use real file path when available in
ruff server
(#11800)
## Summary As-is, we're using the URL path for all files, leading us to use paths like: ``` /c%3A/Users/crmar/workspace/fastapi/tests/main.py ``` This doesn't match against per-file ignores and other patterns in Ruff configuration. This PR modifies the LSP to use the real file path if available, and the virtual file path if not. Closes #11751. ## Test Plan Ran the LSP on Windows. In the FastAPI repo, added: ```toml [tool.ruff.lint.per-file-ignores] "tests/**/*.py" = ["F401"] ``` And verified that an unused import was ignored in `tests` after this change, but not before.
- Loading branch information
1 parent
32ca704
commit ee1621b
Showing
3 changed files
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters