diff options
author | Eisuke Kawashima <e-kwsm@users.noreply.github.com> | 2021-10-15 22:54:46 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 06:54:46 -0700 |
commit | 967840543f1f20754dd1579083e8a8271ab6cb62 (patch) | |
tree | 6a1a94c4b8f07494c6eb077720986b86058cc635 /tests | |
parent | d554122e2a5702daeb68a3714826c1c7df8cbea3 (diff) | |
download | pycparser-967840543f1f20754dd1579083e8a8271ab6cb62.tar.gz |
Fix Flake8 Errors (#442)
* Fix PEP8 [E101](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)
* Fix PEP8 [E711](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)
* Fix E999 (python2)
* Fix PEP8 [F401](https://flake8.pycqa.org/en/4.0.1/user/error-codes.html)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_c_ast.py | 2 | ||||
-rw-r--r-- | tests/test_c_generator.py | 1 | ||||
-rwxr-xr-x | tests/test_c_parser.py | 6 | ||||
-rw-r--r-- | tests/test_general.py | 1 |
4 files changed, 2 insertions, 8 deletions
diff --git a/tests/test_c_ast.py b/tests/test_c_ast.py index 6ea3ceb..eeeb20b 100644 --- a/tests/test_c_ast.py +++ b/tests/test_c_ast.py @@ -1,5 +1,3 @@ -import pprint -import re import sys import unittest import weakref diff --git a/tests/test_c_generator.py b/tests/test_c_generator.py index 4436a43..d166d03 100644 --- a/tests/test_c_generator.py +++ b/tests/test_c_generator.py @@ -1,5 +1,4 @@ import os -import platform import sys import unittest diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py index e83bd7d..33f3f07 100755 --- a/tests/test_c_parser.py +++ b/tests/test_c_parser.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -import pprint -import re import os, sys import io import unittest @@ -10,7 +8,7 @@ sys.path[0:0] = ['.', '..'] from pycparser import c_parser from pycparser.c_ast import * -from pycparser.c_parser import CParser, Coord, ParseError +from pycparser.c_parser import ParseError _c_parser = c_parser.CParser( lex_optimize=False, @@ -729,7 +727,7 @@ class TestCParser_fundamentals(TestCParser_base): def test_parenthesized_compounds(self): e = self.parse(r''' void foo() { - int a; + int a; ({}); ({ 1; }); ({ 1; 2; }); diff --git a/tests/test_general.py b/tests/test_general.py index 3d43cbf..e6b654e 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -1,5 +1,4 @@ import os -import platform import sys import unittest |