summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/__init__.pyi15
-rw-r--r--numpy/sys.pyi4
-rw-r--r--numpy/tests/typing/reveal/modules.py1
3 files changed, 7 insertions, 13 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi
index a1549e2f8..005a15613 100644
--- a/numpy/__init__.pyi
+++ b/numpy/__init__.pyi
@@ -1,5 +1,5 @@
import builtins
-import sys as _sys
+import sys
import datetime as dt
from abc import abstractmethod
@@ -33,13 +33,13 @@ from typing import (
Union,
)
-if _sys.version_info[0] < 3:
+if sys.version_info[0] < 3:
class SupportsBytes: ...
else:
from typing import SupportsBytes
-if _sys.version_info >= (3, 8):
+if sys.version_info >= (3, 8):
from typing import Literal, Protocol
else:
from typing_extensions import Literal, Protocol
@@ -61,7 +61,6 @@ from . import (
polynomial,
random,
rec,
- sys,
testing,
version,
warnings,
@@ -210,7 +209,7 @@ class _ArrayOrScalarCommon(
def __int__(self) -> int: ...
def __float__(self) -> float: ...
def __complex__(self) -> complex: ...
- if _sys.version_info[0] < 3:
+ if sys.version_info[0] < 3:
def __oct__(self) -> str: ...
def __hex__(self) -> str: ...
def __nonzero__(self) -> bool: ...
@@ -237,7 +236,7 @@ class _ArrayOrScalarCommon(
def __mul__(self, other): ...
def __rmul__(self, other): ...
def __imul__(self, other): ...
- if _sys.version_info[0] < 3:
+ if sys.version_info[0] < 3:
def __div__(self, other): ...
def __rdiv__(self, other): ...
def __idiv__(self, other): ...
@@ -271,7 +270,7 @@ class _ArrayOrScalarCommon(
def __or__(self, other): ...
def __ror__(self, other): ...
def __ior__(self, other): ...
- if _sys.version_info[:2] >= (3, 5):
+ if sys.version_info[:2] >= (3, 5):
def __matmul__(self, other): ...
def __rmatmul__(self, other): ...
def __neg__(self: _ArraySelf) -> _ArraySelf: ...
@@ -449,7 +448,7 @@ class timedelta64(signedinteger):
@overload
def __add__(self, other: datetime64) -> datetime64: ...
def __sub__(self, other: Union[timedelta64, int]) -> timedelta64: ...
- if _sys.version_info[0] < 3:
+ if sys.version_info[0] < 3:
@overload
def __div__(self, other: timedelta64) -> float: ...
@overload
diff --git a/numpy/sys.pyi b/numpy/sys.pyi
deleted file mode 100644
index 3938d68de..000000000
--- a/numpy/sys.pyi
+++ /dev/null
@@ -1,4 +0,0 @@
-from typing import Any
-
-# TODO: remove when the full numpy namespace is defined
-def __getattr__(name: str) -> Any: ...
diff --git a/numpy/tests/typing/reveal/modules.py b/numpy/tests/typing/reveal/modules.py
index b4a94e326..ca7b14f25 100644
--- a/numpy/tests/typing/reveal/modules.py
+++ b/numpy/tests/typing/reveal/modules.py
@@ -17,7 +17,6 @@ reveal_type(np.os) # E: ModuleType
reveal_type(np.polynomial) # E: ModuleType
reveal_type(np.random) # E: ModuleType
reveal_type(np.rec) # E: ModuleType
-reveal_type(np.sys) # E: ModuleType
reveal_type(np.testing) # E: ModuleType
reveal_type(np.version) # E: ModuleType
reveal_type(np.warnings) # E: ModuleType