diff options
Diffstat (limited to 'pycodestyle.py')
-rwxr-xr-x | pycodestyle.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 542272c..2119d06 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -506,6 +506,7 @@ def missing_whitespace(logical_line): Okay: [a, b] Okay: (3,) + Okay: a[3,] = 1 Okay: a[1:4] Okay: a[:4] Okay: a[1:] @@ -523,7 +524,7 @@ def missing_whitespace(logical_line): if char == ':' and before.count('[') > before.count(']') and \ before.rfind('{') < before.rfind('['): continue # Slice syntax, no space required - if char == ',' and next_char == ')': + if char == ',' and next_char in ')]': continue # Allow tuple with only one element: (3,) if char == ':' and next_char == '=' and sys.version_info >= (3, 8): continue # Allow assignment expression |