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
False-positive error for Final
if it's aliased
#316
Comments
Similarly, |
Sure, but I'm gonna say I definitely don't want us to try and fix that one. It's ~reasonable to argue that we should track whether imports are aliased. But constructing a "poor man's symbol table" for the entire module would require whole new level of complexity 😃 it's important to remember that we're just a dumb linter, we're not a type checker 😁 |
Right, you don't have easy access to that kind of information 😅 |
) Fixes #316, among other things. Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Implement PYI011 and PYI014 with the latest changes: PyCQA/flake8-pyi#326 PyCQA/flake8-pyi#316 rel: astral-sh#848 rel: https://github.com/PyCQA/flake8-pyi/blob/4212bec43dbc4020a59b90e2957c9488575e57ba/pyi.py#L718
Implement PYI011 and PYI014 with the latest changes: PyCQA/flake8-pyi#326 PyCQA/flake8-pyi#316 rel: #848 rel: https://github.com/PyCQA/flake8-pyi/blob/4212bec43dbc4020a59b90e2957c9488575e57ba/pyi.py#L718
flake8-pyi currently emits a false-positive error for this code, which should be fine:
This might be tricky to fix, since we don't currently track whether imports are aliased at all. Came up in python/typeshed#9470
The text was updated successfully, but these errors were encountered: