Skip to content

Commit

Permalink
Merge pull request #618 from sigmavirus24/bug/617
Browse files Browse the repository at this point in the history
Fix regression in E302 detection
  • Loading branch information
sigmavirus24 authored Jan 30, 2017
2 parents 9f725fb + b10ea40 commit 6837433
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pycodestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
LAMBDA_REGEX = re.compile(r'\blambda\b')
HUNK_REGEX = re.compile(r'^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@.*$')
STARTSWITH_DEF_REGEX = re.compile(r'^(async\s+def|def)')
STARTSWITH_TOP_LEVEL_REGEX = re.compile(r'^(async\s+def|def|class|@)')
STARTSWITH_TOP_LEVEL_REGEX = re.compile(r'^(async\s+def\s+|def\s+|class\s+|@)')
STARTSWITH_INDENT_STATEMENT_REGEX = re.compile(
r'^\s*({0})'.format('|'.join(s.replace(' ', '\s+') for s in (
'def', 'async def',
Expand Down
3 changes: 3 additions & 0 deletions testsuite/E30not.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,6 @@ class Bar(object):
classification_errors = None
#: Okay
defined_properly = True
#: Okay
defaults = {}
defaults.update({})

0 comments on commit 6837433

Please sign in to comment.