🌐 AI搜索 & 代理 主页
Skip to content

Commit 107200b

Browse files
authored
TYP: wrong argument defaults in testing._private (#29902)
* TYP: fix `testing._private.utils.jiffies` signature on linux * TYP: fix incorrect function arg defaults in ``testing._private.extbuild``
1 parent a6f6f05 commit 107200b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

numpy/testing/_private/extbuild.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def build_and_import_extension(
1010
*,
1111
prologue: str = "",
1212
build_dir: pathlib.Path | None = None,
13-
include_dirs: Sequence[str] = [],
13+
include_dirs: Sequence[str] | None = None,
1414
more_init: str = "",
1515
) -> types.ModuleType: ...
1616

@@ -20,6 +20,6 @@ def compile_extension_module(
2020
builddir: pathlib.Path,
2121
include_dirs: Sequence[str],
2222
source_string: str,
23-
libraries: Sequence[str] = [],
24-
library_dirs: Sequence[str] = [],
23+
libraries: Sequence[str] | None = None,
24+
library_dirs: Sequence[str] | None = None,
2525
) -> pathlib.Path: ...

numpy/testing/_private/utils.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ else:
169169
def memusage() -> NoReturn: ...
170170

171171
if sys.platform == "linux":
172-
def jiffies(_proc_pid_stat: StrOrBytesPath | None = None, _load_time: list[float] = []) -> int: ...
172+
def jiffies(_proc_pid_stat: StrOrBytesPath | None = None, _load_time: list[float] | None = None) -> int: ...
173173
else:
174174
def jiffies(_load_time: list[float] = []) -> int: ...
175175

0 commit comments

Comments
 (0)