Changeset View
Changeset View
Standalone View
Standalone View
swh/scanner/scanner.py
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | for pattern in patterns: | ||||
f'to the root directory path: "{root_path}"' | f'to the root directory path: "{root_path}"' | ||||
) | ) | ||||
raise InvalidDirectoryPath(error_msg) | raise InvalidDirectoryPath(error_msg) | ||||
regex = fnmatch.translate((pattern)) | regex = fnmatch.translate((pattern)) | ||||
yield re.compile(regex) | yield re.compile(regex) | ||||
def scan( | def do_scan( | ||||
config: Dict[str, Any], | config: Dict[str, Any], | ||||
root_path: str, | root_path: str, | ||||
exclude_patterns: Iterable[str], | exclude_patterns: Iterable[str], | ||||
out_fmt: str, | out_fmt: str, | ||||
interactive: bool, | interactive: bool, | ||||
): | ): | ||||
"""Scan a source code project to discover files and directories already | """Scan a source code project to discover files and directories already | ||||
present in the archive""" | present in the archive""" | ||||
Show All 17 Lines |