Skip to content

Commit

Permalink
Enforce lowercase attribute names
Browse files Browse the repository at this point in the history
  • Loading branch information
julienr committed Apr 12, 2019
1 parent d5f5fb2 commit 891c432
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pep8ext_naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ def _extract_names(assignment_target):
target_type = type(assignment_target)
if target_type is ast.Name:
yield assignment_target.id
elif target_type is ast.Attribute:
yield assignment_target.attr
elif target_type in (ast.Tuple, ast.List):
for element in assignment_target.elts:
element_type = type(element)
Expand Down
4 changes: 4 additions & 0 deletions testsuite/N806.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,7 @@ def n():
#: N806:2:26
def e():
return tuple(BaD for BaD in range(2))
#: N806
class A:
def test():
self.Bad = 1

0 comments on commit 891c432

Please sign in to comment.