pysmo.typing
Annotated type aliases that document value constraints.
Each alias pairs a base type with an
annotated_types
constraint. They are used for attribute and parameter annotations where a
value has to satisfy more than its type, and the constraint is shown in the
API reference.
Type Aliases:
| Name | Description |
|---|---|
NegativeNumber |
Number less than 0. |
NegativeTimedelta |
Timedelta less than 0. |
NonNegativeNumber |
Number greater than or equal to 0. |
NonNegativeTimedelta |
Timedelta greater than or equal to 0. |
NonPositiveTimedelta |
Timedelta less than or equal to 0. |
NonZeroNumber |
Number other than 0, of either sign. |
PositiveInt |
Integer greater than 0. |
PositiveNumber |
Number greater than 0. |
PositiveTimedelta |
Timedelta greater than 0. |
UnitFloat |
Number between 0 and 1, inclusive. |
UtcTimestamp |
Timestamp with a UTC timezone. |
NonNegativeNumber
Number greater than or equal to 0.
NonNegativeTimedelta
Timedelta greater than or equal to 0.
NonPositiveTimedelta
Timedelta less than or equal to 0.
NonZeroNumber
Number other than 0, of either sign.
UnitFloat
Number between 0 and 1, inclusive.