mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-29 19:26:45 +08:00
Add @disjoint_base decorator in the stdlib (#14599)
And fix some other new stubtest finds.
This commit is contained in:
@@ -1,15 +1,22 @@
|
||||
import sys
|
||||
from re import error as error
|
||||
from typing import Final
|
||||
from typing_extensions import Self
|
||||
from typing_extensions import Self, disjoint_base
|
||||
|
||||
MAXGROUPS: Final[int]
|
||||
|
||||
MAGIC: Final[int]
|
||||
|
||||
class _NamedIntConstant(int):
|
||||
name: str
|
||||
def __new__(cls, value: int, name: str) -> Self: ...
|
||||
if sys.version_info >= (3, 12):
|
||||
class _NamedIntConstant(int):
|
||||
name: str
|
||||
def __new__(cls, value: int, name: str) -> Self: ...
|
||||
|
||||
else:
|
||||
@disjoint_base
|
||||
class _NamedIntConstant(int):
|
||||
name: str
|
||||
def __new__(cls, value: int, name: str) -> Self: ...
|
||||
|
||||
MAXREPEAT: Final[_NamedIntConstant]
|
||||
OPCODES: list[_NamedIntConstant]
|
||||
|
||||
Reference in New Issue
Block a user