f2py2e.pyi 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import argparse
  2. import pprint
  3. from collections.abc import Hashable, Iterable, Mapping, MutableMapping, Sequence
  4. from types import ModuleType
  5. from typing import Any, Final, NotRequired, TypedDict, type_check_only
  6. from typing_extensions import TypeVar, override
  7. from .__version__ import version
  8. from .auxfuncs import _Bool
  9. from .auxfuncs import outmess as outmess
  10. ###
  11. _KT = TypeVar("_KT", bound=Hashable)
  12. _VT = TypeVar("_VT")
  13. @type_check_only
  14. class _F2PyDict(TypedDict):
  15. csrc: list[str]
  16. h: list[str]
  17. fsrc: NotRequired[list[str]]
  18. ltx: NotRequired[list[str]]
  19. @type_check_only
  20. class _PreparseResult(TypedDict):
  21. dependencies: list[str]
  22. backend: str
  23. modulename: str
  24. ###
  25. MESON_ONLY_VER: Final[bool]
  26. f2py_version: Final = version
  27. numpy_version: Final = version
  28. __usage__: Final[str]
  29. show = pprint.pprint
  30. class CombineIncludePaths(argparse.Action):
  31. @override
  32. def __call__(
  33. self,
  34. /,
  35. parser: argparse.ArgumentParser,
  36. namespace: argparse.Namespace,
  37. values: str | Sequence[str] | None,
  38. option_string: str | None = None,
  39. ) -> None: ...
  40. #
  41. def run_main(comline_list: Iterable[str]) -> dict[str, _F2PyDict]: ...
  42. def run_compile() -> None: ...
  43. def main() -> None: ...
  44. #
  45. def scaninputline(inputline: Iterable[str]) -> tuple[list[str], dict[str, _Bool]]: ...
  46. def callcrackfortran(files: list[str], options: dict[str, bool]) -> list[dict[str, Any]]: ...
  47. def buildmodules(lst: Iterable[Mapping[str, object]]) -> dict[str, dict[str, Any]]: ...
  48. def dict_append(d_out: MutableMapping[_KT, _VT], d_in: Mapping[_KT, _VT]) -> None: ...
  49. def filter_files(
  50. prefix: str,
  51. suffix: str,
  52. files: Iterable[str],
  53. remove_prefix: _Bool | None = None,
  54. ) -> tuple[list[str], list[str]]: ...
  55. def get_prefix(module: ModuleType) -> str: ...
  56. def get_newer_options(iline: Iterable[str]) -> tuple[list[str], Any, list[str]]: ...
  57. #
  58. def f2py_parser() -> argparse.ArgumentParser: ...
  59. def make_f2py_compile_parser() -> argparse.ArgumentParser: ...
  60. #
  61. def preparse_sysargv() -> _PreparseResult: ...
  62. def validate_modulename(pyf_files: Sequence[str], modulename: str = "untitled") -> str: ...