-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
Redundant local name for modified imports #1281
Comments
More generally, perhaps isort should remove useless aliases whether isort generated them or not: input: from datetime import datetime as datetime
print(datetime.now()) current output: unchanged expected output: from datetime import datetime
print(datetime.now()) |
I agree. But for completeness, I've seen documented conventions where those "useless" aliases are actually used to mark an import being part of an API. So e.g. for a module that doesn't use |
This is fixed in develop and will be released in the 5.1.0 minor release slated for release by end of month at the latest. As part of this a new Thanks! ~Timothy |
This has now been deployed to PyPI in the 5.1.0 release, thanks again! ~Timothy |
isort 5.0.4 changes this
...to this:
I think
as parse
is redundant and should not be emitted, but justFWIW pylint will issue
useless-import-alias
for the duplication.The text was updated successfully, but these errors were encountered: