You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ``location`` -- a file path file_to_change = 'schemes/elliptic_curves/ell_rational_field.py'
109
-
location = cwd + file_to_change
84
+
- ``location`` -- a file path
110
85
- ``package_regex`` -- (default: :obj:`default_package_regex`) a regular expression matching
111
86
the ``sage.PAC.KAGE.all`` package names from which we do not want to import.
112
87
- ``verbose`` -- a parameter which if used will issue print statements when interesting examples are found
@@ -443,8 +418,21 @@ def print_log_messages():
443
418
# ******************************************************** EXECUTES MAIN FUNCTION **********************************************************************
444
419
# this executes the main function in this file which writes over all import statements matching regex in files in specified location matching fileRegex:
445
420
if__name__=="__main__":
446
-
# Parse the arguments
447
-
args=parse_arguments()
421
+
# Create argument parser
422
+
parser=argparse.ArgumentParser()
423
+
# Optional arguments
424
+
parser.add_argument(
425
+
"location",
426
+
metavar='files or directories',
427
+
nargs='*',
428
+
help=("Names of source directories or source files. "
429
+
"If none given, walks through all files in src/sage."),
430
+
type=str)
431
+
parser.add_argument(
432
+
"-v", "--verbose",
433
+
help="Increase output verbosity. Shows locations of any unusual cases of import statements and the corresponding changes.",
0 commit comments