(self, x, pos=None)
| 920 | self._locator = locator |
| 921 | |
| 922 | def __call__(self, x, pos=None): |
| 923 | try: |
| 924 | locator_unit_scale = float(self._locator._get_unit()) |
| 925 | except AttributeError: |
| 926 | locator_unit_scale = 1 |
| 927 | # Pick the first scale which is greater than the locator unit. |
| 928 | fmt = next((fmt for scale, fmt in sorted(self.scaled.items()) |
| 929 | if scale >= locator_unit_scale), |
| 930 | self.defaultfmt) |
| 931 | |
| 932 | if isinstance(fmt, str): |
| 933 | self._formatter = DateFormatter(fmt, self._tz, usetex=self._usetex) |
| 934 | result = self._formatter(x, pos) |
| 935 | elif callable(fmt): |
| 936 | result = fmt(x, pos) |
| 937 | else: |
| 938 | raise TypeError(f'Unexpected type passed to {self!r}.') |
| 939 | |
| 940 | return result |
| 941 | |
| 942 | |
| 943 | class rrulewrapper: |
nothing calls this directly
no test coverage detected