@@ -272,41 +272,45 @@ def main(argv: list[str] | None = None) -> int:
272272 help = "Source path (file or directory)" ,
273273 )
274274 parser .add_argument (
275- "--no-copy" ,
276- action = "store_true" ,
277- help = "Skip copy-lib step (implied if path is a test path)" ,
275+ "--copy" ,
276+ action = argparse .BooleanOptionalAction ,
277+ default = True ,
278+ help = "Copy library file (default: enabled, implied disabled if test path)" ,
278279 )
279280 parser .add_argument (
280- "--no-migrate" ,
281- action = "store_true" ,
282- help = "Skip migration step (implied if path starts with Lib/)" ,
281+ "--migrate" ,
282+ action = argparse .BooleanOptionalAction ,
283+ default = True ,
284+ help = "Migrate test file (default: enabled, implied disabled if Lib/ path)" ,
283285 )
284286 parser .add_argument (
285- "--no-auto-mark" ,
286- action = "store_true" ,
287- help = "Skip auto-mark step" ,
287+ "--auto-mark" ,
288+ action = argparse .BooleanOptionalAction ,
289+ default = True ,
290+ help = "Auto-mark test failures (default: enabled)" ,
288291 )
289292 parser .add_argument (
290293 "--mark-failure" ,
291294 action = "store_true" ,
292295 help = "Add @expectedFailure to failing tests" ,
293296 )
294297 parser .add_argument (
295- "--no-commit" ,
296- action = "store_true" ,
297- help = "Skip git commit step" ,
298+ "--commit" ,
299+ action = argparse .BooleanOptionalAction ,
300+ default = True ,
301+ help = "Create git commit (default: enabled)" ,
298302 )
299303 parser .add_argument (
300- "--skip-build" ,
301- action = "store_true" ,
302- help = "Skip cargo build, use pre-built binary" ,
304+ "--build" ,
305+ action = argparse .BooleanOptionalAction ,
306+ default = True ,
307+ help = "Build with cargo (default: enabled)" ,
303308 )
304309
305310 args = parser .parse_args (argv )
306311
307312 try :
308313 src_path = args .path
309- no_copy = args .no_copy
310314
311315 # Shortcut: expand simple name to cpython/Lib path
312316 src_path = _expand_shortcut (src_path )
@@ -321,7 +325,7 @@ def main(argv: list[str] | None = None) -> int:
321325 # Get library destination path for commit
322326 lib_file_path = parse_lib_path (src_path )
323327
324- if not no_copy :
328+ if args . copy :
325329 from update_lib .copy_lib import copy_lib
326330
327331 copy_lib (src_path )
@@ -337,14 +341,14 @@ def main(argv: list[str] | None = None) -> int:
337341 # Process the test path
338342 quick (
339343 src_path ,
340- no_migrate = args .no_migrate ,
341- no_auto_mark = args .no_auto_mark ,
344+ no_migrate = not args .migrate ,
345+ no_auto_mark = not args .auto_mark ,
342346 mark_failure = args .mark_failure ,
343- skip_build = args .skip_build ,
347+ skip_build = not args .build ,
344348 )
345349
346350 # Step 3: Git commit
347- if not args .no_commit :
351+ if args .commit :
348352 # Extract module name from path
349353 name = original_src .stem
350354 if name == "__init__" :
0 commit comments