We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1a0055 commit b74e8b9Copy full SHA for b74e8b9
pycodestyle.py
@@ -506,6 +506,7 @@ def missing_whitespace(logical_line):
506
507
Okay: [a, b]
508
Okay: (3,)
509
+ Okay: a[3,] = 1
510
Okay: a[1:4]
511
Okay: a[:4]
512
Okay: a[1:]
@@ -523,7 +524,7 @@ def missing_whitespace(logical_line):
523
524
if char == ':' and before.count('[') > before.count(']') and \
525
before.rfind('{') < before.rfind('['):
526
continue # Slice syntax, no space required
- if char == ',' and next_char == ')':
527
+ if char == ',' and next_char in ')]':
528
continue # Allow tuple with only one element: (3,)
529
if char == ':' and next_char == '=' and sys.version_info >= (3, 8):
530
continue # Allow assignment expression
0 commit comments