Closed r-downing closed 7 months ago
Something else to note here - a dangling comma after a single thing (e.g. a function call) will turn it into a tuple, which would get flagged as a useless statement:
print("abc") # this is fine
print("abc"), # the comma essentially makes this a tuple (None,) so this would be flagged as a useless expression.
^ wondering if this might be confusing and should be labelled a little differently? Or even as separate error? E.g. useless tuple expression - suggest removing the comma
I was looking for something to detect useless tuple statements, noticed this had a useless-statement check but didn't include tuples. Any reason for that? Otherwise, figured we could add it?