mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-27 13:22:11 +08:00
Use Final for xml constants (#12455)
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import sys
|
||||
from _typeshed import FileDescriptorOrPath
|
||||
from collections.abc import Callable
|
||||
from typing import Final
|
||||
from xml.etree.ElementTree import Element
|
||||
|
||||
XINCLUDE: str
|
||||
XINCLUDE_INCLUDE: str
|
||||
XINCLUDE_FALLBACK: str
|
||||
XINCLUDE: Final[str]
|
||||
XINCLUDE_INCLUDE: Final[str]
|
||||
XINCLUDE_FALLBACK: Final[str]
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
DEFAULT_MAX_INCLUSION_DEPTH: int
|
||||
DEFAULT_MAX_INCLUSION_DEPTH: Final = 6
|
||||
|
||||
class FatalIncludeError(SyntaxError): ...
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import sys
|
||||
from _collections_abc import dict_keys
|
||||
from _typeshed import FileDescriptorOrPath, ReadableBuffer, SupportsRead, SupportsWrite
|
||||
from collections.abc import Callable, Generator, ItemsView, Iterable, Iterator, Mapping, Sequence
|
||||
from typing import Any, Literal, SupportsIndex, TypeVar, overload
|
||||
from typing import Any, Final, Literal, SupportsIndex, TypeVar, overload
|
||||
from typing_extensions import TypeAlias, TypeGuard, deprecated
|
||||
|
||||
__all__ = [
|
||||
@@ -41,7 +41,7 @@ _FileRead: TypeAlias = FileDescriptorOrPath | SupportsRead[bytes] | SupportsRead
|
||||
_FileWriteC14N: TypeAlias = FileDescriptorOrPath | SupportsWrite[bytes]
|
||||
_FileWrite: TypeAlias = _FileWriteC14N | SupportsWrite[str]
|
||||
|
||||
VERSION: str
|
||||
VERSION: Final[str]
|
||||
|
||||
class ParseError(SyntaxError):
|
||||
code: int
|
||||
|
||||
Reference in New Issue
Block a user