rcsetup.pyi 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. from cycler import Cycler
  2. from collections.abc import Callable, Iterable
  3. from typing import Any, Literal, TypeVar
  4. from matplotlib.typing import ColorType, LineStyleType, MarkEveryType
  5. interactive_bk: list[str]
  6. non_interactive_bk: list[str]
  7. all_backends: list[str]
  8. _T = TypeVar("_T")
  9. def _listify_validator(s: Callable[[Any], _T]) -> Callable[[Any], list[_T]]: ...
  10. class ValidateInStrings:
  11. key: str
  12. ignorecase: bool
  13. valid: dict[str, str]
  14. def __init__(
  15. self,
  16. key: str,
  17. valid: Iterable[str],
  18. ignorecase: bool = ...,
  19. *,
  20. _deprecated_since: str | None = ...
  21. ) -> None: ...
  22. def __call__(self, s: Any) -> str: ...
  23. def validate_any(s: Any) -> Any: ...
  24. def validate_anylist(s: Any) -> list[Any]: ...
  25. def validate_bool(b: Any) -> bool: ...
  26. def validate_axisbelow(s: Any) -> bool | Literal["line"]: ...
  27. def validate_dpi(s: Any) -> Literal["figure"] | float: ...
  28. def validate_string(s: Any) -> str: ...
  29. def validate_string_or_None(s: Any) -> str | None: ...
  30. def validate_stringlist(s: Any) -> list[str]: ...
  31. def validate_int(s: Any) -> int: ...
  32. def validate_int_or_None(s: Any) -> int | None: ...
  33. def validate_float(s: Any) -> float: ...
  34. def validate_float_or_None(s: Any) -> float | None: ...
  35. def validate_floatlist(s: Any) -> list[float]: ...
  36. def _validate_marker(s: Any) -> int | str: ...
  37. def _validate_markerlist(s: Any) -> list[int | str]: ...
  38. def validate_fonttype(s: Any) -> int: ...
  39. _auto_backend_sentinel: object
  40. def validate_backend(s: Any) -> str: ...
  41. def validate_color_or_inherit(s: Any) -> Literal["inherit"] | ColorType: ...
  42. def validate_color_or_auto(s: Any) -> ColorType | Literal["auto"]: ...
  43. def validate_color_for_prop_cycle(s: Any) -> ColorType: ...
  44. def validate_color(s: Any) -> ColorType: ...
  45. def validate_colorlist(s: Any) -> list[ColorType]: ...
  46. def _validate_color_or_linecolor(
  47. s: Any,
  48. ) -> ColorType | Literal["linecolor", "markerfacecolor", "markeredgecolor"] | None: ...
  49. def validate_aspect(s: Any) -> Literal["auto", "equal"] | float: ...
  50. def validate_fontsize_None(
  51. s: Any,
  52. ) -> Literal[
  53. "xx-small",
  54. "x-small",
  55. "small",
  56. "medium",
  57. "large",
  58. "x-large",
  59. "xx-large",
  60. "smaller",
  61. "larger",
  62. ] | float | None: ...
  63. def validate_fontsize(
  64. s: Any,
  65. ) -> Literal[
  66. "xx-small",
  67. "x-small",
  68. "small",
  69. "medium",
  70. "large",
  71. "x-large",
  72. "xx-large",
  73. "smaller",
  74. "larger",
  75. ] | float: ...
  76. def validate_fontsizelist(
  77. s: Any,
  78. ) -> list[
  79. Literal[
  80. "xx-small",
  81. "x-small",
  82. "small",
  83. "medium",
  84. "large",
  85. "x-large",
  86. "xx-large",
  87. "smaller",
  88. "larger",
  89. ]
  90. | float
  91. ]: ...
  92. def validate_fontweight(
  93. s: Any,
  94. ) -> Literal[
  95. "ultralight",
  96. "light",
  97. "normal",
  98. "regular",
  99. "book",
  100. "medium",
  101. "roman",
  102. "semibold",
  103. "demibold",
  104. "demi",
  105. "bold",
  106. "heavy",
  107. "extra bold",
  108. "black",
  109. ] | int: ...
  110. def validate_fontstretch(
  111. s: Any,
  112. ) -> Literal[
  113. "ultra-condensed",
  114. "extra-condensed",
  115. "condensed",
  116. "semi-condensed",
  117. "normal",
  118. "semi-expanded",
  119. "expanded",
  120. "extra-expanded",
  121. "ultra-expanded",
  122. ] | int: ...
  123. def validate_font_properties(s: Any) -> dict[str, Any]: ...
  124. def validate_whiskers(s: Any) -> list[float] | float: ...
  125. def validate_ps_distiller(s: Any) -> None | Literal["ghostscript", "xpdf"]: ...
  126. validate_fillstyle: ValidateInStrings
  127. def validate_fillstylelist(
  128. s: Any,
  129. ) -> list[Literal["full", "left", "right", "bottom", "top", "none"]]: ...
  130. def validate_markevery(s: Any) -> MarkEveryType: ...
  131. def _validate_linestyle(s: Any) -> LineStyleType: ...
  132. def validate_markeverylist(s: Any) -> list[MarkEveryType]: ...
  133. def validate_bbox(s: Any) -> Literal["tight", "standard"] | None: ...
  134. def validate_sketch(s: Any) -> None | tuple[float, float, float]: ...
  135. def validate_hatch(s: Any) -> str: ...
  136. def validate_hatchlist(s: Any) -> list[str]: ...
  137. def validate_dashlist(s: Any) -> list[list[float]]: ...
  138. # TODO: copy cycler overloads?
  139. def cycler(*args, **kwargs) -> Cycler: ...
  140. def validate_cycler(s: Any) -> Cycler: ...
  141. def validate_hist_bins(
  142. s: Any,
  143. ) -> Literal["auto", "sturges", "fd", "doane", "scott", "rice", "sqrt"] | int | list[
  144. float
  145. ]: ...
  146. # At runtime is added in __init__.py
  147. defaultParams: dict[str, Any]