summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>2021-10-15 22:54:46 +0900
committerGitHub <noreply@github.com>2021-10-15 06:54:46 -0700
commit967840543f1f20754dd1579083e8a8271ab6cb62 (patch)
tree6a1a94c4b8f07494c6eb077720986b86058cc635 /examples
parentd554122e2a5702daeb68a3714826c1c7df8cbea3 (diff)
downloadpycparser-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 'examples')
-rw-r--r--examples/dump_ast.py2
-rw-r--r--examples/explore_ast.py2
-rw-r--r--examples/func_calls.py2
-rw-r--r--examples/func_defs.py2
-rw-r--r--examples/func_defs_add_param.py1
-rw-r--r--examples/rewrite_ast.py1
6 files changed, 4 insertions, 6 deletions
diff --git a/examples/dump_ast.py b/examples/dump_ast.py
index 63f5e2d..b7c3273 100644
--- a/examples/dump_ast.py
+++ b/examples/dump_ast.py
@@ -14,7 +14,7 @@ import sys
# your site-packages/ with setup.py
sys.path.extend(['.', '..'])
-from pycparser import c_parser, c_ast, parse_file
+from pycparser import parse_file
if __name__ == "__main__":
argparser = argparse.ArgumentParser('Dump AST')
diff --git a/examples/explore_ast.py b/examples/explore_ast.py
index 1f6e0ae..a75dd1f 100644
--- a/examples/explore_ast.py
+++ b/examples/explore_ast.py
@@ -20,7 +20,7 @@ import sys
#
sys.path.extend(['.', '..'])
-from pycparser import c_parser, c_ast
+from pycparser import c_parser
# This is some C source to parse. Note that pycparser must begin
# at the top level of the C file, i.e. with either declarations
diff --git a/examples/func_calls.py b/examples/func_calls.py
index 97a7271..ce9cc87 100644
--- a/examples/func_calls.py
+++ b/examples/func_calls.py
@@ -14,7 +14,7 @@ import sys
# your site-packages/ with setup.py
sys.path.extend(['.', '..'])
-from pycparser import c_parser, c_ast, parse_file
+from pycparser import c_ast, parse_file
# A visitor with some state information (the funcname it's looking for)
diff --git a/examples/func_defs.py b/examples/func_defs.py
index 8fe9889..5023ff7 100644
--- a/examples/func_defs.py
+++ b/examples/func_defs.py
@@ -17,7 +17,7 @@ import sys
# your site-packages/ with setup.py
sys.path.extend(['.', '..'])
-from pycparser import c_parser, c_ast, parse_file
+from pycparser import c_ast, parse_file
# A simple visitor for FuncDef nodes that prints the names and
diff --git a/examples/func_defs_add_param.py b/examples/func_defs_add_param.py
index d79fef6..11cb635 100644
--- a/examples/func_defs_add_param.py
+++ b/examples/func_defs_add_param.py
@@ -8,7 +8,6 @@
# License: BSD
#-----------------------------------------------------------------
from __future__ import print_function
-import sys
from pycparser import c_parser, c_ast, c_generator
diff --git a/examples/rewrite_ast.py b/examples/rewrite_ast.py
index d38e015..164abb5 100644
--- a/examples/rewrite_ast.py
+++ b/examples/rewrite_ast.py
@@ -7,7 +7,6 @@
# License: BSD
#-----------------------------------------------------------------
from __future__ import print_function
-import sys
from pycparser import c_parser