From 9aa5ff82d43435293acf0337fd069dce783176fc Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 13 Nov 2023 14:08:57 +0000 Subject: [3.12] gh-111681: minor fixes to typing doctests; remove unused imports in `test_typing` (#111682) (#112035) Co-authored-by: Alex Waygood Co-authored-by: Nikita Sobolev --- Doc/library/typing.rst | 2 +- Lib/test/test_typing.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 7b75094..b00eb93 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -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 diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 62fe00b..ca10a87 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -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 -- cgit v0.12