Skip to content

Commit 1037540

Browse files
committed
🤡 lie about ndarray.__buffer__ (blame typeshed)
1 parent 4c1a15d commit 1037540

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/numpy-stubs/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,8 +1561,8 @@ class _ArrayOrScalarCommon:
15611561
@property
15621562
def device(self) -> _Device: ...
15631563

1564-
if sys.version_info >= (3, 12):
1565-
def __buffer__(self, flags: int, /) -> memoryview: ...
1564+
# typeshed forces us to lie about this on python<3.12
1565+
def __buffer__(self, flags: int, /) -> memoryview: ...
15661566

15671567
#
15681568
@property

0 commit comments

Comments
 (0)