From 540a6b25bf676368721d2cc0d4bd935b50a8f92b Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 19 Jul 2022 15:05:09 +0100 Subject: [PATCH] Improve `urllib.parse.urldefrag` (#8204) Fixes #2477 --- stdlib/urllib/parse.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/urllib/parse.pyi b/stdlib/urllib/parse.pyi index 49f3825e0..7e1ec903a 100644 --- a/stdlib/urllib/parse.pyi +++ b/stdlib/urllib/parse.pyi @@ -66,7 +66,9 @@ class _NetlocResultMixinBase(Generic[AnyStr]): class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ... class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes): ... -class _DefragResultBase(tuple[Any, ...], Generic[AnyStr]): +# Ideally this would be a generic fixed-length tuple, +# but mypy doesn't support that yet: https://github.com/python/mypy/issues/685#issuecomment-992014179 +class _DefragResultBase(tuple[AnyStr, ...], Generic[AnyStr]): if sys.version_info >= (3, 10): __match_args__ = ("url", "fragment") @property