Add N810 specifically for package or module imports#203
Add N810 specifically for package or module imports#203ericbn wants to merge 3 commits intoPyCQA:mainfrom
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.
jparise
left a comment
There was a problem hiding this comment.
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 <jon@indelible.org>
|
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.