mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 05:54:02 +08:00
[stdlib] Mark constants as Final (#14577)
This commit is contained in:
+16
-16
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Literal
|
||||
from typing import Final, Literal
|
||||
|
||||
__all__ = [
|
||||
"cmp_op",
|
||||
@@ -24,24 +24,24 @@ if sys.version_info >= (3, 13):
|
||||
__all__ += ["hasjump"]
|
||||
|
||||
cmp_op: tuple[Literal["<"], Literal["<="], Literal["=="], Literal["!="], Literal[">"], Literal[">="]]
|
||||
hasconst: list[int]
|
||||
hasname: list[int]
|
||||
hasjrel: list[int]
|
||||
hasjabs: list[int]
|
||||
haslocal: list[int]
|
||||
hascompare: list[int]
|
||||
hasfree: list[int]
|
||||
hasconst: Final[list[int]]
|
||||
hasname: Final[list[int]]
|
||||
hasjrel: Final[list[int]]
|
||||
hasjabs: Final[list[int]]
|
||||
haslocal: Final[list[int]]
|
||||
hascompare: Final[list[int]]
|
||||
hasfree: Final[list[int]]
|
||||
if sys.version_info >= (3, 12):
|
||||
hasarg: list[int]
|
||||
hasexc: list[int]
|
||||
hasarg: Final[list[int]]
|
||||
hasexc: Final[list[int]]
|
||||
else:
|
||||
hasnargs: list[int]
|
||||
hasnargs: Final[list[int]]
|
||||
if sys.version_info >= (3, 13):
|
||||
hasjump: list[int]
|
||||
opname: list[str]
|
||||
hasjump: Final[list[int]]
|
||||
opname: Final[list[str]]
|
||||
|
||||
opmap: dict[str, int]
|
||||
HAVE_ARGUMENT: int
|
||||
EXTENDED_ARG: int
|
||||
opmap: Final[dict[str, int]]
|
||||
HAVE_ARGUMENT: Final = 43
|
||||
EXTENDED_ARG: Final = 69
|
||||
|
||||
def stack_effect(opcode: int, oparg: int | None = None, /, *, jump: bool | None = None) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user