We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pycln should perform scope analythis and remove unused imports accordingly.
This would be consistent with flake8, pylance and PyCharms behaviour in identifying unused imports.
autoflake and unimport are able to remove them as well
cat test.py
import sys def func(): import sys def inner(): import sys sys.exit(0)
$ pycln test.py Looks good! ✨ 🍰 ✨ 1 file left unchanged.
$ autoflake test.py --- original/test.py +++ fixed/test.py @@ -1,8 +1,7 @@ -import sys def func(): - import sys + pass def inner(): import sys
$ unimport -d test.py --- test.py +++ @@ -1,8 +1,6 @@ -import sys def func(): - import sys def inner(): import sys
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Thesis
pycln should perform scope analythis and remove unused imports accordingly.
Reasoning
This would be consistent with flake8, pylance and PyCharms behaviour in identifying unused imports.
autoflake and unimport are able to remove them as well
cat test.py
pycln
autoflake
unimport
The text was updated successfully, but these errors were encountered: