Skip to content

Commit a4e6014

Browse files
committed
address feedback
1 parent 81a9010 commit a4e6014

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

stubs/pyphen/pyphen/__init__.pyi

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from collections.abc import Generator
22
from pathlib import Path
3-
from typing import Any
4-
from typing_extensions import Self
3+
from typing import SupportsInt
4+
from typing_extensions import Self, TypeAlias
55

66
__all__ = ("LANGUAGES", "Pyphen", "language_fallback")
77
LANGUAGES: dict[str, Path]
8+
_Data: TypeAlias = tuple[str, int, int]
89

910
def language_fallback(language: str) -> str: ...
1011

@@ -14,10 +15,12 @@ class AlternativeParser:
1415
cut: int
1516

1617
def __init__(self, pattern: str, alternative: str) -> None: ...
17-
def __call__(self, value: str) -> int: ...
18+
def __call__(self, value: str | SupportsInt) -> int: ...
1819

1920
class DataInt(int):
20-
def __new__(cls, value: int, data: Any = ..., reference: DataInt | None = ...) -> Self: ...
21+
data: _Data | None
22+
23+
def __new__(cls, value: int, data: _Data | None = ..., reference: DataInt | None = ...) -> Self: ...
2124

2225
class HyphDict:
2326
patterns: dict[str, tuple[int, tuple[int, ...]]]

0 commit comments

Comments
 (0)