(unit)
| 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 | |
| 119 | class StrCategoryLocator(ticker.Locator): |