Skip to content
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

Move it under typing.TYPE_CHECKING if an import is used only for typing #305

Open
hakancelikdev opened this issue Nov 22, 2023 · 0 comments
Labels
changelog Changes should be written to the changelog file. documentation Improvements or additions to documentation enhancement New feature or request test

Comments

@hakancelikdev
Copy link
Owner

For example:

source.py

import x

variable: x = value

refactor.py

import typing

if typing.TYPE_CHECKING:
    import x

variable: x = value
@hakancelikdev hakancelikdev added documentation Improvements or additions to documentation enhancement New feature or request changelog Changes should be written to the changelog file. test labels Nov 22, 2023
@hakancelikdev hakancelikdev moved this to 📋 Backlog in unimport's backlog Nov 22, 2023
@hakancelikdev hakancelikdev changed the title If an import is used only for typing, move it under typing.TYPE_CHECKING. Move it under typing.TYPE_CHECKING if an import is used only for typing Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Changes should be written to the changelog file. documentation Improvements or additions to documentation enhancement New feature or request test
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant