# build-aux/mypy-stubs/xlrd/formula.pyi - Type stubs for xlrd # # Copyright (C) 2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later import typing import xlrd.book __all__ = [ # okinds "oBOOL", "oERR", "oNUM", "oREF", "oREL", "oSTRG", "oUNK", "okind_dict", # FMLA_TYPE_* "FMLA_TYPE_CELL", "FMLA_TYPE_SHARED", "FMLA_TYPE_ARRAY", "FMLA_TYPE_COND_FMT", "FMLA_TYPE_DATA_VAL", "FMLA_TYPE_NAME", # classes "Operand", "Ref3D", # functions "decompile_formula", "dump_formula", "evaluate_name_formula", "rangename3d", "rangename3drel", "cellname", "cellnameabs", "colname", ] oBOOL: int = 3 oERR: int = 4 oMSNG: int = 5 oNUM: int = 2 oREF: int = -1 oREL: int = -2 oSTRG: int = 1 oUNK: int = 0 okind_dict: dict[int, str] type _k = typing.Literal[3, 4, 5, 2, -1, -2, 1, 0] type _vBOOL = typing.Literal[0, 1] type _vERR = None | int type _vMSNG = None type _vNUM = float type _vREF = None | list[Ref3D] type _vREL = None | list[Ref3D] type _vSTRG = str type _vUNK = None type _v = _vBOOL | _vERR | _vMSNG | _vNUM | _vREF | _vREL | _vSTRG | _vUNK FMLA_TYPE_CELL: int FMLA_TYPE_SHARED: int FMLA_TYPE_ARRAY: int FMLA_TYPE_COND_FMT: int FMLA_TYPE_DATA_VAL: int FMLA_TYPE_NAME: int class Operand: value: _v kind: _k text: str rank: int @typing.overload def __init__( self, akind: typing.Literal[None] = None, avalue: None = None, arank: int = 0, atext: str = "?", ) -> None: ... @typing.overload def __init__( self, akind: typing.Literal[3], avalue: _vBOOL | None = None, arank: int = 0, atext: str = "?", ) -> None: ... @typing.overload def __init__( self, akind: typing.Literal[4], avalue: _vERR | None = None, arank: int = 0, atext: str = "?", ) -> None: ... @typing.overload def __init__( self, akind: typing.Literal[5], avalue: _vMSNG | None = None, arank: int = 0, atext: str = "?", ) -> None: ... @typing.overload def __init__( self, akind: typing.Literal[2], avalue: _vNUM | None = None, arank: int = 0, atext: str = "?", ) -> None: ... @typing.overload def __init__( self, akind: typing.Literal[-1], avalue: _vREF | None = None, arank: int = 0, atext: str = "?", ) -> None: ... @typing.overload def __init__( self, akind: typing.Literal[-2], avalue: _vREL | None = None, arank: int = 0, atext: str = "?", ) -> None: ... @typing.overload def __init__( self, akind: typing.Literal[1], avalue: _vSTRG | None = None, arank: int = 0, atext: str = "?", ) -> None: ... @typing.overload def __init__( self, akind: typing.Literal[0], avalue: _vUNK | None = None, arank: int = 0, atext: str = "?", ) -> None: ... class Ref3D(tuple): # type: ignore coords: tuple[int, int, int, int, int, int] relflags: tuple[_vBOOL, _vBOOL, _vBOOL, _vBOOL, _vBOOL, _vBOOL] def __init__( self, atuple: tuple[ int, int, int, int, int, int, _vBOOL, _vBOOL, _vBOOL, _vBOOL, _vBOOL, _vBOOL ], ) -> None: ... def rangename3d(book: xlrd.book.Book, ref3d: Ref3D) -> str: ... def rangename3drel( book: xlrd.book.Book, ref3d: Ref3D, browx: int | None = None, bcolx: int | None = None, r1c1: bool | _vBOOL = 0, ) -> str: ... def cellname(rowx: int, colx: int) -> str: ... def cellnameabs(rowx: int, colx: int, r1c1: bool | _vBOOL = 0) -> str: ... def colname(colx: int) -> str: ...