8000 MAINT: move __getattr__ to the top of __init__.pyi (#62) · numpy/numpy-stubs@83f7216 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit 83f7216

Browse files
authored
MAINT: move __getattr__ to the top of __init__.pyi (#62)
We have a ``` def __getattr__(name: str) -> Any: ... ``` since not everything is typed yet. It was originally at the bottom of the __init__.pyi file, but has since ended up not at the end because it's hard to remember to put your code above it. Since it makes sense to have it somewhere more noticeable than the middle of the file, put it at the top instead.
1 parent 526ae2d commit 83f7216

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

numpy-stubs/__init__.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ if sys.version_info[0] < 3:
3535
else:
3636
from typing import SupportsBytes
3737

38+
# TODO: remove when the full numpy namespace is defined
39+
def __getattr__(name: str) -> Any: ...
40+
3841
_Shape = Tuple[int, ...]
3942

4043
# Anything that can be coerced to a shape tuple
@@ -776,9 +779,6 @@ tanh: ufunc
776779
true_divide: ufunc
777780
trunc: ufunc
778781

779-
# TODO(shoyer): remove when the full numpy namespace is defined
780-
def __getattr__(name: str) -> Any: ...
781-
782782
# Warnings
783783
class ModuleDeprecationWarning(DeprecationWarning): ...
784784
class VisibleDeprecationWarning(UserWarning): ...

0 commit comments

Comments
 (0)
0