mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Complete openpyxl metaclasses (#10736)
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
from typing import Any, overload
|
||||
|
||||
class Singleton(type):
|
||||
def __init__(self, *args, **kw) -> None: ...
|
||||
def __call__(self, *args, **kw): ...
|
||||
@overload
|
||||
def __init__(self, __o: object) -> None: ...
|
||||
@overload
|
||||
def __init__(self, __name: str, __bases: tuple[type, ...], __dict: dict[str, Any], **kwds: Any) -> None: ...
|
||||
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
|
||||
|
||||
class Cached(type):
|
||||
def __init__(self, *args, **kw) -> None: ...
|
||||
def __call__(self, *args): ...
|
||||
@overload
|
||||
def __init__(self, __o: object) -> None: ...
|
||||
@overload
|
||||
def __init__(self, __name: str, __bases: tuple[type, ...], __dict: dict[str, Any], **kwds: Any) -> None: ...
|
||||
def __call__(self, *args: Any) -> Any: ...
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
|
||||
from .base import *
|
||||
from .sequence import Sequence as Sequence
|
||||
|
||||
class MetaStrict(type):
|
||||
def __new__(cls, clsname, bases, methods): ...
|
||||
def __new__(cls: type[Self], clsname: str, bases: tuple[type, ...], methods: dict[str, Descriptor[Incomplete]]) -> Self: ...
|
||||
|
||||
class MetaSerialisable(type):
|
||||
def __new__(cls, clsname, bases, methods): ...
|
||||
def __new__(cls: type[Self], clsname: str, bases: tuple[type, ...], methods: dict[str, Descriptor[Incomplete]]) -> Self: ...
|
||||
|
||||
class Strict(metaclass=MetaStrict): ...
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
|
||||
class AutoSlotProperties(type):
|
||||
def __new__(mcl, classname, bases, dictionary): ...
|
||||
def __new__(mcl: type[Self], classname: str, bases: tuple[type, ...], dictionary: dict[str, Incomplete]) -> Self: ...
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Incomplete, Unused
|
||||
from array import array
|
||||
from collections.abc import Iterable
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
from openpyxl.descriptors import Strict
|
||||
from openpyxl.descriptors.base import Bool, Integer, Typed, _ConvertibleToBool, _ConvertibleToInt
|
||||
@@ -16,21 +17,21 @@ class ArrayDescriptor:
|
||||
def __get__(self, instance: Serialisable | Strict, cls: Unused): ...
|
||||
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
|
||||
|
||||
class StyleArray(array[Incomplete]):
|
||||
class StyleArray(array[int]):
|
||||
tagname: ClassVar[str]
|
||||
fontId: Incomplete
|
||||
fillId: Incomplete
|
||||
borderId: Incomplete
|
||||
numFmtId: Incomplete
|
||||
protectionId: Incomplete
|
||||
alignmentId: Incomplete
|
||||
pivotButton: Incomplete
|
||||
quotePrefix: Incomplete
|
||||
xfId: Incomplete
|
||||
def __new__(cls, args=[0, 0, 0, 0, 0, 0, 0, 0, 0]): ...
|
||||
fontId: ArrayDescriptor
|
||||
fillId: ArrayDescriptor
|
||||
borderId: ArrayDescriptor
|
||||
numFmtId: ArrayDescriptor
|
||||
protectionId: ArrayDescriptor
|
||||
alignmentId: ArrayDescriptor
|
||||
pivotButton: ArrayDescriptor
|
||||
quotePrefix: ArrayDescriptor
|
||||
xfId: ArrayDescriptor
|
||||
def __new__(cls, args: bytes | bytearray | Iterable[int] = [0, 0, 0, 0, 0, 0, 0, 0, 0]) -> Self: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __copy__(self): ...
|
||||
def __deepcopy__(self, memo): ...
|
||||
def __copy__(self) -> StyleArray: ...
|
||||
def __deepcopy__(self, memo: Unused) -> StyleArray: ...
|
||||
|
||||
class CellStyle(Serialisable):
|
||||
tagname: ClassVar[str]
|
||||
|
||||
Reference in New Issue
Block a user