Open
Description
Trailing commas in function calls, e.g. print(1,2,)
that do not end with a white space are not flagged by pycodestyle.
From reading the corresponding PEP8 I would expect that pycodestyle would flag this.
Here's a small example:
def f(a, b):
return a+b
class A:
def __init__(self, a):
self.a = a
if __name__ == "__main__":
A(f(1, 2,),)
print(f(1, 2,))
print(1, 2,)
Although this is valid python code I'd expect pycodestyle to flag all of the three last lines, but it doesn't.
Is this behaviour expected?
Environment:
- Python 3.8.5
- conda 4.9.2
- pycodestyle 2.6.0
Metadata
Assignees
Labels
No labels