File tree 2 files changed +14
-23
lines changed
Filter options
2 files changed +14
-23
lines changed
Original file line number Diff line number Diff line change 10
10
they define.
11
11
"""
12
12
13
- from enum import Enum , auto
13
+ from enum import Enum
14
14
from matplotlib import _docstring
15
15
16
16
17
- class __AutoStringNameEnum (Enum ):
18
- """Automate the ``name = 'name'`` part of making a (str, Enum)."""
19
-
20
-
21
17
class JoinStyle (str , Enum ):
22
18
"""
23
19
Define how the connection between two line segments is drawn.
@@ -73,12 +69,9 @@ class JoinStyle(str, Enum):
73
69
74
70
"""
75
71
76
- def _generate_next_value_ (name , start , count , last_values ):
77
- return name
78
-
79
- miter = auto ()
80
- round = auto ()
81
- bevel = auto ()
72
+ miter = "miter"
73
+ round = "round"
74
+ bevel = "bevel"
82
75
83
76
@staticmethod
84
77
def demo ():
@@ -148,12 +141,9 @@ class CapStyle(str, Enum):
148
141
CapStyle.demo()
149
142
150
143
"""
151
- def _generate_next_value_ (name , start , count , last_values ):
152
- return name
153
-
154
- butt = auto ()
155
- projecting = auto ()
156
- round = auto ()
144
+ butt = "butt"
145
+ projecting = "projecting"
146
+ round = "round"
157
147
158
148
@staticmethod
159
149
def demo ():
Original file line number Diff line number Diff line change @@ -3,16 +3,17 @@ from enum import Enum
3
3
4
4
5
5
class JoinStyle (str , Enum ):
6
- miter = cast ( str , ...)
7
- round = cast ( str , ...)
8
- bevel = cast ( str , ...)
6
+ miter = "miter"
7
+ round = "round"
8
+ bevel = "bevel"
9
9
@staticmethod
10
10
def demo () -> None : ...
11
11
12
12
13
13
class CapStyle (str , Enum ):
14
- butt = cast (str , ...)
15
- projecting = cast (str , ...)
16
- round = cast (str , ...)
14
+ butt = "butt"
15
+ projecting = "projecting"
16
+ round = "round"
17
+
17
18
@staticmethod
18
19
def demo () -> None : ...
You can’t perform that action at this time.
0 commit comments