(dir, exclude=None)
return matches
Given a root directory, compiles a list of python files to analyze.
    If a discovered python file is provided in the list of excluded, it will be ignored
Given a root directory, compiles a list of python files to analyze.
    If a discovered python file is provided in the list of excluded, it will be ignored
Given a root directory compiles a list of python files to analyze . If a discovered python file is provided in the list of excluded it will be ignored
def find_files(dir, exclude=None):
    """
    Given a root directory, compiles a list of python files to analyze.
    If a discovered python file is provided in the list of excluded, it will be ignored
    """
    if not exclude:
        exclude = []

    matches = []
    for root, dirs, files in os.walk(dir):
        for file in files:
            filepath = os.path.abspath(os.path.join(root, file))
            if any(fnmatch(filepath, pattern) for pattern in exclude):
                continue

            if filepath.endswith(".py"):
                matches.append(filepath)

    return matches
def find_files ( dir , exclude = None ) : if not exclude : exclude = [ ] matches = [ ] for root , dirs , files in os . walk ( dir ) : for file in files : filepath = os . path . abspath ( os . path . join ( root , file ) ) if any ( fnmatch ( filepath , pattern ) for pattern in exclude ) : continue if filepath . endswith ( ".py" ) : matches . append ( filepath ) return matches