__init__.pyi 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. from _typeshed import StrOrBytesPath
  2. import subprocess
  3. from collections.abc import Iterable
  4. from typing import Literal as L, overload, TypedDict, type_check_only
  5. __all__ = ["run_main", "get_include"]
  6. @type_check_only
  7. class _F2PyDictBase(TypedDict):
  8. csrc: list[str]
  9. h: list[str]
  10. @type_check_only
  11. class _F2PyDict(_F2PyDictBase, total=False):
  12. fsrc: list[str]
  13. ltx: list[str]
  14. def run_main(comline_list: Iterable[str]) -> dict[str, _F2PyDict]: ...
  15. @overload
  16. def compile(
  17. source: str | bytes,
  18. modulename: str = ...,
  19. extra_args: str | list[str] = ...,
  20. verbose: bool = ...,
  21. source_fn: StrOrBytesPath | None = ...,
  22. extension: L[".f", ".f90"] = ...,
  23. full_output: L[False] = ...,
  24. ) -> int: ...
  25. @overload
  26. def compile(
  27. source: str | bytes,
  28. modulename: str = ...,
  29. extra_args: str | list[str] = ...,
  30. verbose: bool = ...,
  31. source_fn: StrOrBytesPath | None = ...,
  32. extension: L[".f", ".f90"] = ...,
  33. *,
  34. full_output: L[True],
  35. ) -> subprocess.CompletedProcess[bytes]: ...
  36. def get_include() -> str: ...