Skip to content

Commit 7777047

Browse files
author
MarcoFalke
committed
lint: Remove python lint rules that are SyntaxError
Any kind of syntax error is already reported, so there is no need to enumerate all possible types of syntax errors of ancient versions of Python 2 or 3.
1 parent faaf3e5 commit 7777047

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

test/lint/lint-python.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@
6161
'E722,' # do not use bare 'except'
6262
'E742,' # do not define classes named "l", "O", or "I"
6363
'E743,' # do not define functions named "l", "O", or "I"
64-
'E901,' # SyntaxError: invalid syntax
65-
'E902,' # TokenError: EOF in multi-line string
6664
'F401,' # module imported but unused
6765
'F402,' # import module from line N shadowed by loop variable
6866
'F403,' # 'from foo_module import *' used; unable to detect undefined names
@@ -73,33 +71,19 @@
7371
'F601,' # dictionary key name repeated with different values
7472
'F602,' # dictionary key variable name repeated with different values
7573
'F621,' # too many expressions in an assignment with star-unpacking
76-
'F622,' # two or more starred expressions in an assignment (a, *b, *c = d)
7774
'F631,' # assertion test is a tuple, which are always True
7875
'F632,' # use ==/!= to compare str, bytes, and int literals
79-
'F701,' # a break statement outside of a while or for loop
80-
'F702,' # a continue statement outside of a while or for loop
81-
'F703,' # a continue statement in a finally block in a loop
82-
'F704,' # a yield or yield from statement outside of a function
83-
'F705,' # a return statement with arguments inside a generator
84-
'F706,' # a return statement outside of a function/method
85-
'F707,' # an except: block as not the last exception handler
8676
'F811,' # redefinition of unused name from line N
8777
'F812,' # list comprehension redefines 'foo' from line N
8878
'F821,' # undefined name 'Foo'
8979
'F822,' # undefined name name in __all__
9080
'F823,' # local variable name … referenced before assignment
91-
'F831,' # duplicate argument name in function definition
9281
'F841,' # local variable 'foo' is assigned to but never used
9382
'W191,' # indentation contains tabs
9483
'W291,' # trailing whitespace
9584
'W292,' # no newline at end of file
9685
'W293,' # blank line contains whitespace
97-
'W601,' # .has_key() is deprecated, use "in"
98-
'W602,' # deprecated form of raising exception
99-
'W603,' # "<>" is deprecated, use "!="
100-
'W604,' # backticks are deprecated, use "repr()"
10186
'W605,' # invalid escape sequence "x"
102-
'W606,' # 'async' and 'await' are reserved keywords starting with Python 3.7
10387
)
10488

10589

0 commit comments

Comments
 (0)