diff --git a/fledermaus_formatter/main.py b/fledermaus_formatter/main.py index 74afffc..121b03b 100644 --- a/fledermaus_formatter/main.py +++ b/fledermaus_formatter/main.py @@ -47,6 +47,7 @@ def main(): # Directory mode parser.add_argument("--input-dir", help="Input directory") parser.add_argument("--output-dir", help="Output directory") + parser.add_argument("-s", help="Serial mode", action="store_true") parser.add_argument( "-t", "--type", @@ -58,7 +59,7 @@ def main(): args = parser.parse_args() if args.v: - print("1.1") + print("1.2") return if not args.type: parser.error("The --type argument is required.") @@ -85,7 +86,7 @@ def main(): tasks.append((input_path, output_path, args.type)) - max_workers = os.cpu_count() or 1 + max_workers = os.cpu_count() or 1 if not args.s else 1 logger.info(f"Processing {len(tasks)} files using {max_workers} workers") with ProcessPoolExecutor(max_workers=max_workers) as executor: