Skip to content

Commit eff230e

Browse files
committed
Restore intentional typo (Cf. #2290)
1 parent 87a2fca commit eff230e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/guides/writing_stubs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ This avoids forcing the user to check for ``None``::
811811
match = re.fullmatch(r"\d+_(.*)", some_string)
812812
assert match is not None
813813
name_group = match.group(1) # The user knows that this will never be None
814-
name_group.upper() # This typo will be flagged by the type checker
814+
name_group.uper() # This typo will be flagged by the type checker
815815

816816
In this case, the user of ``match.group()`` must be prepared to handle a ``str``,
817817
but type checkers are happy with ``if name_group is None`` checks, because we're

0 commit comments

Comments
 (0)