MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _str_is_convertible

Method _str_is_convertible

lib/matplotlib/category.py:185–197  ·  view source on GitHub ↗

Helper method to check whether a string can be parsed as float or date.

(val)

Source from the content-addressed store, hash-verified

183
184 @staticmethod
185 def _str_is_convertible(val):
186 """
187 Helper method to check whether a string can be parsed as float or date.
188 """
189 try:
190 float(val)
191 except ValueError:
192 try:
193 dateutil.parser.parse(val)
194 except (ValueError, TypeError):
195 # TypeError if dateutil >= 2.8.1 else ValueError
196 return False
197 return True
198
199 def update(self, data):
200 """

Callers 1

updateMethod · 0.95

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected