-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INP001 outputs the code of the file which is part of an implicit namespace package #12291
Comments
Hi! Can you share a brief example? |
Sure @zanieb , I create:
with the contents: STRING = "This code is not relevant"
STRING1 = "This code is not relevant"
STRING2 = "This code is not relevant"
STRING3 = "This code is not relevant"
I infer from the output that there is a problem to be fixed on line 1 of the file. |
I think file level diagnostics by default uses an empty range at the start of the file which is what you're seeing here. |
Lets omit the code frame for empty files? |
Yeah, that seems reasonable. I think we would want to check for an empty range at byte 0 ( |
## Summary Closes #12291. ## Test Plan ```shell ❯ cargo run check ../uv/foo --select INP /Users/crmarsh/workspace/uv/foo/bar/baz.py:1:1: INP001 File `/Users/crmarsh/workspace/uv/foo/bar/baz.py` is part of an implicit namespace package. Add an `__init__.py`. Found 1 error. ```
ruff 0.4.10Edit: I pasted wrong!ruff 0.5.1
This makes me think that the code has an error in it, that I am looking for, but that is not the case.
The text was updated successfully, but these errors were encountered: