File tree Expand file tree Collapse file tree 2 files changed +56
-68
lines changed Expand file tree Collapse file tree 2 files changed +56
-68
lines changed Original file line number Diff line number Diff line change 2
2
# requires-python = ">=3.11"
3
3
# dependencies = [
4
4
# "numtype[numpy]",
5
- # "mypy[faster-cache]>=1.15 .0", # keep in sync with pyproject.toml
5
+ # "mypy[faster-cache]>=1.16 .0", # keep in sync with pyproject.toml
6
6
#
7
7
# "PyInstaller",
8
8
# "hypothesis",
@@ -69,26 +69,6 @@ def __check_simd() -> None:
69
69
__check_simd ()
70
70
71
71
72
- def __commit_pyi_genocide_for_mypy () -> None :
73
- """
74
- Remove all ``__init__.pyi`` files from the installed numpy package.
75
-
76
- This works around https://github.com/python/mypy/issues/18997 on `mypy<1.16.0`.
77
-
78
- Raises
79
- ------
80
- NotADirectoryError
81
- If `numpy` does not exist in the site-packages.
82
- """
83
- package = SITE_DIR / "numpy"
84
- if not package .is_dir ():
85
- raise NotADirectoryError (f"{ package } does not exist" )
86
-
87
- graveyard_size = sum (not pyi .unlink () for pyi in package .rglob ("__init__.pyi" )) # type: ignore[func-returns-value]
88
- if VERBOSE and graveyard_size :
89
- print (f"deleted { graveyard_size } __init__.pyi from { package } \n " )
90
-
91
-
92
72
def _allowlists () -> list [str ]:
93
73
relpath = (TOOL_DIR / "allowlists" ).relative_to (CWD )
94
74
return [str (relpath / fname ) for fname in ALLOWLISTS ]
@@ -147,8 +127,6 @@ def main() -> int:
147
127
-------
148
128
exit_code : int
149
129
"""
150
- __commit_pyi_genocide_for_mypy ()
151
-
152
130
if VERBOSE :
153
131
import numpy as np # noqa: PLC0415
154
132
import numtype as nt # noqa: PLC0415
You can’t perform that action at this time.
0 commit comments