-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
PLC0414 conflicts with re-exporting imports in py files #5698
Comments
Thanks for the clear issue!
What do you see as the ideal behavior for Ruff here? |
Thank you, ignoring this rule (for this one file/or all) is probably the best option. As far as I remember, flake8's F401 (haven't used it since switching to ruff :) ) also treats explicit re-exports as used imports. |
Yes F401 will be raised on Anything else you can see Ruff doing better here or should we close this? |
Can be closed.
(Consider removing this rule.) I will ignore this rule. |
Yeah PLC0414 is a strange rule because explicit re-export is a respected mechanism to indicate publicity by many tools (Ruff, but also Pyright). |
Pandas uses similar code in
pandas/_typing.py
TypeGuard
is not used inside this file (pyright detects this). A fix for pyright is to use the redundantas TypeGuard
import but PLC0414 conflicts with that. Alternatives are: ignore the pyright error or create__all__
(but that would need to contain a lot of symbols).xref #3734 pandas-dev/pandas#54085
The text was updated successfully, but these errors were encountered: