Skip to content

Commit 4894099

Browse files
committed
REORG: _types -> _enums
1 parent 3c19b1f commit 4894099

File tree

12 files changed

+19
-21
lines changed

12 files changed

+19
-21
lines changed

doc/api/_types.rst renamed to doc/api/_enums.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
**********************
2-
``matplotlib._types``
2+
``matplotlib._enums``
33
**********************
44

5-
.. automodule:: matplotlib._types
5+
.. automodule:: matplotlib._enums
66
:no-members:
77

88
.. autoclass:: JoinStyle

doc/api/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Matplotlib consists of the following submodules:
8989
dates_api.rst
9090
docstring_api.rst
9191
dviread.rst
92+
_enums.rst
9293
figure_api.rst
9394
font_manager_api.rst
9495
fontconfig_pattern_api.rst
@@ -124,7 +125,6 @@ Matplotlib consists of the following submodules:
124125
transformations.rst
125126
tri_api.rst
126127
type1font.rst
127-
_types.rst
128128
units_api.rst
129129
widgets_api.rst
130130
_api_api.rst

examples/lines_bars_and_markers/capstyle.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
CapStyle
44
=========
55
6-
The `matplotlib._types.CapStyle` controls how Matplotlib draws the corners
6+
The `matplotlib._enums.CapStyle` controls how Matplotlib draws the corners
77
where two different line segments meet. For more details, see the
8-
`~matplotlib._types.CapStyle` docs.
8+
`~matplotlib._enums.CapStyle` docs.
99
"""
1010

1111
import matplotlib.pyplot as plt
12-
from matplotlib._types import CapStyle
12+
from matplotlib._enums import CapStyle
1313

1414
CapStyle.demo()
1515
plt.show()

examples/lines_bars_and_markers/joinstyle.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
JoinStyle
44
=========
55
6-
The `matplotlib._types.JoinStyle` controls how Matplotlib draws the corners
6+
The `matplotlib._enums.JoinStyle` controls how Matplotlib draws the corners
77
where two different line segments meet. For more details, see the
8-
`~matplotlib._types.JoinStyle` docs.
8+
`~matplotlib._enums.JoinStyle` docs.
99
"""
1010

1111
import matplotlib.pyplot as plt
12-
from matplotlib._types import JoinStyle
12+
from matplotlib._enums import JoinStyle
1313

1414
JoinStyle.demo()
1515
plt.show()

lib/matplotlib/_types.py renamed to lib/matplotlib/_enums.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Matplotlib API concepts that would not otherwise merit a dedicated class.
2+
Enums representing sets of strings that Matplotlib uses as input parameters.
33
44
Matplotlib often uses simple data types like strings or tuples to define a
55
concept; e.g. the line capstyle can be specified as one of 'butt', 'round',
@@ -91,7 +91,7 @@ class JoinStyle(str, _AutoStringNameEnum):
9191
.. plot::
9292
:alt: Demo of possible JoinStyle's
9393
94-
from matplotlib._types import JoinStyle
94+
from matplotlib._enums import JoinStyle
9595
JoinStyle.demo()
9696
9797
"""
@@ -165,7 +165,7 @@ class CapStyle(str, _AutoStringNameEnum):
165165
.. plot::
166166
:alt: Demo of possible CapStyle's
167167
168-
from matplotlib._types import CapStyle
168+
from matplotlib._enums import CapStyle
169169
CapStyle.demo()
170170
171171
"""

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
from matplotlib.cbook import _setattr_cm
5252
from matplotlib.path import Path
5353
from matplotlib.transforms import Affine2D
54-
from matplotlib._types import JoinStyle, CapStyle
54+
from matplotlib._enums import JoinStyle, CapStyle
5555

5656

5757
_log = logging.getLogger(__name__)

lib/matplotlib/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import matplotlib as mpl
1717
from . import (_api, _path, artist, cbook, cm, colors as mcolors, docstring,
1818
hatch as mhatch, lines as mlines, path as mpath, transforms)
19-
from ._types import JoinStyle, CapStyle
19+
from ._enums import JoinStyle, CapStyle
2020
import warnings
2121

2222

lib/matplotlib/lines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from .markers import MarkerStyle
1818
from .path import Path
1919
from .transforms import Bbox, BboxTransformTo, TransformedPath
20-
from ._types import JoinStyle, CapStyle
20+
from ._enums import JoinStyle, CapStyle
2121

2222
# Imported here for backward compatibility, even though they don't
2323
# really belong.

lib/matplotlib/markers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
from . import _api, cbook, rcParams
135135
from .path import Path
136136
from .transforms import IdentityTransform, Affine2D
137-
from ._types import JoinStyle, CapStyle
137+
from ._enums import JoinStyle, CapStyle
138138

139139
# special-purpose marker identifiers:
140140
(TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN,

lib/matplotlib/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
get_parallels, inside_circle, make_wedged_bezier2,
1717
split_bezier_intersecting_with_closedpath, split_path_inout)
1818
from .path import Path
19-
from ._types import JoinStyle, CapStyle
19+
from ._enums import JoinStyle, CapStyle
2020

2121

2222
@cbook._define_aliases({

lib/matplotlib/rcsetup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from matplotlib.cbook import ls_mapper
2727
from matplotlib.colors import Colormap, is_color_like
2828
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
29-
from matplotlib._types import JoinStyle, CapStyle
29+
from matplotlib._enums import JoinStyle, CapStyle
3030

3131
# Don't let the original cycler collide with our validating cycler
3232
from cycler import Cycler, cycler as ccycler

lib/matplotlib/tests/test_collections.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
import matplotlib as mpl
99
import matplotlib.pyplot as plt
1010
import matplotlib.collections as mcollections
11-
import matplotlib.transforms as mtransforms
1211
from matplotlib.collections import (Collection, LineCollection,
1312
EventCollection, PolyCollection)
14-
import matplotlib.pyplot as plt
15-
from matplotlib.testing.decorators import check_figures_equal, image_comparison
1613
import matplotlib.transforms as mtransforms
14+
from matplotlib.testing.decorators import check_figures_equal, image_comparison
1715

1816

1917
def generate_EventCollection_plot():

0 commit comments

Comments
 (0)