Skip to content

Added pyphen#15645

Open
Tesla2000 wants to merge 2 commits intopython:mainfrom
Tesla2000:pyphen
Open

Added pyphen#15645
Tesla2000 wants to merge 2 commits intopython:mainfrom
Tesla2000:pyphen

Conversation

@Tesla2000
Copy link
Copy Markdown

The authors are oposed Kozea/Pyphen#81 (comment) to adding type hints directly

@Tesla2000 Tesla2000 marked this pull request as ready for review April 14, 2026 15:03
@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

cut: int

def __init__(self, pattern: str, alternative: str) -> None: ...
def __call__(self, value: str) -> int: ...
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def __call__(self, value: str) -> int: ...
def __call__(self, value: str | int) -> int: ...

Or even SupportsInt.

def __call__(self, value: str) -> int: ...

class DataInt(int):
def __new__(cls, value: int, data: Any = ..., reference: DataInt | None = ...) -> Self: ...
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the data attribute (which can be at least DataInt or None, possibly more types).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants