Fix test errors with python3.10

Python3.10 has become more strict when parsing code that contains syntax
errors, fix those.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Ic9f2cb0df6e52b23b17dd9494b6fceeef9626d8a
This commit is contained in:
Dr. Jens Harbott 2022-03-28 08:35:43 +02:00
parent e3071cdc4b
commit b75c7e6b25
2 changed files with 1 additions and 2 deletions

View File

@ -60,7 +60,6 @@ def hacking_except_format(logical_line, noqa):
Okay: try:\n pass\nexcept Exception:\n pass
H201: try:\n pass\nexcept:\n pass
H201: except:
Okay: try:\n pass\nexcept: # noqa\n pass
"""
if noqa:

View File

@ -152,7 +152,7 @@ def hacking_python3x_metaclass(logical_line, noqa):
H236: class Foo(object):\n __metaclass__ = Meta
H236: class Foo(object):\n foo=bar\n __metaclass__ = Meta
H236: class Foo(object):\n '''docstr.'''\n __metaclass__ = Meta
H236: class Foo(object):\n __metaclass__ = \\\n Meta
H236: class Foo(object):\n __metaclass__ = \\n Meta
Okay: class Foo(object):\n __metaclass__ = Meta # noqa
"""
if noqa: