Skip to content

Commit b10ea40

Browse files
committed
Allow for multiple spaces in top level regex
1 parent a574081 commit b10ea40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pycodestyle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
LAMBDA_REGEX = re.compile(r'\blambda\b')
123123
HUNK_REGEX = re.compile(r'^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@.*$')
124124
STARTSWITH_DEF_REGEX = re.compile(r'^(async\s+def|def)')
125-
STARTSWITH_TOP_LEVEL_REGEX = re.compile(r'^(async\s+def |def |class |@)')
125+
STARTSWITH_TOP_LEVEL_REGEX = re.compile(r'^(async\s+def\s+|def\s+|class\s+|@)')
126126
STARTSWITH_INDENT_STATEMENT_REGEX = re.compile(
127127
r'^\s*({0})'.format('|'.join(s.replace(' ', '\s+') for s in (
128128
'def', 'async def',

0 commit comments

Comments
 (0)