__init__.pyi 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. from collections.abc import Callable
  2. import subprocess
  3. from typing import Any, IO, Literal, overload
  4. def set_font_settings_for_testing() -> None: ...
  5. def set_reproducibility_for_testing() -> None: ...
  6. def setup() -> None: ...
  7. @overload
  8. def subprocess_run_for_testing(
  9. command: list[str],
  10. env: dict[str, str] | None = ...,
  11. timeout: float | None = ...,
  12. stdout: int | IO[Any] | None = ...,
  13. stderr: int | IO[Any] | None = ...,
  14. check: bool = ...,
  15. *,
  16. text: Literal[True],
  17. capture_output: bool = ...,
  18. ) -> subprocess.CompletedProcess[str]: ...
  19. @overload
  20. def subprocess_run_for_testing(
  21. command: list[str],
  22. env: dict[str, str] | None = ...,
  23. timeout: float | None = ...,
  24. stdout: int | IO[Any] | None = ...,
  25. stderr: int | IO[Any] | None = ...,
  26. check: bool = ...,
  27. text: Literal[False] = ...,
  28. capture_output: bool = ...,
  29. ) -> subprocess.CompletedProcess[bytes]: ...
  30. @overload
  31. def subprocess_run_for_testing(
  32. command: list[str],
  33. env: dict[str, str] | None = ...,
  34. timeout: float | None = ...,
  35. stdout: int | IO[Any] | None = ...,
  36. stderr: int | IO[Any] | None = ...,
  37. check: bool = ...,
  38. text: bool = ...,
  39. capture_output: bool = ...,
  40. ) -> subprocess.CompletedProcess[bytes] | subprocess.CompletedProcess[str]: ...
  41. def subprocess_run_helper(
  42. func: Callable[[], None],
  43. *args: Any,
  44. timeout: float,
  45. extra_env: dict[str, str] | None = ...,
  46. ) -> subprocess.CompletedProcess[str]: ...
  47. def _check_for_pgf(texsystem: str) -> bool: ...
  48. def _has_tex_package(package: str) -> bool: ...
  49. def ipython_in_subprocess(
  50. requested_backend_or_gui_framework: str,
  51. all_expected_backends: dict[tuple[int, int], str],
  52. ) -> None: ...
  53. def is_ci_environment() -> bool: ...