forked from vreuter/python-type-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Remove matplotlib stubs and tests" (microsoft#299)
- Loading branch information
Showing
123 changed files
with
12,279 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import numpy as np | ||
from typing import Generator, Literal | ||
from ._typing import * | ||
import contextlib | ||
from packaging.version import parse as parse_version | ||
from . import _docstring, _version, cbook, rcsetup | ||
from . import colors as colors | ||
|
||
class __getattr__: | ||
|
||
URL_REGEX = ... | ||
|
||
def set_loglevel( | ||
level: Literal["notset", "debug", "info", "warning", "error", "critical"] | ||
)-> None: ... | ||
|
||
class ExecutableNotFoundError(FileNotFoundError): | ||
... | ||
|
||
def checkdep_usetex(s)-> bool: ... | ||
def get_configdir() -> str: ... | ||
def get_cachedir() -> str: ... | ||
def get_data_path() -> str: ... | ||
def matplotlib_fname() -> str: ... | ||
|
||
class RcParams(dict): | ||
|
||
validate = ... | ||
def __init__(self, *args, **kwargs) -> None: ... | ||
def find_all(self, pattern)-> RcParams: ... | ||
def copy(self)-> RcParams: ... | ||
|
||
def rc_params(fail_on_error: bool = ...) -> RcParams: ... | ||
def is_url(filename: str) -> bool: ... | ||
def rc_params_from_file( | ||
fname: str | PathLike, fail_on_error: bool = ..., use_default_template: bool = ... | ||
) -> RcParams: ... | ||
|
||
rcParamsDefault: RcParams = ... | ||
rcParams: RcParams = ... | ||
rcParamsOrig: RcParams = ... | ||
|
||
def rc(group, **kwargs)-> None: ... | ||
def rcdefaults()-> None: ... | ||
def rc_file_defaults()-> None: ... | ||
def rc_file(fname: str | PathLike, *, use_default_template: bool = ...)-> None: ... | ||
@contextlib.contextmanager | ||
def rc_context(rc: dict = ..., fname: str | PathLike = ...)-> Generator: ... | ||
def use(backend: str, *, force: bool = True)-> None: ... | ||
def get_backend() -> str: ... | ||
def interactive(b) -> bool: ... | ||
def is_interactive() -> bool: ... | ||
|
||
default_test_modules: list[str] = ... | ||
|
||
def test(verbosity=..., coverage=..., **kwargs): int: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import numpy as np | ||
from ._typing import * | ||
|
||
CharMetrics = ... | ||
CompositePart = ... | ||
|
||
class AFM: | ||
def __init__(self, fh) -> None: ... | ||
def get_bbox_char(self, c: str, isord: bool = False): ... | ||
def string_width_height(self, s: str) -> tuple[float, float]: ... | ||
def get_str_bbox_and_descent(self, s: str) -> tuple[float, ...]: ... | ||
def get_str_bbox(self, s: str)-> tuple[float, ...]: ... | ||
def get_name_char(self, c: str, isord: bool = False)-> str: ... | ||
def get_width_char(self, c: str, isord: bool =False)-> float: ... | ||
def get_width_from_char_name(self, name: str)-> float: ... | ||
def get_height_char(self, c: str, isord: bool = False)-> float: ... | ||
def get_kern_dist(self, c1: str, c2: str)-> float: ... | ||
def get_kern_dist_from_name(self, name1: str, name2: str)-> float: ... | ||
def get_fontname(self) -> str: ... | ||
@property | ||
def postscript_name(self)-> str: ... | ||
def get_fullname(self) -> str: ... | ||
def get_familyname(self) -> str: ... | ||
@property | ||
def family_name(self) -> str: ... | ||
def get_weight(self) -> str: ... | ||
def get_angle(self) -> float: ... | ||
def get_capheight(self) -> float: ... | ||
def get_xheight(self) -> float: ... | ||
def get_underline_thickness(self) -> float: ... | ||
def get_horizontal_stem_width(self) -> float | None: ... | ||
def get_vertical_stem_width(self) -> float | None: ... |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from typing import Any, Callable, Generator, Iterable, Type | ||
|
||
import functools | ||
from .deprecation import ( | ||
MatplotlibDeprecationWarning, | ||
) | ||
|
||
class classproperty: | ||
def __init__( | ||
self, fget: Callable, fset: None = ..., fdel: None = ..., doc: None = ... | ||
) -> None: ... | ||
def __get__(self, instance, owner): ... | ||
@property | ||
def fget(self): ... | ||
|
||
def check_isinstance(**kwargs) -> None: ... | ||
def check_in_list( | ||
_values: Iterable, *, _print_supported_values: bool = True, **kwargs | ||
) -> None: ... | ||
def check_shape(**kwargs) -> None: ... | ||
def check_getitem(_mapping: dict, **kwargs): ... | ||
def caching_module_getattr(cls) -> functools._lru_cache_wrapper: ... | ||
def define_aliases( | ||
alias_d: dict[str, list[str]], cls: None = ... | ||
) -> functools.partial: ... | ||
def select_matching_signature(funcs: list[Callable], *args, **kwargs): ... | ||
def recursive_subclasses(cls) -> Generator: ... | ||
def warn_external( | ||
message: MatplotlibDeprecationWarning | PendingDeprecationWarning | str, | ||
category: None | Type[MatplotlibDeprecationWarning] = ..., | ||
) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from functools import partial | ||
import contextlib | ||
from typing import Callable, Iterator | ||
|
||
class MatplotlibDeprecationWarning(DeprecationWarning): ... | ||
|
||
def warn_deprecated( | ||
since: str, | ||
*, | ||
message: str = ..., | ||
name: str = ..., | ||
alternative: str = ..., | ||
pending: bool = ..., | ||
obj_type: str = ..., | ||
addendum: str = ..., | ||
removal: str = ... | ||
) -> None: ... | ||
def deprecated( | ||
since: str, | ||
*, | ||
message: str = ..., | ||
name: str = ..., | ||
alternative: str = ..., | ||
pending: bool = ..., | ||
obj_type: str = ..., | ||
addendum: str = ..., | ||
removal: str = ... | ||
) -> Callable: ... | ||
|
||
class deprecate_privatize_attribute: | ||
def __init__(self, *args, **kwargs) -> None: ... | ||
def __set_name__(self, owner, name) -> None: ... | ||
|
||
DECORATORS: dict = ... | ||
|
||
def rename_parameter( | ||
since: str, old: str, new: str, func: None | Callable = ... | ||
) -> partial | Callable: ... | ||
|
||
class _deprecated_parameter_class: | ||
def __repr__(self): ... | ||
|
||
def delete_parameter( | ||
since: str, name: str, func: None | Callable = ..., **kwargs | ||
) -> partial | Callable: ... | ||
def make_keyword_only( | ||
since: str, name: str, func: None | Callable = ... | ||
) -> partial | Callable: ... | ||
def deprecate_method_override(method, obj, *, allow_empty: bool = ..., **kwargs): ... | ||
@contextlib.contextmanager | ||
def suppress_matplotlib_deprecation_warning() -> Iterator[None]: ... |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from functools import partial | ||
from typing import Any | ||
|
||
def cubehelix( | ||
gamma: float = 1, s: float = 0.5, r: float = -1.5, h: float = 1 | ||
) -> dict[str, partial]: ... | ||
|
||
gfunc: dict[int, Any] = ... | ||
|
||
datad: dict[str, tuple[float, ...]] = ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
BASE_COLORS: dict[str, tuple[float, float, float]] = ... | ||
TABLEAU_COLORS: dict[str, str] = ... | ||
XKCD_COLORS: dict[str, str] = ... | ||
CSS4_COLORS: dict[str, str] = ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from matplotlib.backend_bases import RendererBase | ||
from .figure import Figure | ||
from .axes import Axes | ||
from .transforms import Bbox | ||
|
||
def do_constrained_layout( | ||
fig: Figure, | ||
h_pad: float, | ||
w_pad: float, | ||
hspace: float|None = None, | ||
wspace: float|None = None, | ||
rect: tuple = ... | ||
)-> dict: ... | ||
def make_layoutgrids(fig, layoutgrids:dict, rect=...)-> dict: ... | ||
def make_layoutgrids_gs(layoutgrids: dict, gs)-> dict: ... | ||
def check_no_collapsed_axes(layoutgrids, fig: Figure)-> bool: ... | ||
def compress_fixed_aspect(layoutgrids, fig: Figure): ... | ||
def get_margin_from_padding(obj, *, w_pad: float=0, h_pad: float=0, hspace: float=0, wspace: float=0)-> dict: ... | ||
def make_layout_margins( | ||
layoutgrids: dict, fig: Figure, renderer: RendererBase, *, w_pad: float=0, h_pad: float=0, hspace: float=0, wspace: float=0 | ||
)-> dict: ... | ||
def make_margin_suptitles(layoutgrids: dict, fig: Figure, renderer: RendererBase, *, w_pad: float=0, h_pad: float=0)-> None: ... | ||
def match_submerged_margins(layoutgrids: dict, fig: Figure)-> None: ... | ||
def get_cb_parent_spans(cbax)-> tuple[range, range]: ... | ||
def get_pos_and_bbox(ax: Axes, renderer: RendererBase) -> tuple[Bbox, Bbox]: ... | ||
def reposition_axes( | ||
layoutgrids: dict, fig: Figure, renderer: RendererBase, *, w_pad: float=0, h_pad: float=0, hspace: float=0, wspace: float=0 | ||
)-> None: ... | ||
def reposition_colorbar(layoutgrids: dict, cbax: Axes, renderer: RendererBase, *, offset: float|None=None)-> dict: ... | ||
def reset_margins(layoutgrids: dict, fig: Figure)-> None: ... | ||
def colorbar_get_pad(layoutgrids: dict, cax: Axes)-> float: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import Callable | ||
|
||
class Substitution: | ||
def __init__(self, *args, **kwargs) -> None: ... | ||
def __call__(self, func: Callable) -> Callable: ... | ||
def update(self, *args, **kwargs) -> None: ... | ||
|
||
class _ArtistKwdocLoader(dict): | ||
def __missing__(self, key: str) -> str: ... | ||
|
||
class _ArtistPropertiesSubstitution(Substitution): | ||
def __init__(self) -> None: ... | ||
def __call__(self, obj: Callable) -> Callable: ... | ||
|
||
def copy(source: Callable) -> Callable: ... | ||
|
||
dedent_interpd: _ArtistPropertiesSubstitution = ... | ||
interpd: _ArtistPropertiesSubstitution = ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from enum import Enum | ||
|
||
class _AutoStringNameEnum(Enum): | ||
def __hash__(self) -> int: ... | ||
|
||
class JoinStyle(str, _AutoStringNameEnum): | ||
|
||
miter: JoinStyle | ||
round: JoinStyle | ||
bevel: JoinStyle | ||
@staticmethod | ||
def demo() -> None: ... | ||
|
||
class CapStyle(str, _AutoStringNameEnum): | ||
butt: CapStyle | ||
projecting: CapStyle | ||
round: CapStyle | ||
@staticmethod | ||
def demo() -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from .font_manager import FontProperties | ||
|
||
family_punc = ... | ||
family_unescape = ... | ||
family_escape = ... | ||
value_punc = ... | ||
value_unescape = ... | ||
value_escape = ... | ||
|
||
class FontconfigPatternParser: | ||
def __init__(self) -> None: ... | ||
def parse(self, pattern: str) -> dict[str, list[str]]: ... | ||
|
||
parse_fontconfig_pattern = ... | ||
|
||
def generate_fontconfig_pattern(d: FontProperties) -> str: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
from typing import Literal | ||
from .gridspec import SubplotSpec | ||
from .transforms import Bbox | ||
from .figure import Figure | ||
|
||
class LayoutGrid: | ||
def __init__( | ||
self, | ||
parent: LayoutGrid | tuple[int, int, int, int]|None = None, | ||
parent_pos: tuple[range, range] | tuple[int, int] = (0, 0), | ||
parent_inner: bool = False, | ||
name: str = '', | ||
ncols: int = 1, | ||
nrows: int = 1, | ||
h_pad: float|None = None, | ||
w_pad: float|None = None, | ||
width_ratios: None | list[float] = None, | ||
height_ratios: None | list[float] = None, | ||
) -> None: ... | ||
def __repr__(self) -> str: ... | ||
def reset_margins(self) -> None: ... | ||
def add_constraints(self) -> None: ... | ||
def hard_constraints(self) -> None: ... | ||
def add_child( | ||
self, | ||
child: LayoutGrid, | ||
i: int | range = 0, | ||
j: int | range = 0, | ||
) -> None: ... | ||
def parent_constraints(self) -> None: ... | ||
def grid_constraints(self) -> None: ... | ||
def edit_margin( | ||
self, todo: Literal["left", "right", "bottom", "top"], size: float, cell: int | ||
) -> None: ... | ||
def edit_margin_min( | ||
self, | ||
todo: Literal["left", "right", "bottom", "top"], | ||
size: float, | ||
cell: int = 0, | ||
) -> None: ... | ||
def edit_margins( | ||
self, todo: Literal["left", "right", "bottom", "top"], size: float | ||
) -> None: ... | ||
def edit_all_margins_min( | ||
self, todo: Literal["left", "right", "bottom", "top"], size: float | ||
): ... | ||
def edit_outer_margin_mins(self, margin: dict, ss: SubplotSpec)-> None: ... | ||
def get_margins(self, todo, col) -> Bbox: ... | ||
def get_outer_bbox(self, rows=0, cols=0) -> Bbox: ... | ||
def get_inner_bbox(self, rows=0, cols=0) -> Bbox: ... | ||
def get_bbox_for_cb(self, rows=0, cols=0) -> Bbox: ... | ||
def get_left_margin_bbox(self, rows=0, cols=0) -> Bbox: ... | ||
def get_bottom_margin_bbox(self, rows=0, cols=0) -> Bbox: ... | ||
def get_right_margin_bbox(self, rows=0, cols=0) -> Bbox: ... | ||
def get_top_margin_bbox(self, rows=0, cols=0) -> Bbox: ... | ||
def update_variables(self) -> None: ... | ||
|
||
def seq_id() -> str: ... | ||
def print_children(lb) -> None: ... | ||
def plot_children(fig: Figure, lg=None, level: int=0, printit: bool=False)->None: ... |
Oops, something went wrong.