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

Method _validate_unit

lib/matplotlib/category.py:112–116  ·  view source on GitHub ↗
(unit)

Source from the content-addressed store, hash-verified

110
111 @staticmethod
112 def _validate_unit(unit):
113 if not hasattr(unit, '_mapping'):
114 raise ValueError(
115 f'Provided unit "{unit}" is not valid for a categorical '
116 'converter, as it does not have a _mapping attribute.')
117
118
119class StrCategoryLocator(ticker.Locator):

Callers 2

convertMethod · 0.80
axisinfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected