-
Notifications
You must be signed in to change notification settings - Fork 224
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
Add N810 specifically for package or module imports #203
base: main
Are you sure you want to change the base?
Add N810 specifically for package or module imports #203
Conversation
EDIT: Updated the rule code to N810, as it brings it closer to the other related rules. |
as it brings the number closer to the other related rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing that I don't like about this is the way that (some? most?) existing N811/N812 errors will become a new N810 error. That'll be a tough backwards-incompatible upgrade for users who have specifically opted in/out of those error codes, or who have specifically suppressed them using # noqa
comments.
Co-authored-by: Jon Parise <[email protected]>
Users will only get the N810 error if they're importing a package or module with a non-lowercase alias name with the This also fixes an error when trying to correctly alias a non-lowercase package or module name with a lowercase alias name following PEP 8. I've encountered SalesforcePy in my daily work and their documentation recommends |
These are differences in behavior based on existing and new test cases:
Hope it makes sense based on the discussion in #201.