File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -455,9 +455,14 @@ 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
+ if "-h" in comline_list :
459
+ modname = args .module_name # Directly use the module name from args
460
+ else :
461
+ if args .module_name :
462
+ modname = validate_modulename (pyf_files , args .module_name )
463
+ else :
464
+ modname = 'untitled'
465
+ comline_list += ['-m' , modname ] # needed for the rest of scaninputline
461
466
# gh-22819 -- end
462
467
files , options = scaninputline (comline_list )
463
468
auxfuncs .options = options
You can’t perform that action at this time.
0 commit comments