/ lib / numpy / f2py / __init__.pyi
__init__.pyi
 1  import os
 2  import subprocess
 3  from collections.abc import Iterable
 4  from typing import Literal as L, Any, overload, TypedDict
 5  
 6  from numpy._pytesttester import PytestTester
 7  
 8  class _F2PyDictBase(TypedDict):
 9      csrc: list[str]
10      h: list[str]
11  
12  class _F2PyDict(_F2PyDictBase, total=False):
13      fsrc: list[str]
14      ltx: list[str]
15  
16  __all__: list[str]
17  __path__: list[str]
18  test: PytestTester
19  
20  def run_main(comline_list: Iterable[str]) -> dict[str, _F2PyDict]: ...
21  
22  @overload
23  def compile(  # type: ignore[misc]
24      source: str | bytes,
25      modulename: str = ...,
26      extra_args: str | list[str] = ...,
27      verbose: bool = ...,
28      source_fn: None | str | bytes | os.PathLike[Any] = ...,
29      extension: L[".f", ".f90"] = ...,
30      full_output: L[False] = ...,
31  ) -> int: ...
32  @overload
33  def compile(
34      source: str | bytes,
35      modulename: str = ...,
36      extra_args: str | list[str] = ...,
37      verbose: bool = ...,
38      source_fn: None | str | bytes | os.PathLike[Any] = ...,
39      extension: L[".f", ".f90"] = ...,
40      full_output: L[True] = ...,
41  ) -> subprocess.CompletedProcess[bytes]: ...
42  
43  def get_include() -> str: ...