(dir_path)
| 50 | |
| 51 | |
| 52 | def _get_files(dir_path): |
| 53 | if not os.path.exists(dir_path): |
| 54 | print("Directory %s doesn't exist." % dir_path) |
| 55 | |
| 56 | files = [] |
| 57 | exclude = set(["virtualenv", "build", ".tox"]) |
| 58 | for root, dirnames, filenames in os.walk(dir_path): |
| 59 | dirnames[:] = [d for d in dirnames if d not in exclude] |
| 60 | for filename in fnmatch.filter(filenames, "*.py"): |
| 61 | if not _skip_file(filename): |
| 62 | files.append(os.path.join(root, filename)) |
| 63 | return files |
| 64 | |
| 65 | |
| 66 | # TODO: Regex compiling will be faster but I cannot get it to work :( |
no test coverage detected