Add @final to many unsubclassable stdlib classes (#6299)

This commit is contained in:
Alex Waygood
2021-11-15 13:45:24 +00:00
committed by GitHub
parent 5b94c6a94d
commit 10c9d8cfce
17 changed files with 48 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import pyexpat.errors as errors
import pyexpat.model as model
from _typeshed import SupportsRead
from typing import Any, Callable, Optional, Tuple
from typing_extensions import final
EXPAT_VERSION: str # undocumented
version_info: tuple[int, int, int] # undocumented
@@ -21,6 +22,7 @@ XML_PARAM_ENTITY_PARSING_ALWAYS: int
_Model = Tuple[int, int, Optional[str], Tuple[Any, ...]]
@final
class XMLParserType(object):
def Parse(self, __data: str | bytes, __isfinal: bool = ...) -> int: ...
def ParseFile(self, __file: SupportsRead[bytes]) -> int: ...