-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed as not planned
Closed as not planned
Copy link
Description
Is there a reason why the return annotation is AnyStr | Any
instead of AnyStr | None
in the snippets below?
Lines 72 to 77 in b1cb9c8
@overload | |
def group(self, __group: Literal[0] = ...) -> AnyStr: ... | |
@overload | |
def group(self, __group: str | int) -> AnyStr | Any: ... | |
@overload | |
def group(self, __group1: str | int, __group2: str | int, *groups: str | int) -> tuple[AnyStr | Any, ...]: ... |
Lines 96 to 99 in b1cb9c8
@overload | |
def __getitem__(self, __key: Literal[0]) -> AnyStr: ... | |
@overload | |
def __getitem__(self, __key: int | str) -> AnyStr | Any: ... |
If not, I'd like to submit a PR to change the return type hints accordingly.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels