summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-05-03 02:15:06 +0200
committerMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-05-03 02:15:06 +0200
commit3527106c822f52b01ce516e6ccf4cb30b69e3a87 (patch)
tree98dabf41832f52887e62b12f62d088a35fba0909
parent76abb5ddc61b6532cca1f448d7e95793b4296eac (diff)
downloadpep8-3527106c822f52b01ce516e6ccf4cb30b69e3a87.tar.gz
Small improvement
-rwxr-xr-xpycodestyle.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/pycodestyle.py b/pycodestyle.py
index 47ab5ce..7f00739 100755
--- a/pycodestyle.py
+++ b/pycodestyle.py
@@ -497,10 +497,9 @@ def whitespace_around_keywords(logical_line):
if sys.version_info >= (3, 10):
match = MATCH_CASE_REGEX.match(logical_line)
if match:
- whitespace = match.groups()[0]
- if whitespace == ' ':
+ if match[1] == ' ':
return
- if whitespace == '':
+ if match[1] == '':
yield match.start(1), "E275 missing whitespace after keyword"
else:
yield match.start(1), "E271 multiple spaces after keyword"