We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05afd79 commit 3be5b1cCopy full SHA for 3be5b1c
docs/guides/writing_stubs.rst
@@ -811,7 +811,7 @@ This avoid forcing the user to check for ``None``::
811
match = re.fullmatch(r"\d+_(.*)", some_string)
812
assert match is not None
813
name_group = match.group(1) # The user knows that this will never be None
814
- return name_group.uper() # This typo will be flagged by the type checker
+ name_group.uper() # This typo will be flagged by the type checker
815
816
In this case, the user of ``match.group()`` must be prepared to handle a ``str``,
817
but type checkers are happy with ``if name_group is None`` checks, because we're
0 commit comments