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 e1c76a0

Browse filesBrowse files
authored
Merge pull request #29344 from timhoffm/linestyletype
MNT: Coerce LineStyleType strings to Literal
2 parents cd6fb82 + cf0c262 commit e1c76a0
Copy full SHA for e1c76a0

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎lib/matplotlib/typing.py

Copy file name to clipboardExpand all lines: lib/matplotlib/typing.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
RGBAColourType: TypeAlias = RGBAColorType
3838
ColourType: TypeAlias = ColorType
3939

40-
LineStyleType: TypeAlias = str | tuple[float, Sequence[float]]
40+
LineStyleType: TypeAlias = (
41+
Literal["-", "solid", "--", "dashed", "-.", "dashdot", ":", "dotted",
42+
"", "none", " ", "None"] |
43+
tuple[float, Sequence[float]]
44+
)
4145
DrawStyleType: TypeAlias = Literal["default", "steps", "steps-pre", "steps-mid",
4246
"steps-post"]
4347
MarkEveryType: TypeAlias = (

0 commit comments

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