-
-
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
Don't consider __future__
imports and __all__
unused
#10019
Comments
I can't reproduce with the latest version. Could you install pylint 3.3.1 and confirm the issue please ? |
Yes, I'm on the latest version:
|
Specifically, I'm on Arch and used the following commands: $ python3 -m venv env
$ source env/bin/activate
$ pip install --upgrade pylint
$ pylint foo.py --allow-global-unused-variables n |
Thank you, it only happens with |
I encountered another false positive I believe. Re-exports from
from .test import test as test
from __future__ import annotations
__all__ = [ "test" ]
def test():
pass Command: pylint --allow-global-unused-variables n --allow-reexport-from-package y . Output (docstring warnings omitted):
|
Bug description
Command used
pylint foo.py --allow-global-unused-variables n
Pylint output
Expected behavior
Imports from
__future__
and the__all__
variable are implicitly used by the interpreter and should as such not be considered unused, even with--allow-global-unused-variables n
.Pylint version
All versions
The text was updated successfully, but these errors were encountered: