Skip to content

Wrong return type for Match.group() #3171

Closed

Description

@albertofaria

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

Metadata

Metadata

Assignees

Labels

stubs: false negativeType checkers do not report an error, but should

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions