diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-10-13 14:44:16 +0200 |
---|---|---|
committer | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-10-13 15:02:19 +0200 |
commit | 52ac6c6f97e778b4716ea28959940b97148e7ae0 (patch) | |
tree | 36f997cccea0af7a9c1442e5a204013aa1549cef /pycodestyle.py | |
parent | c2ec41377bd6b04653f8dd372b12046e40d96c38 (diff) | |
download | pep8-52ac6c6f97e778b4716ea28959940b97148e7ae0.tar.gz |
Emit E221-E224 for walrus op
Diffstat (limited to 'pycodestyle.py')
-rwxr-xr-x | pycodestyle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 16167df..e4954dc 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -152,7 +152,7 @@ COMPARE_NEGATIVE_REGEX = re.compile(r'\b(?<!is\s)(not)\s+[^][)(}{ ]+\s+' COMPARE_TYPE_REGEX = re.compile(r'(?:[=!]=|is(?:\s+not)?)\s+type(?:s.\w+Type' r'|\s*\(\s*([^)]*[^ )])\s*\))') KEYWORD_REGEX = re.compile(r'(\s*)\b(?:%s)\b(\s*)' % r'|'.join(KEYWORDS)) -OPERATOR_REGEX = re.compile(r'(?:[^,\s])(\s*)(?:[-+*/|!<=>%&^]+)(\s*)') +OPERATOR_REGEX = re.compile(r'(?:[^,\s])(\s*)(?:(?:[-+*/|!<=>%&^]+|:=))(\s*)') 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)\b') |