Skip to content

Wrong return type for Match.group() #3171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
albertofaria opened this issue Aug 7, 2019 · 0 comments · Fixed by #3172
Closed

Wrong return type for Match.group() #3171

albertofaria opened this issue Aug 7, 2019 · 0 comments · Fixed by #3172
Assignees
Labels
stubs: false negative Type checkers do not report an error, but should

Comments

@albertofaria
Copy link

Return type annotations for methods Match.group() should reflect the fact that None can be returned, see https://docs.python.org/3/library/re.html#re.Match.group.

def group(self, group1: int = ...) -> AnyStr: ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: false negative Type checkers do not report an error, but should
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants