|
14 | 14 | from matplotlib import _docstring |
15 | 15 |
|
16 | 16 |
|
17 | | -class _AutoStringNameEnum(Enum): |
| 17 | +class __AutoStringNameEnum(Enum): |
18 | 18 | """Automate the ``name = 'name'`` part of making a (str, Enum).""" |
19 | 19 |
|
20 | | - def _generate_next_value_(name, start, count, last_values): |
21 | | - return name |
22 | | - |
23 | | - def __hash__(self): |
24 | | - return str(self).__hash__() |
25 | 20 |
|
26 | | - |
27 | | -class JoinStyle(str, _AutoStringNameEnum): |
| 21 | +class JoinStyle(str, Enum): |
28 | 22 | """ |
29 | 23 | Define how the connection between two line segments is drawn. |
30 | 24 |
|
@@ -79,6 +73,9 @@ class JoinStyle(str, _AutoStringNameEnum): |
79 | 73 |
|
80 | 74 | """ |
81 | 75 |
|
| 76 | + def _generate_next_value_(name, start, count, last_values): |
| 77 | + return name |
| 78 | + |
82 | 79 | miter = auto() |
83 | 80 | round = auto() |
84 | 81 | bevel = auto() |
@@ -116,7 +113,7 @@ def plot_angle(ax, x, y, angle, style): |
116 | 113 | + "}" |
117 | 114 |
|
118 | 115 |
|
119 | | -class CapStyle(str, _AutoStringNameEnum): |
| 116 | +class CapStyle(str, Enum): |
120 | 117 | r""" |
121 | 118 | Define how the two endpoints (caps) of an unclosed line are drawn. |
122 | 119 |
|
@@ -151,6 +148,9 @@ class CapStyle(str, _AutoStringNameEnum): |
151 | 148 | CapStyle.demo() |
152 | 149 |
|
153 | 150 | """ |
| 151 | + def _generate_next_value_(name, start, count, last_values): |
| 152 | + return name |
| 153 | + |
154 | 154 | butt = auto() |
155 | 155 | projecting = auto() |
156 | 156 | round = auto() |
|
0 commit comments