Skip to content

Commit 3527106

Browse files
committed
Small improvement
1 parent 76abb5d commit 3527106

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pycodestyle.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,9 @@ def whitespace_around_keywords(logical_line):
497497
if sys.version_info >= (3, 10):
498498
match = MATCH_CASE_REGEX.match(logical_line)
499499
if match:
500-
whitespace = match.groups()[0]
501-
if whitespace == ' ':
500+
if match[1] == ' ':
502501
return
503-
if whitespace == '':
502+
if match[1] == '':
504503
yield match.start(1), "E275 missing whitespace after keyword"
505504
else:
506505
yield match.start(1), "E271 multiple spaces after keyword"

0 commit comments

Comments
 (0)