From 2a1a2229cbb98c45354c714f97a90cfde8819c44 Mon Sep 17 00:00:00 2001 From: Stephen Morton Date: Sat, 16 Nov 2024 15:03:03 -0800 Subject: [PATCH] mark _codecs.EncodingMap as final (#13022) --- stdlib/_codecs.pyi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/_codecs.pyi b/stdlib/_codecs.pyi index ecf874d33..11c5d58a8 100644 --- a/stdlib/_codecs.pyi +++ b/stdlib/_codecs.pyi @@ -2,10 +2,13 @@ import codecs import sys from _typeshed import ReadableBuffer from collections.abc import Callable -from typing import Literal, overload +from typing import Literal, final, overload, type_check_only from typing_extensions import TypeAlias # This type is not exposed; it is defined in unicodeobject.c +# At runtime it calls itself builtins.EncodingMap +@final +@type_check_only class _EncodingMap: def size(self) -> int: ...