@@ -78,22 +78,22 @@ def check_requirements() -> None:
78
78
if sys .platform != "linux" :
79
79
# TODO: How to make this work on other platforms?
80
80
sys .exit ("error: Only Linux is supported" )
81
-
82
- try :
83
- subprocess .run (["perf" , "-h" ], capture_output = True )
84
- except (subprocess .CalledProcessError , FileNotFoundError ):
85
- print ("error: The 'perf' profiler is not installed" )
86
- sys .exit (1 )
87
-
88
- try :
89
- subprocess .run (["clang" , "--version" ], capture_output = True )
90
- except (subprocess .CalledProcessError , FileNotFoundError ):
91
- print ("error: The clang compiler is not installed" )
92
- sys .exit (1 )
93
-
94
- if not os .path .isfile ("mypy_self_check.ini" ):
95
- print ("error: Run this in the mypy repository root" )
96
- sys .exit (1 )
81
+ else : # fun fact/todo: we have to use else here, because of https://github.com/python/mypy/issues/10773
82
+ try :
83
+ subprocess .run (["perf" , "-h" ], capture_output = True )
84
+ except (subprocess .CalledProcessError , FileNotFoundError ):
85
+ print ("error: The 'perf' profiler is not installed" )
86
+ sys .exit (1 )
87
+
88
+ try :
89
+ subprocess .run (["clang" , "--version" ], capture_output = True )
90
+ except (subprocess .CalledProcessError , FileNotFoundError ):
91
+ print ("error: The clang compiler is not installed" )
92
+ sys .exit (1 )
93
+
94
+ if not os .path .isfile ("mypy_self_check.ini" ):
95
+ print ("error: Run this in the mypy repository root" )
96
+ sys .exit (1 )
97
97
98
98
99
99
def main () -> None :
0 commit comments