Skip to content

Commit fe3b95c

Browse files
authored
Fix input types of humanize functions (#335)
1 parent d0f9730 commit fe3b95c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
from datetime import date, datetime as datetime
2-
from decimal import Decimal
3-
from typing import Any, Optional, Union
2+
from typing import Any, Optional, SupportsInt, Union
43

54
register: Any
65

7-
def ordinal(value: Optional[str]) -> Optional[str]: ...
8-
def intcomma(value: Optional[Union[Decimal, float, str]], use_l10n: bool = ...) -> str: ...
6+
def ordinal(value: Optional[Union[str, SupportsInt]]) -> Optional[str]: ...
7+
def intcomma(value: Optional[Union[str, SupportsInt]], use_l10n: bool = ...) -> str: ...
98

109
intword_converters: Any
1110

12-
def intword(value: Optional[str]) -> Optional[Union[int, str]]: ...
13-
def apnumber(value: Optional[str]) -> Optional[Union[int, str]]: ...
11+
def intword(value: Optional[Union[str, SupportsInt]]) -> Optional[Union[int, str]]: ...
12+
def apnumber(value: Optional[Union[str, SupportsInt]]) -> Optional[Union[int, str]]: ...
1413
def naturalday(value: Optional[Union[date, str]], arg: None = ...) -> Optional[str]: ...
1514
def naturaltime(value: datetime) -> str: ...

0 commit comments

Comments
 (0)