Skip to content

Commit 7b05193

Browse files
committed
No need to check that strings are hashable.
1 parent e12f102 commit 7b05193

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/matplotlib/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def set_linestyle(self, ls):
511511
The line style.
512512
"""
513513
try:
514-
if isinstance(ls, six.string_types) and cbook.is_hashable(ls):
514+
if isinstance(ls, six.string_types):
515515
ls = cbook.ls_mapper.get(ls, ls)
516516
dashes = [mlines._get_dash_pattern(ls)]
517517
else:

lib/matplotlib/lines.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from . import artist, colors as mcolors, docstring, rcParams
1717
from .artist import Artist, allow_rasterization
1818
from .cbook import (
19-
iterable, is_numlike, ls_mapper, ls_mapper_r, is_hashable, STEP_LOOKUP_MAP)
19+
iterable, is_numlike, ls_mapper, ls_mapper_r, STEP_LOOKUP_MAP)
2020
from .markers import MarkerStyle
2121
from .path import Path
2222
from .transforms import Bbox, TransformedPath, IdentityTransform
@@ -33,10 +33,9 @@
3333

3434
def _get_dash_pattern(style):
3535
"""Convert linestyle -> dash pattern
36-
3736
"""
3837
# go from short hand -> full strings
39-
if isinstance(style, six.string_types) and is_hashable(style):
38+
if isinstance(style, six.string_types):
4039
style = ls_mapper.get(style, style)
4140
# un-dashed styles
4241
if style in ['solid', 'None']:

0 commit comments

Comments
 (0)