def run(self):
        import os, sys
        try:
            import pyflakes.scripts.pyflakes as flakes
        except __HOLE__:
            print "Audit requires PyFlakes installed in your system."""
            sys.exit(-1)

        warns = 0
        # Define top-level directories
        dirs = ('flask', 'examples', 'scripts')
        for dir in dirs:
            for root, _, files in os.walk(dir):
                for file in files:
                    if file != '__init__.py' and file.endswith('.py') :
                        warns += flakes.checkPath(os.path.join(root, file))
        if warns > 0:
            print "Audit finished with total %d warnings." % warns
        else:
            print "No problems found in sourcecode."
dataset/ETHPy150Open tokuda109/flask-docs-ja/setup.py/run_audit.run