🌐 AI搜索 & 代理 主页
Skip to content

Commit 57f95dd

Browse files
committed
TYP: make helper enum even more private
This seems to placate mypy
1 parent 18d42a6 commit 57f95dd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/matplotlib/_enums.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from matplotlib import _docstring
1515

1616

17-
class _AutoStringNameEnum(Enum):
17+
class __AutoStringNameEnum(Enum):
1818
"""Automate the ``name = 'name'`` part of making a (str, Enum)."""
1919

2020
def _generate_next_value_(name, start, count, last_values):
@@ -24,7 +24,7 @@ def __hash__(self):
2424
return str(self).__hash__()
2525

2626

27-
class JoinStyle(str, _AutoStringNameEnum):
27+
class JoinStyle(str, __AutoStringNameEnum):
2828
"""
2929
Define how the connection between two line segments is drawn.
3030
@@ -116,7 +116,7 @@ def plot_angle(ax, x, y, angle, style):
116116
+ "}"
117117

118118

119-
class CapStyle(str, _AutoStringNameEnum):
119+
class CapStyle(str, __AutoStringNameEnum):
120120
r"""
121121
Define how the two endpoints (caps) of an unclosed line are drawn.
122122

lib/matplotlib/_enums.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
from typing import cast
22
from enum import Enum
33

4-
class _AutoStringNameEnum(Enum):
4+
class __AutoStringNameEnum(Enum):
55
def __hash__(self) -> int: ...
66

7-
class JoinStyle(str, _AutoStringNameEnum):
7+
class JoinStyle(str, __AutoStringNameEnum):
88
miter = cast(str, ...)
99
round = cast(str, ...)
1010
bevel = cast(str, ...)
1111
@staticmethod
1212
def demo() -> None: ...
1313

14-
class CapStyle(str, _AutoStringNameEnum):
14+
class CapStyle(str, __AutoStringNameEnum):
1515
butt = cast(str, ...)
1616
projecting = cast(str, ...)
1717
round = cast(str, ...)

0 commit comments

Comments
 (0)