forked from bschnurr/python-type-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunits.pyi
More file actions
37 lines (31 loc) · 982 Bytes
/
Copy pathunits.pyi
File metadata and controls
37 lines (31 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from typing import Iterable, Sequence
from ._typing import *
from .ticker import Formatter, Locator
from .axis import Axis
from datetime import date
class ConversionError(TypeError): ...
class AxisInfo:
def __init__(
self,
majloc: Locator = ...,
minloc: Locator = ...,
majfmt: Formatter = ...,
minfmt: Formatter = ...,
label: str | None = ...,
default_limits: Sequence[date] = ...,
) -> None: ...
class ConversionInterface:
@staticmethod
def axisinfo(unit, axis: Axis) -> AxisInfo: ...
@staticmethod
def default_units(x, axis: Axis): ...
@staticmethod
def convert(obj, unit, axis: Axis): ...
@staticmethod
def is_numlike(x: str) -> bool: ...
class DecimalConverter(ConversionInterface):
@staticmethod
def convert(value: Decimal | Iterable, unit, axis: Axis): ...
class Registry(dict):
def get_converter(self, x) -> ConversionInterface | None: ...
registry: dict = ...