refactor for linter
This commit is contained in:
@@ -184,15 +184,12 @@ def process_directory(
|
||||
*,
|
||||
source_dir: pathlib.Path,
|
||||
destination_dir: pathlib.Path,
|
||||
temp_dir: pathlib.Path | None = None,
|
||||
temp_dir: pathlib.Path,
|
||||
remove_source: bool = False,
|
||||
nice: int = 20,
|
||||
count_only: bool = False
|
||||
) -> int:
|
||||
"""Process all video files in source directory recursively."""
|
||||
if not count_only:
|
||||
if not temp_dir:
|
||||
raise ValueError("Temporary directory is required for processing files")
|
||||
count = 0
|
||||
successful = 0
|
||||
for dirpath, _dirnames, filenames in os.walk(source_dir):
|
||||
@@ -264,6 +261,7 @@ def main():
|
||||
total_files = process_directory(
|
||||
source_dir=source_dir,
|
||||
destination_dir=destination_dir,
|
||||
temp_dir=temp_dir,
|
||||
count_only=True
|
||||
)
|
||||
|
||||
@@ -274,6 +272,5 @@ def main():
|
||||
remove_source=args.remove_source,
|
||||
nice=args.nice
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user