N815: Ignore TypedDict class variable casing #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prosed fix for #178
Add specific exemption from N815 for all subclasses of
TypedDict
because class variable naming conventions should not apply to dictionary keys.I've tried to reuse code from the rule for
Exceptions
(N818) as per the suggestion on #178.This is my first time working with the
ast
module or with anyflake8
plugin so please bear that in mind when reviewing this PR. Any advice on whether it's reasonable to tag everyClassDef
with the names of its superclasses, and potential performance concerns around that, would be very welcome. On balance, I thought it may be preferable to do this rather than determining the superclasses again for every variable in a class.Thanks :)