Skip to content
Myr

Clean up auditing command

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Priit Laes · committed by Ron DuPlain · parent 9c82840 · Browse files · 1 file+7 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−10 removed

  • other:+7 added−10 removed

1 file+7 added−10 removed

modified:setup.py+7 added-10 removed
47 unmodified lines
48 description = "Audit source code with PyFlakes"49 user_options = []5051 def initialize_options(self):52 all = None52 pass5354 def finalize_options(self):55 pass56
4 unmodified lines
61 except ImportError:62 print "Audit requires PyFlakes installed in your system."""63 sys.exit(-1)6465 dirs = ['flask', 'tests']66 # Add example directories67 for dir in ['flaskr', 'jqueryexample', 'minitwit']:68 dirs.append(os.path.join('examples', dir))69 # TODO: Add test subdirectories65 warns = 066 # Define top-level directories67 dirs = ('flask', 'examples', 'scripts')68 for dir in dirs:72 for filename in os.listdir(dir):73 if filename.endswith('.py') and filename != '__init__.py':74 warns += flakes.checkPath(os.path.join(dir, filename))69 for root, _, files in os.walk(dir):70 for file in files:71 if file != '__init__.py' and file.endswith('.py') :72 warns += flakes.checkPath(os.path.join(root, file))73 if warns > 0:74 print ("Audit finished with total %d warnings." % warns)75 else:76 print ("No problems found in sourcecode.")778078setup(79 name='Flask',80 version='0.8-dev',81 url='http://github.com/mitsuhiko/flask/',
27 unmodified lines