Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0205b4a

Browse filesBrowse files
committed
__init__.pyi, add __all__ to __init__
adjusts some imports in tests
1 parent 9b341f1 commit 0205b4a
Copy full SHA for 0205b4a

File tree

Expand file treeCollapse file tree

3 files changed

+143
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+143
-1
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
__all__ = [
2+
"__bibtex__",
3+
"__version_info__",
4+
"set_loglevel",
5+
"ExecutableNotFoundError",
6+
"get_configdir",
7+
"get_cachedir",
8+
"get_data_path",
9+
"matplotlib_fname",
10+
"RcParams",
11+
"rc_params",
12+
"rc_params_from_file",
13+
"rcParamsDefault",
14+
"rcParams",
15+
"rcParamsOrig",
16+
"defaultParams",
17+
"rc",
18+
"rcdefaults",
19+
"rc_file_defaults",
20+
"rc_file",
21+
"rc_context",
22+
"use",
23+
"get_backend",
24+
"interactive",
25+
"is_interactive",
26+
"default_test_modules",
27+
"colormaps",
28+
"color_sequences",
29+
]
30+
31+
132
"""
233
An object-oriented plotting library.
334

‎lib/matplotlib/__init__.pyi

Copy file name to clipboard
+110Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
__all__ = [
2+
"__bibtex__",
3+
"__version_info__",
4+
"set_loglevel",
5+
"ExecutableNotFoundError",
6+
"get_configdir",
7+
"get_cachedir",
8+
"get_data_path",
9+
"matplotlib_fname",
10+
"RcParams",
11+
"rc_params",
12+
"rc_params_from_file",
13+
"rcParamsDefault",
14+
"rcParams",
15+
"rcParamsOrig",
16+
"defaultParams",
17+
"rc",
18+
"rcdefaults",
19+
"rc_file_defaults",
20+
"rc_file",
21+
"rc_context",
22+
"use",
23+
"get_backend",
24+
"interactive",
25+
"is_interactive",
26+
"default_test_modules",
27+
"colormaps",
28+
"color_sequences",
29+
]
30+
31+
32+
import os
33+
from pathlib import Path
34+
35+
from . import cbook, rcsetup
36+
from collections.abc import Generator, MutableMapping
37+
import contextlib
38+
from packaging.version import Version
39+
40+
from matplotlib._api import MatplotlibDeprecationWarning
41+
from matplotlib.cbook import sanitize_sequence
42+
from matplotlib.rcsetup import cycler, validate_backend
43+
from typing import Any, Callable, NamedTuple
44+
45+
__bibtex__: str
46+
47+
class _VersionInfo(NamedTuple):
48+
major: int
49+
minor: int
50+
micro: int
51+
releaselevel: str
52+
serial: int
53+
54+
class __getattr__:
55+
__version_info__: _VersionInfo
56+
57+
def set_loglevel(level: str) -> None: ...
58+
59+
class _ExecInfo(NamedTuple):
60+
executable: str
61+
raw_version: str
62+
version: Version
63+
64+
class ExecutableNotFoundError(FileNotFoundError): ...
65+
66+
def _get_executable_info(name: str) -> _ExecInfo: ...
67+
68+
def get_configdir() -> str: ...
69+
def get_cachedir() -> str: ...
70+
def get_data_path() -> str: ...
71+
def matplotlib_fname() -> str: ...
72+
73+
class RcParams(dict[str, Any]):
74+
validate: dict[str, Callable]
75+
def __init__(self, *args, **kwargs) -> None: ...
76+
def __setitem__(self, key: str, val: Any) -> None: ...
77+
def __getitem__(self, key: str) -> Any: ...
78+
def __iter__(self) -> Generator[str, None, None]: ...
79+
def __len__(self) -> int: ...
80+
def find_all(self, pattern: str): ...
81+
def copy(self) -> RcParams: ...
82+
83+
def rc_params(fail_on_error: bool = ...) -> RcParams: ...
84+
def rc_params_from_file(fname: str | Path | os.PathLike, fail_on_error: bool = ..., use_default_template: bool = ...) -> RcParams: ...
85+
86+
rcParamsDefault: RcParams
87+
rcParams: RcParams
88+
rcParamsOrig: RcParams
89+
defaultParams: dict[str, Any]
90+
91+
def rc(group: str, **kwargs) -> None: ...
92+
def rcdefaults() -> None: ...
93+
def rc_file_defaults() -> None: ...
94+
def rc_file(fname: str | Path | os.PathLike, *, use_default_template: bool = ...) -> None: ...
95+
96+
@contextlib.contextmanager
97+
def rc_context(rc: dict[str, Any] | None = ..., fname: str | Path | os.PathLike | None = ...): ...
98+
99+
def use(backend: str, *, force: bool = ...) -> None: ...
100+
def get_backend() -> str: ...
101+
def interactive(b: bool) -> None: ...
102+
def is_interactive() -> bool: ...
103+
104+
default_test_modules: list[str]
105+
106+
def _preprocess_data(func: Callable | None = ..., *, replace_names: list[str] | None = ..., label_namer: str | None = ...) -> Callable: ...
107+
108+
from matplotlib.cm import _colormaps as colormaps
109+
from matplotlib.colors import _color_sequences as color_sequences
110+

‎lib/matplotlib/tests/test_colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_colors.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010

1111
from numpy.testing import assert_array_equal, assert_array_almost_equal
1212

13-
from matplotlib import cbook, cm, cycler
13+
from matplotlib import cbook, cm
1414
import matplotlib
1515
import matplotlib as mpl
1616
import matplotlib.colors as mcolors
1717
import matplotlib.colorbar as mcolorbar
1818
import matplotlib.pyplot as plt
1919
import matplotlib.scale as mscale
20+
from matplotlib.rcsetup import cycler
2021
from matplotlib.testing.decorators import image_comparison, check_figures_equal
2122

2223

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.