File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -455,9 +455,17 @@ def run_main(comline_list):
455
455
pyf_files , _ = filter_files ("" , "[.]pyf([.]src|)" , comline_list )
456
456
# Checks that no existing modulename is defined in a pyf file
457
457
# TODO: Remove all this when scaninputline is replaced
458
- if "-h" not in comline_list and args .module_name : # Can't check what doesn't exist yet, -h creates the pyf
459
- modname = validate_modulename (pyf_files , args .module_name )
460
- comline_list += ['-m' , modname ] # needed for the rest of scaninputline
458
+ modname = "untitled" # Default value
459
+ if args .module_name :
460
+ if "-h" in comline_list :
461
+ modname = (
462
+ args .module_name
463
+ ) # Directly use the module name from args when -h is present
464
+ else :
465
+ modname = validate_modulename (
466
+ pyf_files , args .module_name
467
+ ) # Validate modname when -h is not present
468
+ comline_list += ['-m' , modname ] # needed for the rest of scaninputline
461
469
# gh-22819 -- end
462
470
files , options = scaninputline (comline_list )
463
471
auxfuncs .options = options
You can’t perform that action at this time.
0 commit comments