Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doc and/or a false negative in superfluous-parens #9035

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ repos:
doc/data/messages/m/missing-final-newline/bad/lf.py|
doc/data/messages/m/multiple-statements/bad.py|
doc/data/messages/r/redundant-u-string-prefix/bad.py|
doc/data/messages/s/superfluous-parens/bad.py|
doc/data/messages/s/superfluous-parens/bad/example_1.py|
doc/data/messages/s/syntax-error/bad.py|
doc/data/messages/t/too-many-ancestors/bad.py|
doc/data/messages/t/trailing-comma-tuple/bad.py|
Expand Down
4 changes: 4 additions & 0 deletions doc/data/messages/s/superfluous-parens/bad/example_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
x = input()
y = input()
if (x == y): # [superfluous-parens]
pass
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
x = input()
y = input()
if (x == y): # [superfluous-parens]
pass

i = 0
exclude = []
if (i - 0) in exclude: # [superfluous-parens]
Expand Down
4 changes: 4 additions & 0 deletions doc/data/messages/s/superfluous-parens/good/example_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
x = input()
y = input()
if x == y:
pass
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
x = input()
y = input()
if x == y:
pass

i = 0
exclude = []
if i - 0 in exclude:
Expand Down
Loading