We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df9840f commit e4edee2Copy full SHA for e4edee2
fastmath.py
@@ -33,15 +33,10 @@ def check_fastmath():
33
return
34
35
36
-parser = argparse.ArgumentParser()
37
-parser.add_argument("--perform", required=True)
38
-EXCEPTED_VALUES = ["check"]
39
-
40
-args = parser.parse_args()
41
-if args.perform not in EXCEPTED_VALUES:
42
- raise ValueError("Invalid argument")
43
44
-if args.perform == "check":
45
- check_fastmath()
46
-else:
47
- pass
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--check", action="store_true")
+ args = parser.parse_args()
+
+ if args.check:
+ check_fastmath()
0 commit comments