f2py2e.pyi 2.1 KB

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