From eff230eaee38379062fa4001ec4228f554e5c631 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Tue, 19 May 2026 09:32:13 +0200 Subject: [PATCH] Restore intentional typo (Cf. #2290) --- docs/guides/writing_stubs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/writing_stubs.rst b/docs/guides/writing_stubs.rst index 33be83db..9f46a94d 100644 --- a/docs/guides/writing_stubs.rst +++ b/docs/guides/writing_stubs.rst @@ -811,7 +811,7 @@ This avoids forcing the user to check for ``None``:: match = re.fullmatch(r"\d+_(.*)", some_string) assert match is not None name_group = match.group(1) # The user knows that this will never be None - name_group.upper() # This typo will be flagged by the type checker + name_group.uper() # This typo will be flagged by the type checker In this case, the user of ``match.group()`` must be prepared to handle a ``str``, but type checkers are happy with ``if name_group is None`` checks, because we're