question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove unnecessary `__future__` imports

See original GitHub issue

Could pyupgrade remove __future__ imports that are no longer necessary? For example, absolute_import when running in Python 3 mode.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
asottilecommented, Sep 22, 2019

I had a change of heart, #202 implements this

0reactions
asottilecommented, Jan 20, 2019

# noreorder stops processing from that point onwards, --noreorder would just be a noop on the whole file.

as far as I’m concerned there’s already a wrapper around both: pre-commit makes it trivial to compose linters / formatters

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixer to remove __future__/future imports from futurized code
This would: Remove unnecessary __future__ imports ( print_function for example); Remove from future import standard_library and standard_library ...
Read more >
python - How can I remove/unimport symbols from __future ...
With normal modules you can remove or unimport the module by deleting whatever you imported from the namespace, and deleting the entry for ......
Read more >
Imports — Python-Future documentation
Explicit forms of the imports are often preferred and are necessary for using certain automated code-analysis tools. The complete set of imports of...
Read more >
flake8-future-import 0.4.7 - PyPI
A script to check for the imported __future__ modules to make it easier to have a consistent code base. By default it requires...
Read more >
Remove Unused Imports & Unused Variables from Python Code
By default, autoflake only removes unused imports for modules that are part of the standard library. (Other modules may have side effects that ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found