File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 44
55import argparse
66import os
7+ import platform
78import subprocess
89import sys
910import time
3940if TYPE_CHECKING :
4041 from _typeshed import SupportsWrite
4142
43+ if platform .python_implementation () == "PyPy" :
44+ sys .stderr .write (
45+ "ERROR: Running mypy on PyPy is not supported yet.\n "
46+ "To type-check a PyPy library please use an equivalent CPython version,\n "
47+ "see https://github.com/mypyc/librt/issues/16 for possible workarounds.\n "
48+ )
49+ sys .exit (2 )
4250
4351orig_stat : Final = os .stat
4452MEM_PROFILE : Final = False # If True, dump memory profile
Original file line number Diff line number Diff line change 55import glob
66import os
77import os .path
8- import platform
98import sys
109from typing import TYPE_CHECKING , Any
1110
1211if sys .version_info < (3 , 9 , 0 ): # noqa: UP036, RUF100
1312 sys .stderr .write ("ERROR: You need Python 3.9 or later to use mypy.\n " )
1413 exit (1 )
1514
16- if platform .python_implementation () == "PyPy" :
17- sys .stderr .write (
18- "ERROR: Running mypy on PyPy is not supported yet.\n "
19- "To type-check a PyPy library please use an equivalent CPython version,\n "
20- "see https://github.com/mypyc/librt/issues/16 for possible workarounds.\n "
21- )
22- exit (1 )
23-
2415# we'll import stuff from the source tree, let's ensure is on the sys path
2516sys .path .insert (0 , os .path .dirname (os .path .realpath (__file__ )))
2617
You can’t perform that action at this time.
0 commit comments