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
I'd like to see ruff convert imports from private modules to imports from the parent package if the member is declared in __all__.
__all__
Maybe an example makes it clearer:
# ./client.py from .myp._private import Member from .myp._private import OtherMember assert Member # ./myp/__init__.py __all__ = ["Member"] from ._private import Member # ./myp/_private.py class Member: ... class OtherMember: ...
I consider modules starting with an underscore private. Based on the rule, ruff would fix this snippet to:
# ./client.py from .myp import Member from .myp._private import OtherMember assert Member # ./myp/__init__.py __all__ = ["Member"] from ._private import Member # ./myp/_private.py class Member: ... class OtherMember: ...
The text was updated successfully, but these errors were encountered:
Thanks for writing this up! I think it's roughly equivalent to #1107.
Sorry, something went wrong.
No branches or pull requests
I'd like to see ruff convert imports from private modules to imports from the parent package if the member is declared in
__all__
.Maybe an example makes it clearer:
I consider modules starting with an underscore private. Based on the rule, ruff would fix this snippet to:
The text was updated successfully, but these errors were encountered: