diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c0cdda154..80f4ff752b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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| diff --git a/doc/data/messages/s/superfluous-parens/bad/example_1.py b/doc/data/messages/s/superfluous-parens/bad/example_1.py new file mode 100644 index 0000000000..800c23fe63 --- /dev/null +++ b/doc/data/messages/s/superfluous-parens/bad/example_1.py @@ -0,0 +1,4 @@ +x = input() +y = input() +if (x == y): # [superfluous-parens] + pass diff --git a/doc/data/messages/s/superfluous-parens/bad.py b/doc/data/messages/s/superfluous-parens/bad/example_2.py similarity index 51% rename from doc/data/messages/s/superfluous-parens/bad.py rename to doc/data/messages/s/superfluous-parens/bad/example_2.py index aeb0af0758..71e666f221 100644 --- a/doc/data/messages/s/superfluous-parens/bad.py +++ b/doc/data/messages/s/superfluous-parens/bad/example_2.py @@ -1,8 +1,3 @@ -x = input() -y = input() -if (x == y): # [superfluous-parens] - pass - i = 0 exclude = [] if (i - 0) in exclude: # [superfluous-parens] diff --git a/doc/data/messages/s/superfluous-parens/good/example_1.py b/doc/data/messages/s/superfluous-parens/good/example_1.py new file mode 100644 index 0000000000..4bff5bee81 --- /dev/null +++ b/doc/data/messages/s/superfluous-parens/good/example_1.py @@ -0,0 +1,4 @@ +x = input() +y = input() +if x == y: + pass diff --git a/doc/data/messages/s/superfluous-parens/good.py b/doc/data/messages/s/superfluous-parens/good/example_2.py similarity index 52% rename from doc/data/messages/s/superfluous-parens/good.py rename to doc/data/messages/s/superfluous-parens/good/example_2.py index 7d20f5e1d3..49a7495b5e 100644 --- a/doc/data/messages/s/superfluous-parens/good.py +++ b/doc/data/messages/s/superfluous-parens/good/example_2.py @@ -1,8 +1,3 @@ -x = input() -y = input() -if x == y: - pass - i = 0 exclude = [] if i - 0 in exclude: