MartinThoma / flake8-simplify

❄ A flake8 plugin that helps you to simplify code
MIT License
185 stars 19 forks source link

New Check: Unnecessary Parenthesis #1

Closed MartinThoma closed 4 years ago

MartinThoma commented 4 years ago

Explanation

Sometimes people make parenthesis around expressions that definitely don't need them. It just adds optical clutter without adding value. For this reason, the parenthesis should be removed.

Example

# Bad
msg = ("foo")

# Good
msg = "foo"
MartinThoma commented 4 years ago

Black already takes care of this, so I will not integrate it here.