]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-111681: minor fixes to typing doctests; remove unused imports in `test_typi...
authorAlex Waygood <Alex.Waygood@Gmail.com>
Mon, 13 Nov 2023 14:08:57 +0000 (14:08 +0000)
committerGitHub <noreply@github.com>
Mon, 13 Nov 2023 14:08:57 +0000 (14:08 +0000)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Doc/library/typing.rst
Lib/test/test_typing.py

index 7b75094b9da0f66cbf5f25e01d019736c195b435..b00eb93f32ece4acd767b5785d96c84ed88d730f 100644 (file)
@@ -1941,7 +1941,7 @@ without the dedicated syntax, as documented below.
 
    .. doctest::
 
-      >>> from typing import ParamSpec
+      >>> from typing import ParamSpec, get_origin
       >>> P = ParamSpec("P")
       >>> get_origin(P.args) is P
       True
index 62fe00b0a02f28b02e8212885a1ba3a3d1e2ffd3..ca10a87b06130d7066961f256dcb6cd301ff13ec 100644 (file)
@@ -10,7 +10,7 @@ import pickle
 import re
 import sys
 import warnings
-from unittest import TestCase, main, skipUnless, skip
+from unittest import TestCase, main, skip
 from unittest.mock import patch
 from copy import copy, deepcopy
 
@@ -45,7 +45,7 @@ import typing
 import weakref
 import types
 
-from test.support import import_helper, captured_stderr, cpython_only
+from test.support import captured_stderr, cpython_only
 from test.typinganndata import mod_generics_cache, _typed_dict_helper