File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -560,6 +560,12 @@ if __name__ == "__main__":
560
560
561
561
args.ignore_bad_distributions = True
562
562
563
+ if not args.filename:
564
+ if not args.update_known_test_failures:
565
+ sys.exit("sage-fixdoctests: At least one filename is required when --update-known-test-failures is not used")
566
+ if not args.distribution:
567
+ sys.exit("sage-fixdoctests: At least one --distribution argument is required for --update-known-test-failures")
568
+
563
569
if args.distribution or args.venv or args.environment:
564
570
args.keep_both = args.full_tracebacks = True
565
571
@@ -569,9 +575,6 @@ if __name__ == "__main__":
569
575
elif not args.distribution:
570
576
args.distribution = ['']
571
577
572
- if not args.filename and not args.update_known_test_failures:
573
- sys.exit("sage-fixdoctests: At least one filename is required when --update-known-test-failures is not used")
574
-
575
578
if len(args.filename) == 2 and not args.overwrite and not args.no_overwrite:
576
579
print("sage-fixdoctests: When passing two filenames, the second one is taken as an output filename; "
577
580
"this is deprecated. To pass two input filenames, use the option --overwrite.")
You can’t perform that action at this time.
0 commit comments