diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index d4eb2899b..df6c965bd 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -44,6 +44,7 @@ "stubs/mock", "stubs/mysqlclient", "stubs/oauthlib", + "stubs/openpyxl", "stubs/Pillow", "stubs/paramiko", "stubs/prettytable", diff --git a/stubs/openpyxl/@tests/stubtest_allowlist.txt b/stubs/openpyxl/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..e72809b44 --- /dev/null +++ b/stubs/openpyxl/@tests/stubtest_allowlist.txt @@ -0,0 +1,2 @@ +# "cls" argument has wrong name in implementation. +openpyxl.descriptors.slots.AutoSlotProperties.__new__ diff --git a/stubs/openpyxl/METADATA.toml b/stubs/openpyxl/METADATA.toml new file mode 100644 index 000000000..4a8e90c0c --- /dev/null +++ b/stubs/openpyxl/METADATA.toml @@ -0,0 +1 @@ +version = "3.0.*" diff --git a/stubs/openpyxl/openpyxl/__init__.pyi b/stubs/openpyxl/openpyxl/__init__.pyi new file mode 100644 index 000000000..686516d3f --- /dev/null +++ b/stubs/openpyxl/openpyxl/__init__.pyi @@ -0,0 +1,13 @@ +from openpyxl.compat.numbers import NUMPY as NUMPY +from openpyxl.reader.excel import load_workbook as load_workbook +from openpyxl.workbook import Workbook as Workbook +from openpyxl.xml import DEFUSEDXML as DEFUSEDXML, LXML as LXML + +from ._constants import ( + __author__ as __author__, + __author_email__ as __author_email__, + __license__ as __license__, + __maintainer_email__ as __maintainer_email__, + __url__ as __url__, + __version__ as __version__, +) diff --git a/stubs/openpyxl/openpyxl/_constants.pyi b/stubs/openpyxl/openpyxl/_constants.pyi new file mode 100644 index 000000000..ed593cc2c --- /dev/null +++ b/stubs/openpyxl/openpyxl/_constants.pyi @@ -0,0 +1,7 @@ +__author__: str +__author_email__: str +__license__: str +__maintainer_email__: str +__url__: str +__version__: str +__python__: str diff --git a/stubs/openpyxl/openpyxl/cell/__init__.pyi b/stubs/openpyxl/openpyxl/cell/__init__.pyi new file mode 100644 index 000000000..cc5d82bfe --- /dev/null +++ b/stubs/openpyxl/openpyxl/cell/__init__.pyi @@ -0,0 +1,2 @@ +from .cell import Cell as Cell, MergedCell as MergedCell, WriteOnlyCell as WriteOnlyCell +from .read_only import ReadOnlyCell as ReadOnlyCell diff --git a/stubs/openpyxl/openpyxl/cell/_writer.pyi b/stubs/openpyxl/openpyxl/cell/_writer.pyi new file mode 100644 index 000000000..ef2dc335c --- /dev/null +++ b/stubs/openpyxl/openpyxl/cell/_writer.pyi @@ -0,0 +1,7 @@ +from typing import Any + +def etree_write_cell(xf, worksheet, cell, styled: Any | None = ...) -> None: ... +def lxml_write_cell(xf, worksheet, cell, styled: bool = ...) -> None: ... + +write_cell = lxml_write_cell +write_cell = etree_write_cell diff --git a/stubs/openpyxl/openpyxl/cell/cell.pyi b/stubs/openpyxl/openpyxl/cell/cell.pyi new file mode 100644 index 000000000..e5e137810 --- /dev/null +++ b/stubs/openpyxl/openpyxl/cell/cell.pyi @@ -0,0 +1,72 @@ +from typing import Any + +from openpyxl.styles.styleable import StyleableObject + +__docformat__: str +TIME_TYPES: Any +TIME_FORMATS: Any +STRING_TYPES: Any +KNOWN_TYPES: Any +ILLEGAL_CHARACTERS_RE: Any +ERROR_CODES: Any +TYPE_STRING: str +TYPE_FORMULA: str +TYPE_NUMERIC: str +TYPE_BOOL: str +TYPE_NULL: str +TYPE_INLINE: str +TYPE_ERROR: str +TYPE_FORMULA_CACHE_STRING: str +VALID_TYPES: Any + +def get_type(t, value): ... +def get_time_format(t): ... + +class Cell(StyleableObject): + row: Any + column: Any + data_type: str + def __init__( + self, worksheet, row: Any | None = ..., column: Any | None = ..., value: Any | None = ..., style_array: Any | None = ... + ) -> None: ... + @property + def coordinate(self): ... + @property + def col_idx(self): ... + @property + def column_letter(self): ... + @property + def encoding(self): ... + @property + def base_date(self): ... + def check_string(self, value): ... + def check_error(self, value): ... + @property + def value(self): ... + @value.setter + def value(self, value) -> None: ... + @property + def internal_value(self): ... + @property + def hyperlink(self): ... + @hyperlink.setter + def hyperlink(self, val) -> None: ... + @property + def is_date(self): ... + def offset(self, row: int = ..., column: int = ...): ... + @property + def comment(self): ... + @comment.setter + def comment(self, value) -> None: ... + +class MergedCell(StyleableObject): + data_type: str + comment: Any + hyperlink: Any + row: Any + column: Any + def __init__(self, worksheet, row: Any | None = ..., column: Any | None = ...) -> None: ... + coordinate: Any + value: Any + +def WriteOnlyCell(ws: Any | None = ..., value: Any | None = ...): ... diff --git a/stubs/openpyxl/openpyxl/cell/read_only.pyi b/stubs/openpyxl/openpyxl/cell/read_only.pyi new file mode 100644 index 000000000..1bd41de80 --- /dev/null +++ b/stubs/openpyxl/openpyxl/cell/read_only.pyi @@ -0,0 +1,51 @@ +from typing import Any + +class ReadOnlyCell: + parent: Any + row: Any + column: Any + data_type: Any + def __init__(self, sheet, row, column, value, data_type: str = ..., style_id: int = ...) -> None: ... + def __eq__(self, other): ... + def __ne__(self, other): ... + # defined twice in the implementation + @property + def coordinate(self): ... + @property + def column_letter(self): ... + @property + def style_array(self): ... + @property + def has_style(self): ... + @property + def number_format(self): ... + @property + def font(self): ... + @property + def fill(self): ... + @property + def border(self): ... + @property + def alignment(self): ... + @property + def protection(self): ... + @property + def is_date(self): ... + @property + def internal_value(self): ... + @property + def value(self): ... + @value.setter + def value(self, value) -> None: ... + +class EmptyCell: + value: Any + is_date: bool + font: Any + border: Any + fill: Any + number_format: Any + alignment: Any + data_type: str + +EMPTY_CELL: Any diff --git a/stubs/openpyxl/openpyxl/cell/text.pyi b/stubs/openpyxl/openpyxl/cell/text.pyi new file mode 100644 index 000000000..aa65e8029 --- /dev/null +++ b/stubs/openpyxl/openpyxl/cell/text.pyi @@ -0,0 +1,80 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable +from openpyxl.styles.fonts import Font + +class PhoneticProperties(Serialisable): + tagname: str + fontId: Any + type: Any + alignment: Any + def __init__(self, fontId: Any | None = ..., type: Any | None = ..., alignment: Any | None = ...) -> None: ... + +class PhoneticText(Serialisable): + tagname: str + sb: Any + eb: Any + t: Any + text: Any + def __init__(self, sb: Any | None = ..., eb: Any | None = ..., t: Any | None = ...) -> None: ... + +class InlineFont(Font): + tagname: str + rFont: Any + charset: Any + family: Any + b: Any + i: Any + strike: Any + outline: Any + shadow: Any + condense: Any + extend: Any + color: Any + sz: Any + u: Any + vertAlign: Any + scheme: Any + __elements__: Any + def __init__( + self, + rFont: Any | None = ..., + charset: Any | None = ..., + family: Any | None = ..., + b: Any | None = ..., + i: Any | None = ..., + strike: Any | None = ..., + outline: Any | None = ..., + shadow: Any | None = ..., + condense: Any | None = ..., + extend: Any | None = ..., + color: Any | None = ..., + sz: Any | None = ..., + u: Any | None = ..., + vertAlign: Any | None = ..., + scheme: Any | None = ..., + ) -> None: ... + +class RichText(Serialisable): + tagname: str + rPr: Any + font: Any + t: Any + text: Any + __elements__: Any + def __init__(self, rPr: Any | None = ..., t: Any | None = ...) -> None: ... + +class Text(Serialisable): + tagname: str + t: Any + plain: Any + r: Any + formatted: Any + rPh: Any + phonetic: Any + phoneticPr: Any + PhoneticProperties: Any + __elements__: Any + def __init__(self, t: Any | None = ..., r=..., rPh=..., phoneticPr: Any | None = ...) -> None: ... + @property + def content(self): ... diff --git a/stubs/openpyxl/openpyxl/chart/_3d.pyi b/stubs/openpyxl/openpyxl/chart/_3d.pyi new file mode 100644 index 000000000..3d2eeb4da --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/_3d.pyi @@ -0,0 +1,50 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class View3D(Serialisable): + tagname: str + rotX: Any + x_rotation: Any + hPercent: Any + height_percent: Any + rotY: Any + y_rotation: Any + depthPercent: Any + rAngAx: Any + right_angle_axes: Any + perspective: Any + extLst: Any + __elements__: Any + def __init__( + self, + rotX: int = ..., + hPercent: Any | None = ..., + rotY: int = ..., + depthPercent: Any | None = ..., + rAngAx: bool = ..., + perspective: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class Surface(Serialisable): + tagname: str + thickness: Any + spPr: Any + graphicalProperties: Any + pictureOptions: Any + extLst: Any + __elements__: Any + def __init__( + self, thickness: Any | None = ..., spPr: Any | None = ..., pictureOptions: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class _3DBase(Serialisable): + tagname: str + view3D: Any + floor: Any + sideWall: Any + backWall: Any + def __init__( + self, view3D: Any | None = ..., floor: Any | None = ..., sideWall: Any | None = ..., backWall: Any | None = ... + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/__init__.pyi b/stubs/openpyxl/openpyxl/chart/__init__.pyi new file mode 100644 index 000000000..e0d73d198 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/__init__.pyi @@ -0,0 +1,15 @@ +from .area_chart import AreaChart as AreaChart, AreaChart3D as AreaChart3D +from .bar_chart import BarChart as BarChart, BarChart3D as BarChart3D +from .bubble_chart import BubbleChart as BubbleChart +from .line_chart import LineChart as LineChart, LineChart3D as LineChart3D +from .pie_chart import ( + DoughnutChart as DoughnutChart, + PieChart as PieChart, + PieChart3D as PieChart3D, + ProjectedPieChart as ProjectedPieChart, +) +from .radar_chart import RadarChart as RadarChart +from .reference import Reference as Reference +from .scatter_chart import ScatterChart as ScatterChart +from .stock_chart import StockChart as StockChart +from .surface_chart import SurfaceChart as SurfaceChart, SurfaceChart3D as SurfaceChart3D diff --git a/stubs/openpyxl/openpyxl/chart/_chart.pyi b/stubs/openpyxl/openpyxl/chart/_chart.pyi new file mode 100644 index 000000000..ac306aadd --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/_chart.pyi @@ -0,0 +1,44 @@ +from abc import abstractmethod +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class AxId(Serialisable): # type: ignore[misc] + val: Any + def __init__(self, val) -> None: ... + +def PlotArea(): ... + +class ChartBase(Serialisable): + legend: Any + layout: Any + roundedCorners: Any + axId: Any + visible_cells_only: Any + display_blanks: Any + ser: Any + series: Any + title: Any + anchor: str + width: int + height: float + style: Any + mime_type: str + graphical_properties: Any + __elements__: Any + plot_area: Any + pivotSource: Any + pivotFormats: Any + idx_base: int + def __init__(self, axId=..., **kw) -> None: ... + def __hash__(self): ... + def __iadd__(self, other): ... + def to_tree(self, namespace: Any | None = ..., tagname: Any | None = ..., idx: Any | None = ...): ... # type: ignore[override] + def set_categories(self, labels) -> None: ... + def add_data(self, data, from_rows: bool = ..., titles_from_data: bool = ...) -> None: ... + def append(self, value) -> None: ... + @property + def path(self): ... + @property + @abstractmethod + def tagname(self) -> str: ... diff --git a/stubs/openpyxl/openpyxl/chart/area_chart.pyi b/stubs/openpyxl/openpyxl/chart/area_chart.pyi new file mode 100644 index 000000000..8e70dd76d --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/area_chart.pyi @@ -0,0 +1,46 @@ +from abc import abstractmethod +from typing import Any + +from ._chart import ChartBase + +class _AreaChartBase(ChartBase): + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + dataLabels: Any + dropLines: Any + __elements__: Any + def __init__( + self, grouping: str = ..., varyColors: Any | None = ..., ser=..., dLbls: Any | None = ..., dropLines: Any | None = ... + ) -> None: ... + @property + @abstractmethod + def tagname(self) -> str: ... + +class AreaChart(_AreaChartBase): + tagname: str + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + dropLines: Any + x_axis: Any + y_axis: Any + extLst: Any + __elements__: Any + def __init__(self, axId: Any | None = ..., extLst: Any | None = ..., **kw) -> None: ... + +class AreaChart3D(AreaChart): + tagname: str + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + dropLines: Any + gapDepth: Any + x_axis: Any + y_axis: Any + z_axis: Any + __elements__: Any + def __init__(self, gapDepth: Any | None = ..., **kw) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/axis.pyi b/stubs/openpyxl/openpyxl/chart/axis.pyi new file mode 100644 index 000000000..ffdbc6a39 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/axis.pyi @@ -0,0 +1,234 @@ +from abc import abstractmethod +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ChartLines(Serialisable): + tagname: str + spPr: Any + graphicalProperties: Any + def __init__(self, spPr: Any | None = ...) -> None: ... + +class Scaling(Serialisable): + tagname: str + logBase: Any + orientation: Any + max: Any + min: Any + extLst: Any + __elements__: Any + def __init__( + self, + logBase: Any | None = ..., + orientation: str = ..., + max: Any | None = ..., + min: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class _BaseAxis(Serialisable): + axId: Any + scaling: Any + delete: Any + axPos: Any + majorGridlines: Any + minorGridlines: Any + title: Any + numFmt: Any + number_format: Any + majorTickMark: Any + minorTickMark: Any + tickLblPos: Any + spPr: Any + graphicalProperties: Any + txPr: Any + textProperties: Any + crossAx: Any + crosses: Any + crossesAt: Any + __elements__: Any + def __init__( + self, + axId: Any | None = ..., + scaling: Any | None = ..., + delete: Any | None = ..., + axPos: str = ..., + majorGridlines: Any | None = ..., + minorGridlines: Any | None = ..., + title: Any | None = ..., + numFmt: Any | None = ..., + majorTickMark: Any | None = ..., + minorTickMark: Any | None = ..., + tickLblPos: Any | None = ..., + spPr: Any | None = ..., + txPr: Any | None = ..., + crossAx: Any | None = ..., + crosses: Any | None = ..., + crossesAt: Any | None = ..., + ) -> None: ... + @property + @abstractmethod + def tagname(self) -> str: ... + +class DisplayUnitsLabel(Serialisable): + tagname: str + layout: Any + tx: Any + text: Any + spPr: Any + graphicalProperties: Any + txPr: Any + textPropertes: Any + __elements__: Any + def __init__( + self, layout: Any | None = ..., tx: Any | None = ..., spPr: Any | None = ..., txPr: Any | None = ... + ) -> None: ... + +class DisplayUnitsLabelList(Serialisable): + tagname: str + custUnit: Any + builtInUnit: Any + dispUnitsLbl: Any + extLst: Any + __elements__: Any + def __init__( + self, custUnit: Any | None = ..., builtInUnit: Any | None = ..., dispUnitsLbl: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class NumericAxis(_BaseAxis): + tagname: str + axId: Any + scaling: Any + delete: Any + axPos: Any + majorGridlines: Any + minorGridlines: Any + title: Any + numFmt: Any + majorTickMark: Any + minorTickMark: Any + tickLblPos: Any + spPr: Any + txPr: Any + crossAx: Any + crosses: Any + crossesAt: Any + crossBetween: Any + majorUnit: Any + minorUnit: Any + dispUnits: Any + extLst: Any + __elements__: Any + def __init__( + self, + crossBetween: Any | None = ..., + majorUnit: Any | None = ..., + minorUnit: Any | None = ..., + dispUnits: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... + @classmethod + def from_tree(cls, node): ... + +class TextAxis(_BaseAxis): + tagname: str + axId: Any + scaling: Any + delete: Any + axPos: Any + majorGridlines: Any + minorGridlines: Any + title: Any + numFmt: Any + majorTickMark: Any + minorTickMark: Any + tickLblPos: Any + spPr: Any + txPr: Any + crossAx: Any + crosses: Any + crossesAt: Any + auto: Any + lblAlgn: Any + lblOffset: Any + tickLblSkip: Any + tickMarkSkip: Any + noMultiLvlLbl: Any + extLst: Any + __elements__: Any + def __init__( + self, + auto: Any | None = ..., + lblAlgn: Any | None = ..., + lblOffset: int = ..., + tickLblSkip: Any | None = ..., + tickMarkSkip: Any | None = ..., + noMultiLvlLbl: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... + +class DateAxis(TextAxis): + tagname: str + axId: Any + scaling: Any + delete: Any + axPos: Any + majorGridlines: Any + minorGridlines: Any + title: Any + numFmt: Any + majorTickMark: Any + minorTickMark: Any + tickLblPos: Any + spPr: Any + txPr: Any + crossAx: Any + crosses: Any + crossesAt: Any + auto: Any + lblOffset: Any + baseTimeUnit: Any + majorUnit: Any + majorTimeUnit: Any + minorUnit: Any + minorTimeUnit: Any + extLst: Any + __elements__: Any + def __init__( + self, + auto: Any | None = ..., + lblOffset: Any | None = ..., + baseTimeUnit: Any | None = ..., + majorUnit: Any | None = ..., + majorTimeUnit: Any | None = ..., + minorUnit: Any | None = ..., + minorTimeUnit: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... + +class SeriesAxis(_BaseAxis): + tagname: str + axId: Any + scaling: Any + delete: Any + axPos: Any + majorGridlines: Any + minorGridlines: Any + title: Any + numFmt: Any + majorTickMark: Any + minorTickMark: Any + tickLblPos: Any + spPr: Any + txPr: Any + crossAx: Any + crosses: Any + crossesAt: Any + tickLblSkip: Any + tickMarkSkip: Any + extLst: Any + __elements__: Any + def __init__(self, tickLblSkip: Any | None = ..., tickMarkSkip: Any | None = ..., extLst: Any | None = ..., **kw) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/bar_chart.pyi b/stubs/openpyxl/openpyxl/chart/bar_chart.pyi new file mode 100644 index 000000000..071d36a48 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/bar_chart.pyi @@ -0,0 +1,70 @@ +from abc import abstractmethod +from typing import Any + +from ._3d import _3DBase +from ._chart import ChartBase + +class _BarChartBase(ChartBase): + barDir: Any + type: Any + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + dataLabels: Any + __elements__: Any + def __init__( + self, barDir: str = ..., grouping: str = ..., varyColors: Any | None = ..., ser=..., dLbls: Any | None = ..., **kw + ) -> None: ... + @property + @abstractmethod + def tagname(self) -> str: ... + +class BarChart(_BarChartBase): + tagname: str + barDir: Any + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + gapWidth: Any + overlap: Any + serLines: Any + extLst: Any + x_axis: Any + y_axis: Any + __elements__: Any + legend: Any + def __init__( + self, gapWidth: int = ..., overlap: Any | None = ..., serLines: Any | None = ..., extLst: Any | None = ..., **kw + ) -> None: ... + +class BarChart3D(_BarChartBase, _3DBase): # type: ignore # incompatible base classes + tagname: str + barDir: Any + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + view3D: Any + floor: Any + sideWall: Any + backWall: Any + gapWidth: Any + gapDepth: Any + shape: Any + serLines: Any + extLst: Any + x_axis: Any + y_axis: Any + z_axis: Any + __elements__: Any + def __init__( + self, + gapWidth: int = ..., + gapDepth: int = ..., + shape: Any | None = ..., + serLines: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/bubble_chart.pyi b/stubs/openpyxl/openpyxl/chart/bubble_chart.pyi new file mode 100644 index 000000000..16b74ead2 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/bubble_chart.pyi @@ -0,0 +1,30 @@ +from typing import Any + +from ._chart import ChartBase + +class BubbleChart(ChartBase): + tagname: str + varyColors: Any + ser: Any + dLbls: Any + dataLabels: Any + bubble3D: Any + bubbleScale: Any + showNegBubbles: Any + sizeRepresents: Any + extLst: Any + x_axis: Any + y_axis: Any + __elements__: Any + def __init__( + self, + varyColors: Any | None = ..., + ser=..., + dLbls: Any | None = ..., + bubble3D: Any | None = ..., + bubbleScale: Any | None = ..., + showNegBubbles: Any | None = ..., + sizeRepresents: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/chartspace.pyi b/stubs/openpyxl/openpyxl/chart/chartspace.pyi new file mode 100644 index 000000000..0d4d44d73 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/chartspace.pyi @@ -0,0 +1,97 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ChartContainer(Serialisable): + tagname: str + title: Any + autoTitleDeleted: Any + pivotFmts: Any + view3D: Any + floor: Any + sideWall: Any + backWall: Any + plotArea: Any + legend: Any + plotVisOnly: Any + dispBlanksAs: Any + showDLblsOverMax: Any + extLst: Any + __elements__: Any + def __init__( + self, + title: Any | None = ..., + autoTitleDeleted: Any | None = ..., + pivotFmts=..., + view3D: Any | None = ..., + floor: Any | None = ..., + sideWall: Any | None = ..., + backWall: Any | None = ..., + plotArea: Any | None = ..., + legend: Any | None = ..., + plotVisOnly: bool = ..., + dispBlanksAs: str = ..., + showDLblsOverMax: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class Protection(Serialisable): + tagname: str + chartObject: Any + data: Any + formatting: Any + selection: Any + userInterface: Any + __elements__: Any + def __init__( + self, + chartObject: Any | None = ..., + data: Any | None = ..., + formatting: Any | None = ..., + selection: Any | None = ..., + userInterface: Any | None = ..., + ) -> None: ... + +class ExternalData(Serialisable): + tagname: str + autoUpdate: Any + id: Any + def __init__(self, autoUpdate: Any | None = ..., id: Any | None = ...) -> None: ... + +class ChartSpace(Serialisable): + tagname: str + date1904: Any + lang: Any + roundedCorners: Any + style: Any + clrMapOvr: Any + pivotSource: Any + protection: Any + chart: Any + spPr: Any + graphicalProperties: Any + txPr: Any + textProperties: Any + externalData: Any + printSettings: Any + userShapes: Any + extLst: Any + __elements__: Any + def __init__( + self, + date1904: Any | None = ..., + lang: Any | None = ..., + roundedCorners: Any | None = ..., + style: Any | None = ..., + clrMapOvr: Any | None = ..., + pivotSource: Any | None = ..., + protection: Any | None = ..., + chart: Any | None = ..., + spPr: Any | None = ..., + txPr: Any | None = ..., + externalData: Any | None = ..., + printSettings: Any | None = ..., + userShapes: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + def to_tree(self, tagname: Any | None = ..., idx: Any | None = ..., namespace: Any | None = ...): ... diff --git a/stubs/openpyxl/openpyxl/chart/data_source.pyi b/stubs/openpyxl/openpyxl/chart/data_source.pyi new file mode 100644 index 000000000..d927a58bb --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/data_source.pyi @@ -0,0 +1,101 @@ +from typing import Any + +from openpyxl.descriptors.nested import NestedText +from openpyxl.descriptors.serialisable import Serialisable + +class NumFmt(Serialisable): # type: ignore[misc] + formatCode: Any + sourceLinked: Any + def __init__(self, formatCode: Any | None = ..., sourceLinked: bool = ...) -> None: ... + +class NumberValueDescriptor(NestedText): + allow_none: bool + expected_type: Any + def __set__(self, instance, value) -> None: ... + +class NumVal(Serialisable): # type: ignore[misc] + idx: Any + formatCode: Any + v: Any + def __init__(self, idx: Any | None = ..., formatCode: Any | None = ..., v: Any | None = ...) -> None: ... + +class NumData(Serialisable): # type: ignore[misc] + formatCode: Any + ptCount: Any + pt: Any + extLst: Any + __elements__: Any + def __init__(self, formatCode: Any | None = ..., ptCount: Any | None = ..., pt=..., extLst: Any | None = ...) -> None: ... + +class NumRef(Serialisable): # type: ignore[misc] + f: Any + ref: Any + numCache: Any + extLst: Any + __elements__: Any + def __init__(self, f: Any | None = ..., numCache: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class StrVal(Serialisable): + tagname: str + idx: Any + v: Any + def __init__(self, idx: int = ..., v: Any | None = ...) -> None: ... + +class StrData(Serialisable): + tagname: str + ptCount: Any + pt: Any + extLst: Any + __elements__: Any + def __init__(self, ptCount: Any | None = ..., pt=..., extLst: Any | None = ...) -> None: ... + +class StrRef(Serialisable): + tagname: str + f: Any + strCache: Any + extLst: Any + __elements__: Any + def __init__(self, f: Any | None = ..., strCache: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class NumDataSource(Serialisable): # type: ignore[misc] + numRef: Any + numLit: Any + def __init__(self, numRef: Any | None = ..., numLit: Any | None = ...) -> None: ... + +class Level(Serialisable): + tagname: str + pt: Any + __elements__: Any + def __init__(self, pt=...) -> None: ... + +class MultiLevelStrData(Serialisable): + tagname: str + ptCount: Any + lvl: Any + extLst: Any + __elements__: Any + def __init__(self, ptCount: Any | None = ..., lvl=..., extLst: Any | None = ...) -> None: ... + +class MultiLevelStrRef(Serialisable): + tagname: str + f: Any + multiLvlStrCache: Any + extLst: Any + __elements__: Any + def __init__(self, f: Any | None = ..., multiLvlStrCache: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class AxDataSource(Serialisable): + tagname: str + numRef: Any + numLit: Any + strRef: Any + strLit: Any + multiLvlStrRef: Any + def __init__( + self, + numRef: Any | None = ..., + numLit: Any | None = ..., + strRef: Any | None = ..., + strLit: Any | None = ..., + multiLvlStrRef: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/descriptors.pyi b/stubs/openpyxl/openpyxl/chart/descriptors.pyi new file mode 100644 index 000000000..7b86609d1 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/descriptors.pyi @@ -0,0 +1,19 @@ +from typing import Any + +from openpyxl.descriptors import Typed +from openpyxl.descriptors.nested import NestedMinMax + +class NestedGapAmount(NestedMinMax): + allow_none: bool + min: int + max: int + +class NestedOverlap(NestedMinMax): + allow_none: bool + min: int + max: int + +class NumberFormatDescriptor(Typed): + expected_type: Any + allow_none: bool + def __set__(self, instance, value) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/error_bar.pyi b/stubs/openpyxl/openpyxl/chart/error_bar.pyi new file mode 100644 index 000000000..211ca6991 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/error_bar.pyi @@ -0,0 +1,32 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ErrorBars(Serialisable): + tagname: str + errDir: Any + direction: Any + errBarType: Any + style: Any + errValType: Any + size: Any + noEndCap: Any + plus: Any + minus: Any + val: Any + spPr: Any + graphicalProperties: Any + extLst: Any + __elements__: Any + def __init__( + self, + errDir: Any | None = ..., + errBarType: str = ..., + errValType: str = ..., + noEndCap: Any | None = ..., + plus: Any | None = ..., + minus: Any | None = ..., + val: Any | None = ..., + spPr: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/label.pyi b/stubs/openpyxl/openpyxl/chart/label.pyi new file mode 100644 index 000000000..e6e58b6a6 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/label.pyi @@ -0,0 +1,81 @@ +from abc import abstractmethod +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable as Serialisable + +class _DataLabelBase(Serialisable): + numFmt: Any + spPr: Any + graphicalProperties: Any + txPr: Any + textProperties: Any + dLblPos: Any + position: Any + showLegendKey: Any + showVal: Any + showCatName: Any + showSerName: Any + showPercent: Any + showBubbleSize: Any + showLeaderLines: Any + separator: Any + extLst: Any + __elements__: Any + def __init__( + self, + numFmt: Any | None = ..., + spPr: Any | None = ..., + txPr: Any | None = ..., + dLblPos: Any | None = ..., + showLegendKey: Any | None = ..., + showVal: Any | None = ..., + showCatName: Any | None = ..., + showSerName: Any | None = ..., + showPercent: Any | None = ..., + showBubbleSize: Any | None = ..., + showLeaderLines: Any | None = ..., + separator: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + @property + @abstractmethod + def tagname(self) -> str: ... + +class DataLabel(_DataLabelBase): + tagname: str + idx: Any + numFmt: Any + spPr: Any + txPr: Any + dLblPos: Any + showLegendKey: Any + showVal: Any + showCatName: Any + showSerName: Any + showPercent: Any + showBubbleSize: Any + showLeaderLines: Any + separator: Any + extLst: Any + __elements__: Any + def __init__(self, idx: int = ..., **kw) -> None: ... + +class DataLabelList(_DataLabelBase): + tagname: str + dLbl: Any + delete: Any + numFmt: Any + spPr: Any + txPr: Any + dLblPos: Any + showLegendKey: Any + showVal: Any + showCatName: Any + showSerName: Any + showPercent: Any + showBubbleSize: Any + showLeaderLines: Any + separator: Any + extLst: Any + __elements__: Any + def __init__(self, dLbl=..., delete: Any | None = ..., **kw) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/layout.pyi b/stubs/openpyxl/openpyxl/chart/layout.pyi new file mode 100644 index 000000000..c7ef17f84 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/layout.pyi @@ -0,0 +1,39 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ManualLayout(Serialisable): + tagname: str + layoutTarget: Any + xMode: Any + yMode: Any + wMode: Any + hMode: Any + x: Any + y: Any + w: Any + width: Any + h: Any + height: Any + extLst: Any + __elements__: Any + def __init__( + self, + layoutTarget: Any | None = ..., + xMode: Any | None = ..., + yMode: Any | None = ..., + wMode: str = ..., + hMode: str = ..., + x: Any | None = ..., + y: Any | None = ..., + w: Any | None = ..., + h: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class Layout(Serialisable): + tagname: str + manualLayout: Any + extLst: Any + __elements__: Any + def __init__(self, manualLayout: Any | None = ..., extLst: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/legend.pyi b/stubs/openpyxl/openpyxl/chart/legend.pyi new file mode 100644 index 000000000..66bf483c2 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/legend.pyi @@ -0,0 +1,36 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class LegendEntry(Serialisable): + tagname: str + idx: Any + delete: Any + txPr: Any + extLst: Any + __elements__: Any + def __init__(self, idx: int = ..., delete: bool = ..., txPr: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class Legend(Serialisable): + tagname: str + legendPos: Any + position: Any + legendEntry: Any + layout: Any + overlay: Any + spPr: Any + graphicalProperties: Any + txPr: Any + textProperties: Any + extLst: Any + __elements__: Any + def __init__( + self, + legendPos: str = ..., + legendEntry=..., + layout: Any | None = ..., + overlay: Any | None = ..., + spPr: Any | None = ..., + txPr: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/line_chart.pyi b/stubs/openpyxl/openpyxl/chart/line_chart.pyi new file mode 100644 index 000000000..9d2b8e844 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/line_chart.pyi @@ -0,0 +1,77 @@ +from abc import abstractmethod +from typing import Any + +from ._chart import ChartBase + +class _LineChartBase(ChartBase): + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + dataLabels: Any + dropLines: Any + __elements__: Any + def __init__( + self, + grouping: str = ..., + varyColors: Any | None = ..., + ser=..., + dLbls: Any | None = ..., + dropLines: Any | None = ..., + **kw, + ) -> None: ... + @property + @abstractmethod + def tagname(self) -> str: ... + +class LineChart(_LineChartBase): + tagname: str + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + dropLines: Any + hiLowLines: Any + upDownBars: Any + marker: Any + smooth: Any + extLst: Any + x_axis: Any + y_axis: Any + __elements__: Any + def __init__( + self, + hiLowLines: Any | None = ..., + upDownBars: Any | None = ..., + marker: Any | None = ..., + smooth: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... + +class LineChart3D(_LineChartBase): + tagname: str + grouping: Any + varyColors: Any + ser: Any + dLbls: Any + dropLines: Any + gapDepth: Any + hiLowLines: Any + upDownBars: Any + marker: Any + smooth: Any + extLst: Any + x_axis: Any + y_axis: Any + z_axis: Any + __elements__: Any + def __init__( + self, + gapDepth: Any | None = ..., + hiLowLines: Any | None = ..., + upDownBars: Any | None = ..., + marker: Any | None = ..., + smooth: Any | None = ..., + **kw, + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/marker.pyi b/stubs/openpyxl/openpyxl/chart/marker.pyi new file mode 100644 index 000000000..771917440 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/marker.pyi @@ -0,0 +1,39 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Marker(Serialisable): + tagname: str + symbol: Any + size: Any + spPr: Any + graphicalProperties: Any + extLst: Any + __elements__: Any + def __init__( + self, symbol: Any | None = ..., size: Any | None = ..., spPr: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class DataPoint(Serialisable): + tagname: str + idx: Any + invertIfNegative: Any + marker: Any + bubble3D: Any + explosion: Any + spPr: Any + graphicalProperties: Any + pictureOptions: Any + extLst: Any + __elements__: Any + def __init__( + self, + idx: Any | None = ..., + invertIfNegative: Any | None = ..., + marker: Any | None = ..., + bubble3D: Any | None = ..., + explosion: Any | None = ..., + spPr: Any | None = ..., + pictureOptions: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/picture.pyi b/stubs/openpyxl/openpyxl/chart/picture.pyi new file mode 100644 index 000000000..1f0ed1a2b --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/picture.pyi @@ -0,0 +1,20 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class PictureOptions(Serialisable): + tagname: str + applyToFront: Any + applyToSides: Any + applyToEnd: Any + pictureFormat: Any + pictureStackUnit: Any + __elements__: Any + def __init__( + self, + applyToFront: Any | None = ..., + applyToSides: Any | None = ..., + applyToEnd: Any | None = ..., + pictureFormat: Any | None = ..., + pictureStackUnit: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/pie_chart.pyi b/stubs/openpyxl/openpyxl/chart/pie_chart.pyi new file mode 100644 index 000000000..8b640c775 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/pie_chart.pyi @@ -0,0 +1,81 @@ +from abc import abstractmethod +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +from ._chart import ChartBase + +class _PieChartBase(ChartBase): + varyColors: Any + ser: Any + dLbls: Any + dataLabels: Any + __elements__: Any + def __init__(self, varyColors: bool = ..., ser=..., dLbls: Any | None = ...) -> None: ... + @property + @abstractmethod + def tagname(self) -> str: ... + +class PieChart(_PieChartBase): + tagname: str + varyColors: Any + ser: Any + dLbls: Any + firstSliceAng: Any + extLst: Any + __elements__: Any + def __init__(self, firstSliceAng: int = ..., extLst: Any | None = ..., **kw) -> None: ... + +class PieChart3D(_PieChartBase): + tagname: str + varyColors: Any + ser: Any + dLbls: Any + extLst: Any + __elements__: Any + +class DoughnutChart(_PieChartBase): + tagname: str + varyColors: Any + ser: Any + dLbls: Any + firstSliceAng: Any + holeSize: Any + extLst: Any + __elements__: Any + def __init__(self, firstSliceAng: int = ..., holeSize: int = ..., extLst: Any | None = ..., **kw) -> None: ... + +class CustomSplit(Serialisable): + tagname: str + secondPiePt: Any + __elements__: Any + def __init__(self, secondPiePt=...) -> None: ... + +class ProjectedPieChart(_PieChartBase): + tagname: str + varyColors: Any + ser: Any + dLbls: Any + ofPieType: Any + type: Any + gapWidth: Any + splitType: Any + splitPos: Any + custSplit: Any + secondPieSize: Any + serLines: Any + join_lines: Any + extLst: Any + __elements__: Any + def __init__( + self, + ofPieType: str = ..., + gapWidth: Any | None = ..., + splitType: str = ..., + splitPos: Any | None = ..., + custSplit: Any | None = ..., + secondPieSize: int = ..., + serLines: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/pivot.pyi b/stubs/openpyxl/openpyxl/chart/pivot.pyi new file mode 100644 index 000000000..6411afd47 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/pivot.pyi @@ -0,0 +1,33 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class PivotSource(Serialisable): + tagname: str + name: Any + fmtId: Any + extLst: Any + __elements__: Any + def __init__(self, name: Any | None = ..., fmtId: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class PivotFormat(Serialisable): + tagname: str + idx: Any + spPr: Any + graphicalProperties: Any + txPr: Any + TextBody: Any + marker: Any + dLbl: Any + DataLabel: Any + extLst: Any + __elements__: Any + def __init__( + self, + idx: int = ..., + spPr: Any | None = ..., + txPr: Any | None = ..., + marker: Any | None = ..., + dLbl: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/plotarea.pyi b/stubs/openpyxl/openpyxl/chart/plotarea.pyi new file mode 100644 index 000000000..8fdb37511 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/plotarea.pyi @@ -0,0 +1,66 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class DataTable(Serialisable): + tagname: str + showHorzBorder: Any + showVertBorder: Any + showOutline: Any + showKeys: Any + spPr: Any + graphicalProperties: Any + txPr: Any + extLst: Any + __elements__: Any + def __init__( + self, + showHorzBorder: Any | None = ..., + showVertBorder: Any | None = ..., + showOutline: Any | None = ..., + showKeys: Any | None = ..., + spPr: Any | None = ..., + txPr: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class PlotArea(Serialisable): + tagname: str + layout: Any + dTable: Any + spPr: Any + graphicalProperties: Any + extLst: Any + areaChart: Any + area3DChart: Any + lineChart: Any + line3DChart: Any + stockChart: Any + radarChart: Any + scatterChart: Any + pieChart: Any + pie3DChart: Any + doughnutChart: Any + barChart: Any + bar3DChart: Any + ofPieChart: Any + surfaceChart: Any + surface3DChart: Any + bubbleChart: Any + valAx: Any + catAx: Any + dateAx: Any + serAx: Any + __elements__: Any + def __init__( + self, + layout: Any | None = ..., + dTable: Any | None = ..., + spPr: Any | None = ..., + _charts=..., + _axes=..., + extLst: Any | None = ..., + ) -> None: ... + def to_tree(self, tagname: Any | None = ..., idx: Any | None = ..., namespace: Any | None = ...): ... + @classmethod + def from_tree(cls, node): ... diff --git a/stubs/openpyxl/openpyxl/chart/print_settings.pyi b/stubs/openpyxl/openpyxl/chart/print_settings.pyi new file mode 100644 index 000000000..eb2facd55 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/print_settings.pyi @@ -0,0 +1,27 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class PageMargins(Serialisable): + tagname: str + l: Any + left: Any + r: Any + right: Any + t: Any + top: Any + b: Any + bottom: Any + header: Any + footer: Any + def __init__( + self, l: float = ..., r: float = ..., t: int = ..., b: int = ..., header: float = ..., footer: float = ... + ) -> None: ... + +class PrintSettings(Serialisable): + tagname: str + headerFooter: Any + pageMargins: Any + pageSetup: Any + __elements__: Any + def __init__(self, headerFooter: Any | None = ..., pageMargins: Any | None = ..., pageSetup: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/radar_chart.pyi b/stubs/openpyxl/openpyxl/chart/radar_chart.pyi new file mode 100644 index 000000000..bab169498 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/radar_chart.pyi @@ -0,0 +1,25 @@ +from typing import Any + +from ._chart import ChartBase + +class RadarChart(ChartBase): + tagname: str + radarStyle: Any + type: Any + varyColors: Any + ser: Any + dLbls: Any + dataLabels: Any + extLst: Any + x_axis: Any + y_axis: Any + __elements__: Any + def __init__( + self, + radarStyle: str = ..., + varyColors: Any | None = ..., + ser=..., + dLbls: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/reader.pyi b/stubs/openpyxl/openpyxl/chart/reader.pyi new file mode 100644 index 000000000..0e58541f2 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/reader.pyi @@ -0,0 +1 @@ +def read_chart(chartspace): ... diff --git a/stubs/openpyxl/openpyxl/chart/reference.pyi b/stubs/openpyxl/openpyxl/chart/reference.pyi new file mode 100644 index 000000000..fe2e8b8ea --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/reference.pyi @@ -0,0 +1,34 @@ +from collections.abc import Generator +from typing import Any + +from openpyxl.descriptors import Strict + +class DummyWorksheet: + title: Any + def __init__(self, title) -> None: ... + +class Reference(Strict): + min_row: Any + max_row: Any + min_col: Any + max_col: Any + range_string: Any + worksheet: Any + def __init__( + self, + worksheet: Any | None = ..., + min_col: Any | None = ..., + min_row: Any | None = ..., + max_col: Any | None = ..., + max_row: Any | None = ..., + range_string: Any | None = ..., + ) -> None: ... + def __len__(self): ... + def __eq__(self, other): ... + @property + def rows(self) -> Generator[Any, None, None]: ... + @property + def cols(self) -> Generator[Any, None, None]: ... + def pop(self): ... + @property + def sheetname(self): ... diff --git a/stubs/openpyxl/openpyxl/chart/scatter_chart.pyi b/stubs/openpyxl/openpyxl/chart/scatter_chart.pyi new file mode 100644 index 000000000..73de332d1 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/scatter_chart.pyi @@ -0,0 +1,24 @@ +from typing import Any + +from ._chart import ChartBase as ChartBase + +class ScatterChart(ChartBase): + tagname: str + scatterStyle: Any + varyColors: Any + ser: Any + dLbls: Any + dataLabels: Any + extLst: Any + x_axis: Any + y_axis: Any + __elements__: Any + def __init__( + self, + scatterStyle: Any | None = ..., + varyColors: Any | None = ..., + ser=..., + dLbls: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/series.pyi b/stubs/openpyxl/openpyxl/chart/series.pyi new file mode 100644 index 000000000..44265dec7 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/series.pyi @@ -0,0 +1,86 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +attribute_mapping: Any + +class SeriesLabel(Serialisable): + tagname: str + strRef: Any + v: Any + value: Any + __elements__: Any + def __init__(self, strRef: Any | None = ..., v: Any | None = ...) -> None: ... + +class Series(Serialisable): + tagname: str + idx: Any + order: Any + tx: Any + title: Any + spPr: Any + graphicalProperties: Any + pictureOptions: Any + dPt: Any + data_points: Any + dLbls: Any + labels: Any + trendline: Any + errBars: Any + cat: Any + identifiers: Any + val: Any + extLst: Any + invertIfNegative: Any + shape: Any + xVal: Any + yVal: Any + bubbleSize: Any + zVal: Any + bubble3D: Any + marker: Any + smooth: Any + explosion: Any + __elements__: Any + def __init__( + self, + idx: int = ..., + order: int = ..., + tx: Any | None = ..., + spPr: Any | None = ..., + pictureOptions: Any | None = ..., + dPt=..., + dLbls: Any | None = ..., + trendline: Any | None = ..., + errBars: Any | None = ..., + cat: Any | None = ..., + val: Any | None = ..., + invertIfNegative: Any | None = ..., + shape: Any | None = ..., + xVal: Any | None = ..., + yVal: Any | None = ..., + bubbleSize: Any | None = ..., + bubble3D: Any | None = ..., + marker: Any | None = ..., + smooth: Any | None = ..., + explosion: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + def to_tree(self, tagname: Any | None = ..., idx: Any | None = ...): ... # type: ignore[override] + +class XYSeries(Series): + idx: Any + order: Any + tx: Any + spPr: Any + dPt: Any + dLbls: Any + trendline: Any + errBars: Any + xVal: Any + yVal: Any + invertIfNegative: Any + bubbleSize: Any + bubble3D: Any + marker: Any + smooth: Any diff --git a/stubs/openpyxl/openpyxl/chart/series_factory.pyi b/stubs/openpyxl/openpyxl/chart/series_factory.pyi new file mode 100644 index 000000000..989d0e4ab --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/series_factory.pyi @@ -0,0 +1,5 @@ +from typing import Any + +def SeriesFactory( + values, xvalues: Any | None = ..., zvalues: Any | None = ..., title: Any | None = ..., title_from_data: bool = ... +): ... diff --git a/stubs/openpyxl/openpyxl/chart/shapes.pyi b/stubs/openpyxl/openpyxl/chart/shapes.pyi new file mode 100644 index 000000000..f78177f78 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/shapes.pyi @@ -0,0 +1,37 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class GraphicalProperties(Serialisable): + tagname: str + bwMode: Any + xfrm: Any + transform: Any + custGeom: Any + prstGeom: Any + noFill: Any + solidFill: Any + gradFill: Any + pattFill: Any + ln: Any + line: Any + scene3d: Any + sp3d: Any + shape3D: Any + extLst: Any + __elements__: Any + def __init__( + self, + bwMode: Any | None = ..., + xfrm: Any | None = ..., + noFill: Any | None = ..., + solidFill: Any | None = ..., + gradFill: Any | None = ..., + pattFill: Any | None = ..., + ln: Any | None = ..., + scene3d: Any | None = ..., + custGeom: Any | None = ..., + prstGeom: Any | None = ..., + sp3d: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/stock_chart.pyi b/stubs/openpyxl/openpyxl/chart/stock_chart.pyi new file mode 100644 index 000000000..ad5c6a051 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/stock_chart.pyi @@ -0,0 +1,26 @@ +from typing import Any + +from ._chart import ChartBase + +class StockChart(ChartBase): + tagname: str + ser: Any + dLbls: Any + dataLabels: Any + dropLines: Any + hiLowLines: Any + upDownBars: Any + extLst: Any + x_axis: Any + y_axis: Any + __elements__: Any + def __init__( + self, + ser=..., + dLbls: Any | None = ..., + dropLines: Any | None = ..., + hiLowLines: Any | None = ..., + upDownBars: Any | None = ..., + extLst: Any | None = ..., + **kw, + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/surface_chart.pyi b/stubs/openpyxl/openpyxl/chart/surface_chart.pyi new file mode 100644 index 000000000..6b5671934 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/surface_chart.pyi @@ -0,0 +1,52 @@ +from abc import abstractmethod +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +from ._3d import _3DBase +from ._chart import ChartBase + +class BandFormat(Serialisable): + tagname: str + idx: Any + spPr: Any + graphicalProperties: Any + __elements__: Any + def __init__(self, idx: int = ..., spPr: Any | None = ...) -> None: ... + +class BandFormatList(Serialisable): + tagname: str + bandFmt: Any + __elements__: Any + def __init__(self, bandFmt=...) -> None: ... + +class _SurfaceChartBase(ChartBase): + wireframe: Any + ser: Any + bandFmts: Any + __elements__: Any + def __init__(self, wireframe: Any | None = ..., ser=..., bandFmts: Any | None = ..., **kw) -> None: ... + @property + @abstractmethod + def tagname(self) -> str: ... + +class SurfaceChart3D(_SurfaceChartBase, _3DBase): # type: ignore # incompatible base classes + tagname: str + wireframe: Any + ser: Any + bandFmts: Any + extLst: Any + x_axis: Any + y_axis: Any + z_axis: Any + __elements__: Any + def __init__(self, **kw) -> None: ... + +class SurfaceChart(SurfaceChart3D): + tagname: str + wireframe: Any + ser: Any + bandFmts: Any + extLst: Any + __elements__: Any + def __init__(self, **kw) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/text.pyi b/stubs/openpyxl/openpyxl/chart/text.pyi new file mode 100644 index 000000000..210064ded --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/text.pyi @@ -0,0 +1,21 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class RichText(Serialisable): + tagname: str + bodyPr: Any + properties: Any + lstStyle: Any + p: Any + paragraphs: Any + __elements__: Any + def __init__(self, bodyPr: Any | None = ..., lstStyle: Any | None = ..., p: Any | None = ...) -> None: ... + +class Text(Serialisable): + tagname: str + strRef: Any + rich: Any + __elements__: Any + def __init__(self, strRef: Any | None = ..., rich: Any | None = ...) -> None: ... + def to_tree(self, tagname: Any | None = ..., idx: Any | None = ..., namespace: Any | None = ...): ... diff --git a/stubs/openpyxl/openpyxl/chart/title.pyi b/stubs/openpyxl/openpyxl/chart/title.pyi new file mode 100644 index 000000000..9b049582c --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/title.pyi @@ -0,0 +1,33 @@ +from typing import Any + +from openpyxl.descriptors import Typed +from openpyxl.descriptors.serialisable import Serialisable + +class Title(Serialisable): + tagname: str + tx: Any + text: Any + layout: Any + overlay: Any + spPr: Any + graphicalProperties: Any + txPr: Any + body: Any + extLst: Any + __elements__: Any + def __init__( + self, + tx: Any | None = ..., + layout: Any | None = ..., + overlay: Any | None = ..., + spPr: Any | None = ..., + txPr: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +def title_maker(text): ... + +class TitleDescriptor(Typed): + expected_type: Any + allow_none: bool + def __set__(self, instance, value) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/trendline.pyi b/stubs/openpyxl/openpyxl/chart/trendline.pyi new file mode 100644 index 000000000..b313a088e --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/trendline.pyi @@ -0,0 +1,56 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class TrendlineLabel(Serialisable): + tagname: str + layout: Any + tx: Any + numFmt: Any + spPr: Any + graphicalProperties: Any + txPr: Any + textProperties: Any + extLst: Any + __elements__: Any + def __init__( + self, + layout: Any | None = ..., + tx: Any | None = ..., + numFmt: Any | None = ..., + spPr: Any | None = ..., + txPr: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class Trendline(Serialisable): + tagname: str + name: Any + spPr: Any + graphicalProperties: Any + trendlineType: Any + order: Any + period: Any + forward: Any + backward: Any + intercept: Any + dispRSqr: Any + dispEq: Any + trendlineLbl: Any + extLst: Any + __elements__: Any + def __init__( + self, + name: Any | None = ..., + spPr: Any | None = ..., + trendlineType: str = ..., + order: Any | None = ..., + period: Any | None = ..., + forward: Any | None = ..., + backward: Any | None = ..., + intercept: Any | None = ..., + dispRSqr: Any | None = ..., + dispEq: Any | None = ..., + trendlineLbl: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chart/updown_bars.pyi b/stubs/openpyxl/openpyxl/chart/updown_bars.pyi new file mode 100644 index 000000000..ecf885e3d --- /dev/null +++ b/stubs/openpyxl/openpyxl/chart/updown_bars.pyi @@ -0,0 +1,14 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class UpDownBars(Serialisable): + tagname: str + gapWidth: Any + upBars: Any + downBars: Any + extLst: Any + __elements__: Any + def __init__( + self, gapWidth: int = ..., upBars: Any | None = ..., downBars: Any | None = ..., extLst: Any | None = ... + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chartsheet/__init__.pyi b/stubs/openpyxl/openpyxl/chartsheet/__init__.pyi new file mode 100644 index 000000000..59dba6f1c --- /dev/null +++ b/stubs/openpyxl/openpyxl/chartsheet/__init__.pyi @@ -0,0 +1 @@ +from .chartsheet import Chartsheet as Chartsheet diff --git a/stubs/openpyxl/openpyxl/chartsheet/chartsheet.pyi b/stubs/openpyxl/openpyxl/chartsheet/chartsheet.pyi new file mode 100644 index 000000000..547e90735 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chartsheet/chartsheet.pyi @@ -0,0 +1,44 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable +from openpyxl.workbook.child import _WorkbookChild + +class Chartsheet(_WorkbookChild, Serialisable): + tagname: str + mime_type: str + sheetPr: Any + sheetViews: Any + sheetProtection: Any + customSheetViews: Any + pageMargins: Any + pageSetup: Any + drawing: Any + drawingHF: Any + picture: Any + webPublishItems: Any + extLst: Any + sheet_state: Any + headerFooter: Any + HeaderFooter: Any + __elements__: Any + __attrs__: Any + def __init__( + self, + sheetPr: Any | None = ..., + sheetViews: Any | None = ..., + sheetProtection: Any | None = ..., + customSheetViews: Any | None = ..., + pageMargins: Any | None = ..., + pageSetup: Any | None = ..., + headerFooter: Any | None = ..., + drawing: Any | None = ..., + drawingHF: Any | None = ..., + picture: Any | None = ..., + webPublishItems: Any | None = ..., + extLst: Any | None = ..., + parent: Any | None = ..., + title: str = ..., + sheet_state: str = ..., + ) -> None: ... + def add_chart(self, chart) -> None: ... + def to_tree(self): ... diff --git a/stubs/openpyxl/openpyxl/chartsheet/custom.pyi b/stubs/openpyxl/openpyxl/chartsheet/custom.pyi new file mode 100644 index 000000000..6111d5686 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chartsheet/custom.pyi @@ -0,0 +1,30 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class CustomChartsheetView(Serialisable): + tagname: str + guid: Any + scale: Any + state: Any + zoomToFit: Any + pageMargins: Any + pageSetup: Any + headerFooter: Any + __elements__: Any + def __init__( + self, + guid: Any | None = ..., + scale: Any | None = ..., + state: str = ..., + zoomToFit: Any | None = ..., + pageMargins: Any | None = ..., + pageSetup: Any | None = ..., + headerFooter: Any | None = ..., + ) -> None: ... + +class CustomChartsheetViews(Serialisable): + tagname: str + customSheetView: Any + __elements__: Any + def __init__(self, customSheetView: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chartsheet/properties.pyi b/stubs/openpyxl/openpyxl/chartsheet/properties.pyi new file mode 100644 index 000000000..bc9352596 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chartsheet/properties.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable as Serialisable + +class ChartsheetProperties(Serialisable): + tagname: str + published: Any + codeName: Any + tabColor: Any + __elements__: Any + def __init__(self, published: Any | None = ..., codeName: Any | None = ..., tabColor: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chartsheet/protection.pyi b/stubs/openpyxl/openpyxl/chartsheet/protection.pyi new file mode 100644 index 000000000..0a8c3a73a --- /dev/null +++ b/stubs/openpyxl/openpyxl/chartsheet/protection.pyi @@ -0,0 +1,25 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable +from openpyxl.worksheet.protection import _Protected + +class ChartsheetProtection(Serialisable, _Protected): + tagname: str + algorithmName: Any + hashValue: Any + saltValue: Any + spinCount: Any + content: Any + objects: Any + __attrs__: Any + password: Any + def __init__( + self, + content: Any | None = ..., + objects: Any | None = ..., + hashValue: Any | None = ..., + spinCount: Any | None = ..., + saltValue: Any | None = ..., + algorithmName: Any | None = ..., + password: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chartsheet/publish.pyi b/stubs/openpyxl/openpyxl/chartsheet/publish.pyi new file mode 100644 index 000000000..a581881fe --- /dev/null +++ b/stubs/openpyxl/openpyxl/chartsheet/publish.pyi @@ -0,0 +1,32 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class WebPublishItem(Serialisable): + tagname: str + id: Any + divId: Any + sourceType: Any + sourceRef: Any + sourceObject: Any + destinationFile: Any + title: Any + autoRepublish: Any + def __init__( + self, + id: Any | None = ..., + divId: Any | None = ..., + sourceType: Any | None = ..., + sourceRef: Any | None = ..., + sourceObject: Any | None = ..., + destinationFile: Any | None = ..., + title: Any | None = ..., + autoRepublish: Any | None = ..., + ) -> None: ... + +class WebPublishItems(Serialisable): + tagname: str + count: Any + webPublishItem: Any + __elements__: Any + def __init__(self, count: Any | None = ..., webPublishItem: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chartsheet/relation.pyi b/stubs/openpyxl/openpyxl/chartsheet/relation.pyi new file mode 100644 index 000000000..a5c61a3a8 --- /dev/null +++ b/stubs/openpyxl/openpyxl/chartsheet/relation.pyi @@ -0,0 +1,69 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class SheetBackgroundPicture(Serialisable): + tagname: str + id: Any + def __init__(self, id) -> None: ... + +class DrawingHF(Serialisable): + id: Any + lho: Any + leftHeaderOddPages: Any + lhe: Any + leftHeaderEvenPages: Any + lhf: Any + leftHeaderFirstPage: Any + cho: Any + centerHeaderOddPages: Any + che: Any + centerHeaderEvenPages: Any + chf: Any + centerHeaderFirstPage: Any + rho: Any + rightHeaderOddPages: Any + rhe: Any + rightHeaderEvenPages: Any + rhf: Any + rightHeaderFirstPage: Any + lfo: Any + leftFooterOddPages: Any + lfe: Any + leftFooterEvenPages: Any + lff: Any + leftFooterFirstPage: Any + cfo: Any + centerFooterOddPages: Any + cfe: Any + centerFooterEvenPages: Any + cff: Any + centerFooterFirstPage: Any + rfo: Any + rightFooterOddPages: Any + rfe: Any + rightFooterEvenPages: Any + rff: Any + rightFooterFirstPage: Any + def __init__( + self, + id: Any | None = ..., + lho: Any | None = ..., + lhe: Any | None = ..., + lhf: Any | None = ..., + cho: Any | None = ..., + che: Any | None = ..., + chf: Any | None = ..., + rho: Any | None = ..., + rhe: Any | None = ..., + rhf: Any | None = ..., + lfo: Any | None = ..., + lfe: Any | None = ..., + lff: Any | None = ..., + cfo: Any | None = ..., + cfe: Any | None = ..., + cff: Any | None = ..., + rfo: Any | None = ..., + rfe: Any | None = ..., + rff: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/chartsheet/views.pyi b/stubs/openpyxl/openpyxl/chartsheet/views.pyi new file mode 100644 index 000000000..9c092e83a --- /dev/null +++ b/stubs/openpyxl/openpyxl/chartsheet/views.pyi @@ -0,0 +1,27 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ChartsheetView(Serialisable): + tagname: str + tabSelected: Any + zoomScale: Any + workbookViewId: Any + zoomToFit: Any + extLst: Any + __elements__: Any + def __init__( + self, + tabSelected: Any | None = ..., + zoomScale: Any | None = ..., + workbookViewId: int = ..., + zoomToFit: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class ChartsheetViewList(Serialisable): + tagname: str + sheetView: Any + extLst: Any + __elements__: Any + def __init__(self, sheetView: Any | None = ..., extLst: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/comments/__init__.pyi b/stubs/openpyxl/openpyxl/comments/__init__.pyi new file mode 100644 index 000000000..86ce8fc2d --- /dev/null +++ b/stubs/openpyxl/openpyxl/comments/__init__.pyi @@ -0,0 +1 @@ +from .comments import Comment as Comment diff --git a/stubs/openpyxl/openpyxl/comments/author.pyi b/stubs/openpyxl/openpyxl/comments/author.pyi new file mode 100644 index 000000000..b3aec7caf --- /dev/null +++ b/stubs/openpyxl/openpyxl/comments/author.pyi @@ -0,0 +1,9 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class AuthorList(Serialisable): + tagname: str + author: Any + authors: Any + def __init__(self, author=...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi b/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi new file mode 100644 index 000000000..e9eafa52b --- /dev/null +++ b/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi @@ -0,0 +1,88 @@ +from collections.abc import Generator +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Properties(Serialisable): + locked: Any + defaultSize: Any + disabled: Any + uiObject: Any + autoFill: Any + autoLine: Any + altText: Any + textHAlign: Any + textVAlign: Any + lockText: Any + justLastX: Any + autoScale: Any + rowHidden: Any + colHidden: Any + __elements__: Any + anchor: Any + def __init__( + self, + locked: Any | None = ..., + defaultSize: Any | None = ..., + _print: Any | None = ..., + disabled: Any | None = ..., + uiObject: Any | None = ..., + autoFill: Any | None = ..., + autoLine: Any | None = ..., + altText: Any | None = ..., + textHAlign: Any | None = ..., + textVAlign: Any | None = ..., + lockText: Any | None = ..., + justLastX: Any | None = ..., + autoScale: Any | None = ..., + rowHidden: Any | None = ..., + colHidden: Any | None = ..., + anchor: Any | None = ..., + ) -> None: ... + +class CommentRecord(Serialisable): + tagname: str + ref: Any + authorId: Any + guid: Any + shapeId: Any + text: Any + commentPr: Any + author: Any + __elements__: Any + __attrs__: Any + height: Any + width: Any + def __init__( + self, + ref: str = ..., + authorId: int = ..., + guid: Any | None = ..., + shapeId: int = ..., + text: Any | None = ..., + commentPr: Any | None = ..., + author: Any | None = ..., + height: int = ..., + width: int = ..., + ) -> None: ... + @classmethod + def from_cell(cls, cell): ... + @property + def content(self): ... + +class CommentSheet(Serialisable): + tagname: str + authors: Any + commentList: Any + extLst: Any + mime_type: str + __elements__: Any + def __init__(self, authors: Any | None = ..., commentList: Any | None = ..., extLst: Any | None = ...) -> None: ... + def to_tree(self): ... + @property + def comments(self) -> Generator[Any, None, None]: ... + @classmethod + def from_comments(cls, comments): ... + def write_shapes(self, vml: Any | None = ...): ... + @property + def path(self): ... diff --git a/stubs/openpyxl/openpyxl/comments/comments.pyi b/stubs/openpyxl/openpyxl/comments/comments.pyi new file mode 100644 index 000000000..60ec5e7fd --- /dev/null +++ b/stubs/openpyxl/openpyxl/comments/comments.pyi @@ -0,0 +1,18 @@ +from typing import Any + +class Comment: + content: Any + author: Any + height: Any + width: Any + def __init__(self, text, author, height: int = ..., width: int = ...) -> None: ... + @property + def parent(self): ... + def __eq__(self, other): ... + def __copy__(self): ... + def bind(self, cell) -> None: ... + def unbind(self) -> None: ... + @property + def text(self): ... + @text.setter + def text(self, value) -> None: ... diff --git a/stubs/openpyxl/openpyxl/comments/shape_writer.pyi b/stubs/openpyxl/openpyxl/comments/shape_writer.pyi new file mode 100644 index 000000000..db8b9133a --- /dev/null +++ b/stubs/openpyxl/openpyxl/comments/shape_writer.pyi @@ -0,0 +1,14 @@ +from typing import Any + +vmlns: str +officens: str +excelns: str + +class ShapeWriter: + vml: Any + vml_path: Any + comments: Any + def __init__(self, comments) -> None: ... + def add_comment_shapetype(self, root) -> None: ... + def add_comment_shape(self, root, idx, coord, height, width) -> None: ... + def write(self, root): ... diff --git a/stubs/openpyxl/openpyxl/compat/__init__.pyi b/stubs/openpyxl/openpyxl/compat/__init__.pyi new file mode 100644 index 000000000..c2ebdac2e --- /dev/null +++ b/stubs/openpyxl/openpyxl/compat/__init__.pyi @@ -0,0 +1,10 @@ +from typing import Any + +from .numbers import NUMERIC_TYPES as NUMERIC_TYPES +from .strings import safe_string as safe_string + +class DummyCode: ... + +string_types: Any + +def deprecated(reason): ... diff --git a/stubs/openpyxl/openpyxl/compat/abc.pyi b/stubs/openpyxl/openpyxl/compat/abc.pyi new file mode 100644 index 000000000..5beda934a --- /dev/null +++ b/stubs/openpyxl/openpyxl/compat/abc.pyi @@ -0,0 +1 @@ +from abc import ABC as ABC diff --git a/stubs/openpyxl/openpyxl/compat/numbers.pyi b/stubs/openpyxl/openpyxl/compat/numbers.pyi new file mode 100644 index 000000000..e0bf07024 --- /dev/null +++ b/stubs/openpyxl/openpyxl/compat/numbers.pyi @@ -0,0 +1,4 @@ +from typing import Any + +NUMERIC_TYPES: Any +NUMPY: bool diff --git a/stubs/openpyxl/openpyxl/compat/product.pyi b/stubs/openpyxl/openpyxl/compat/product.pyi new file mode 100644 index 000000000..60e7b2989 --- /dev/null +++ b/stubs/openpyxl/openpyxl/compat/product.pyi @@ -0,0 +1,3 @@ +def product(sequence): ... + +prod = product diff --git a/stubs/openpyxl/openpyxl/compat/singleton.pyi b/stubs/openpyxl/openpyxl/compat/singleton.pyi new file mode 100644 index 000000000..65403a663 --- /dev/null +++ b/stubs/openpyxl/openpyxl/compat/singleton.pyi @@ -0,0 +1,7 @@ +class Singleton(type): + def __init__(self, *args, **kw) -> None: ... + def __call__(self, *args, **kw): ... + +class Cached(type): + def __init__(self, *args, **kw) -> None: ... + def __call__(self, *args): ... diff --git a/stubs/openpyxl/openpyxl/compat/strings.pyi b/stubs/openpyxl/openpyxl/compat/strings.pyi new file mode 100644 index 000000000..0ab4f754f --- /dev/null +++ b/stubs/openpyxl/openpyxl/compat/strings.pyi @@ -0,0 +1,5 @@ +from typing import Any + +VER: Any + +def safe_string(value): ... diff --git a/stubs/openpyxl/openpyxl/descriptors/__init__.pyi b/stubs/openpyxl/openpyxl/descriptors/__init__.pyi new file mode 100644 index 000000000..228fef44e --- /dev/null +++ b/stubs/openpyxl/openpyxl/descriptors/__init__.pyi @@ -0,0 +1,13 @@ +from typing import Any + +from .base import * +from .sequence import Sequence as Sequence + +class MetaStrict(type): + def __new__(cls, clsname, bases, methods): ... + +class MetaSerialisable(type): + def __new__(cls, clsname, bases, methods): ... + +Strict: Any +_Serialiasable = Any diff --git a/stubs/openpyxl/openpyxl/descriptors/base.pyi b/stubs/openpyxl/openpyxl/descriptors/base.pyi new file mode 100644 index 000000000..2728212bc --- /dev/null +++ b/stubs/openpyxl/openpyxl/descriptors/base.pyi @@ -0,0 +1,85 @@ +from typing import Any + +class Descriptor: + name: Any + def __init__(self, name: Any | None = ..., **kw) -> None: ... + def __set__(self, instance, value) -> None: ... + +class Typed(Descriptor): + expected_type: Any + allow_none: bool + nested: bool + __doc__: Any + def __init__(self, *args, **kw) -> None: ... + def __set__(self, instance, value) -> None: ... + +class Convertible(Typed): + def __set__(self, instance, value) -> None: ... + +class Max(Convertible): + expected_type: Any + allow_none: bool + def __init__(self, **kw) -> None: ... + def __set__(self, instance, value) -> None: ... + +class Min(Convertible): + expected_type: Any + allow_none: bool + def __init__(self, **kw) -> None: ... + def __set__(self, instance, value) -> None: ... + +class MinMax(Min, Max): ... + +class Set(Descriptor): + __doc__: Any + def __init__(self, name: Any | None = ..., **kw) -> None: ... + def __set__(self, instance, value) -> None: ... + +class NoneSet(Set): + def __init__(self, name: Any | None = ..., **kw) -> None: ... + def __set__(self, instance, value) -> None: ... + +class Integer(Convertible): + expected_type: Any + +class Float(Convertible): + expected_type: Any + +class Bool(Convertible): + expected_type: Any + def __set__(self, instance, value) -> None: ... + +class String(Typed): + expected_type: Any + +class Text(String, Convertible): ... + +class ASCII(Typed): + expected_type: Any + +class Tuple(Typed): + expected_type: Any + +class Length(Descriptor): + def __init__(self, name: Any | None = ..., **kw) -> None: ... + def __set__(self, instance, value) -> None: ... + +class Default(Typed): + def __init__(self, name: Any | None = ..., **kw) -> None: ... + def __call__(self): ... + +class Alias(Descriptor): + alias: Any + def __init__(self, alias) -> None: ... + def __set__(self, instance, value) -> None: ... + def __get__(self, instance, cls): ... + +class MatchPattern(Descriptor): + allow_none: bool + test_pattern: Any + def __init__(self, name: Any | None = ..., **kw) -> None: ... + def __set__(self, instance, value) -> None: ... + +class DateTime(Typed): + expected_type: Any + def __set__(self, instance, value) -> None: ... diff --git a/stubs/openpyxl/openpyxl/descriptors/excel.pyi b/stubs/openpyxl/openpyxl/descriptors/excel.pyi new file mode 100644 index 000000000..15bd45f64 --- /dev/null +++ b/stubs/openpyxl/openpyxl/descriptors/excel.pyi @@ -0,0 +1,46 @@ +from typing import Any + +from . import Integer, MatchPattern, MinMax, String +from .serialisable import Serialisable + +class HexBinary(MatchPattern): + pattern: str + +class UniversalMeasure(MatchPattern): + pattern: str + +class TextPoint(MinMax): + expected_type: Any + min: int + max: int + +Coordinate = Integer + +class Percentage(MinMax): + pattern: str + min: int + max: int + def __set__(self, instance, value) -> None: ... + +class Extension(Serialisable): + uri: Any + def __init__(self, uri: Any | None = ...) -> None: ... + +class ExtensionList(Serialisable): + ext: Any + def __init__(self, ext=...) -> None: ... + +class Relation(String): + namespace: Any + allow_none: bool + +class Base64Binary(MatchPattern): + pattern: str + +class Guid(MatchPattern): + pattern: str + +class CellRange(MatchPattern): + pattern: str + allow_none: bool + def __set__(self, instance, value) -> None: ... diff --git a/stubs/openpyxl/openpyxl/descriptors/namespace.pyi b/stubs/openpyxl/openpyxl/descriptors/namespace.pyi new file mode 100644 index 000000000..33f2eacb7 --- /dev/null +++ b/stubs/openpyxl/openpyxl/descriptors/namespace.pyi @@ -0,0 +1,3 @@ +from typing import Any + +def namespaced(obj, tagname, namespace: Any | None = ...): ... diff --git a/stubs/openpyxl/openpyxl/descriptors/nested.pyi b/stubs/openpyxl/openpyxl/descriptors/nested.pyi new file mode 100644 index 000000000..d63cfdb04 --- /dev/null +++ b/stubs/openpyxl/openpyxl/descriptors/nested.pyi @@ -0,0 +1,31 @@ +from typing import Any + +from .base import Bool, Convertible, Descriptor, Float, Integer, MinMax, NoneSet, Set, String + +class Nested(Descriptor): + nested: bool + attribute: str + def __set__(self, instance, value) -> None: ... + def from_tree(self, node): ... + def to_tree(self, tagname: Any | None = ..., value: Any | None = ..., namespace: Any | None = ...): ... + +class NestedValue(Nested, Convertible): ... + +class NestedText(NestedValue): + def from_tree(self, node): ... + def to_tree(self, tagname: Any | None = ..., value: Any | None = ..., namespace: Any | None = ...): ... + +class NestedFloat(NestedValue, Float): ... +class NestedInteger(NestedValue, Integer): ... +class NestedString(NestedValue, String): ... + +class NestedBool(NestedValue, Bool): + def from_tree(self, node): ... + +class NestedNoneSet(Nested, NoneSet): ... +class NestedSet(Nested, Set): ... +class NestedMinMax(Nested, MinMax): ... + +class EmptyTag(Nested, Bool): + def from_tree(self, node): ... + def to_tree(self, tagname: Any | None = ..., value: Any | None = ..., namespace: Any | None = ...): ... diff --git a/stubs/openpyxl/openpyxl/descriptors/sequence.pyi b/stubs/openpyxl/openpyxl/descriptors/sequence.pyi new file mode 100644 index 000000000..730fb2063 --- /dev/null +++ b/stubs/openpyxl/openpyxl/descriptors/sequence.pyi @@ -0,0 +1,33 @@ +from collections.abc import Generator +from typing import Any + +from .base import Alias, Descriptor + +class Sequence(Descriptor): + expected_type: Any + seq_types: Any + idx_base: int + unique: bool + def __set__(self, instance, seq) -> None: ... + def to_tree(self, tagname, obj, namespace: Any | None = ...) -> Generator[Any, None, None]: ... + +class ValueSequence(Sequence): + attribute: str + def to_tree(self, tagname, obj, namespace: Any | None = ...) -> Generator[Any, None, None]: ... + def from_tree(self, node): ... + +class NestedSequence(Sequence): + count: bool + def to_tree(self, tagname, obj, namespace: Any | None = ...): ... + def from_tree(self, node): ... + +class MultiSequence(Sequence): + def __set__(self, instance, seq) -> None: ... + def to_tree(self, tagname, obj, namespace: Any | None = ...) -> Generator[Any, None, None]: ... + +class MultiSequencePart(Alias): + expected_type: Any + store: Any + def __init__(self, expected_type, store) -> None: ... + def __set__(self, instance, value) -> None: ... + def __get__(self, instance, cls): ... diff --git a/stubs/openpyxl/openpyxl/descriptors/serialisable.pyi b/stubs/openpyxl/openpyxl/descriptors/serialisable.pyi new file mode 100644 index 000000000..4df537886 --- /dev/null +++ b/stubs/openpyxl/openpyxl/descriptors/serialisable.pyi @@ -0,0 +1,27 @@ +from typing import Any + +from . import _Serialiasable + +KEYWORDS: Any +seq_types: Any + +class Serialisable(_Serialiasable): + __attrs__: Any + __nested__: Any + __elements__: Any + __namespaced__: Any + idx_base: int + @property + # TODO: needs overrides in many sub-classes + # @abstractmethod + def tagname(self) -> str: ... + namespace: Any + @classmethod + def from_tree(cls, node): ... + def to_tree(self, tagname: Any | None = ..., idx: Any | None = ..., namespace: Any | None = ...): ... + def __iter__(self): ... + def __eq__(self, other): ... + def __ne__(self, other): ... + def __hash__(self): ... + def __add__(self, other): ... + def __copy__(self): ... diff --git a/stubs/openpyxl/openpyxl/descriptors/slots.pyi b/stubs/openpyxl/openpyxl/descriptors/slots.pyi new file mode 100644 index 000000000..87f6a0755 --- /dev/null +++ b/stubs/openpyxl/openpyxl/descriptors/slots.pyi @@ -0,0 +1,2 @@ +class AutoSlotProperties(type): + def __new__(cls, classname, bases, dictionary): ... diff --git a/stubs/openpyxl/openpyxl/drawing/__init__.pyi b/stubs/openpyxl/openpyxl/drawing/__init__.pyi new file mode 100644 index 000000000..a41cad04e --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/__init__.pyi @@ -0,0 +1 @@ +from .drawing import Drawing as Drawing diff --git a/stubs/openpyxl/openpyxl/drawing/colors.pyi b/stubs/openpyxl/openpyxl/drawing/colors.pyi new file mode 100644 index 000000000..2af9bc6c3 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/colors.pyi @@ -0,0 +1,216 @@ +from typing import Any + +from openpyxl.descriptors import Typed +from openpyxl.descriptors.serialisable import Serialisable + +PRESET_COLORS: Any +SCHEME_COLORS: Any + +class Transform(Serialisable): ... + +class SystemColor(Serialisable): + tagname: str + namespace: Any + tint: Any + shade: Any + comp: Any + inv: Any + gray: Any + alpha: Any + alphaOff: Any + alphaMod: Any + hue: Any + hueOff: Any + hueMod: Any + sat: Any + satOff: Any + satMod: Any + lum: Any + lumOff: Any + lumMod: Any + red: Any + redOff: Any + redMod: Any + green: Any + greenOff: Any + greenMod: Any + blue: Any + blueOff: Any + blueMod: Any + gamma: Any + invGamma: Any + val: Any + lastClr: Any + __elements__: Any + def __init__( + self, + val: str = ..., + lastClr: Any | None = ..., + tint: Any | None = ..., + shade: Any | None = ..., + comp: Any | None = ..., + inv: Any | None = ..., + gray: Any | None = ..., + alpha: Any | None = ..., + alphaOff: Any | None = ..., + alphaMod: Any | None = ..., + hue: Any | None = ..., + hueOff: Any | None = ..., + hueMod: Any | None = ..., + sat: Any | None = ..., + satOff: Any | None = ..., + satMod: Any | None = ..., + lum: Any | None = ..., + lumOff: Any | None = ..., + lumMod: Any | None = ..., + red: Any | None = ..., + redOff: Any | None = ..., + redMod: Any | None = ..., + green: Any | None = ..., + greenOff: Any | None = ..., + greenMod: Any | None = ..., + blue: Any | None = ..., + blueOff: Any | None = ..., + blueMod: Any | None = ..., + gamma: Any | None = ..., + invGamma: Any | None = ..., + ) -> None: ... + +class HSLColor(Serialisable): + tagname: str + hue: Any + sat: Any + lum: Any + def __init__(self, hue: Any | None = ..., sat: Any | None = ..., lum: Any | None = ...) -> None: ... + +class RGBPercent(Serialisable): + tagname: str + r: Any + g: Any + b: Any + def __init__(self, r: Any | None = ..., g: Any | None = ..., b: Any | None = ...) -> None: ... + +class SchemeColor(Serialisable): + tagname: str + namespace: Any + tint: Any + shade: Any + comp: Any + inv: Any + gray: Any + alpha: Any + alphaOff: Any + alphaMod: Any + hue: Any + hueOff: Any + hueMod: Any + sat: Any + satOff: Any + satMod: Any + lum: Any + lumOff: Any + lumMod: Any + red: Any + redOff: Any + redMod: Any + green: Any + greenOff: Any + greenMod: Any + blue: Any + blueOff: Any + blueMod: Any + gamma: Any + invGamma: Any + val: Any + __elements__: Any + def __init__( + self, + tint: Any | None = ..., + shade: Any | None = ..., + comp: Any | None = ..., + inv: Any | None = ..., + gray: Any | None = ..., + alpha: Any | None = ..., + alphaOff: Any | None = ..., + alphaMod: Any | None = ..., + hue: Any | None = ..., + hueOff: Any | None = ..., + hueMod: Any | None = ..., + sat: Any | None = ..., + satOff: Any | None = ..., + satMod: Any | None = ..., + lum: Any | None = ..., + lumOff: Any | None = ..., + lumMod: Any | None = ..., + red: Any | None = ..., + redOff: Any | None = ..., + redMod: Any | None = ..., + green: Any | None = ..., + greenOff: Any | None = ..., + greenMod: Any | None = ..., + blue: Any | None = ..., + blueOff: Any | None = ..., + blueMod: Any | None = ..., + gamma: Any | None = ..., + invGamma: Any | None = ..., + val: Any | None = ..., + ) -> None: ... + +class ColorChoice(Serialisable): + tagname: str + namespace: Any + scrgbClr: Any + RGBPercent: Any + srgbClr: Any + RGB: Any + hslClr: Any + sysClr: Any + schemeClr: Any + prstClr: Any + __elements__: Any + def __init__( + self, + scrgbClr: Any | None = ..., + srgbClr: Any | None = ..., + hslClr: Any | None = ..., + sysClr: Any | None = ..., + schemeClr: Any | None = ..., + prstClr: Any | None = ..., + ) -> None: ... + +class ColorMapping(Serialisable): + tagname: str + bg1: Any + tx1: Any + bg2: Any + tx2: Any + accent1: Any + accent2: Any + accent3: Any + accent4: Any + accent5: Any + accent6: Any + hlink: Any + folHlink: Any + extLst: Any + def __init__( + self, + bg1: str = ..., + tx1: str = ..., + bg2: str = ..., + tx2: str = ..., + accent1: str = ..., + accent2: str = ..., + accent3: str = ..., + accent4: str = ..., + accent5: str = ..., + accent6: str = ..., + hlink: str = ..., + folHlink: str = ..., + extLst: Any | None = ..., + ) -> None: ... + +class ColorChoiceDescriptor(Typed): + expected_type: Any + allow_none: bool + def __set__(self, instance, value) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/connector.pyi b/stubs/openpyxl/openpyxl/drawing/connector.pyi new file mode 100644 index 000000000..3b3e8a479 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/connector.pyi @@ -0,0 +1,72 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Connection(Serialisable): + id: Any + idx: Any + def __init__(self, id: Any | None = ..., idx: Any | None = ...) -> None: ... + +class ConnectorLocking(Serialisable): + extLst: Any + def __init__(self, extLst: Any | None = ...) -> None: ... + +class NonVisualConnectorProperties(Serialisable): + cxnSpLocks: Any + stCxn: Any + endCxn: Any + extLst: Any + def __init__( + self, cxnSpLocks: Any | None = ..., stCxn: Any | None = ..., endCxn: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class ConnectorNonVisual(Serialisable): + cNvPr: Any + cNvCxnSpPr: Any + __elements__: Any + def __init__(self, cNvPr: Any | None = ..., cNvCxnSpPr: Any | None = ...) -> None: ... + +class ConnectorShape(Serialisable): + tagname: str + nvCxnSpPr: Any + spPr: Any + style: Any + macro: Any + fPublished: Any + def __init__( + self, + nvCxnSpPr: Any | None = ..., + spPr: Any | None = ..., + style: Any | None = ..., + macro: Any | None = ..., + fPublished: Any | None = ..., + ) -> None: ... + +class ShapeMeta(Serialisable): + tagname: str + cNvPr: Any + cNvSpPr: Any + def __init__(self, cNvPr: Any | None = ..., cNvSpPr: Any | None = ...) -> None: ... + +class Shape(Serialisable): + macro: Any + textlink: Any + fPublished: Any + fLocksText: Any + nvSpPr: Any + meta: Any + spPr: Any + graphicalProperties: Any + style: Any + txBody: Any + def __init__( + self, + macro: Any | None = ..., + textlink: Any | None = ..., + fPublished: Any | None = ..., + fLocksText: Any | None = ..., + nvSpPr: Any | None = ..., + spPr: Any | None = ..., + style: Any | None = ..., + txBody: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/drawing.pyi b/stubs/openpyxl/openpyxl/drawing/drawing.pyi new file mode 100644 index 000000000..10f90e212 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/drawing.pyi @@ -0,0 +1,27 @@ +from typing import Any + +class Drawing: + count: int + name: str + description: str + coordinates: Any + left: int + top: int + resize_proportional: bool + rotation: int + anchortype: str + anchorcol: int + anchorrow: int + def __init__(self) -> None: ... + @property + def width(self): ... + @width.setter + def width(self, w) -> None: ... + @property + def height(self): ... + @height.setter + def height(self, h) -> None: ... + def set_dimension(self, w: int = ..., h: int = ...) -> None: ... + def get_emu_dimensions(self): ... + @property + def anchor(self): ... diff --git a/stubs/openpyxl/openpyxl/drawing/effect.pyi b/stubs/openpyxl/openpyxl/drawing/effect.pyi new file mode 100644 index 000000000..d81f96822 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/effect.pyi @@ -0,0 +1,202 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +from .colors import ColorChoice + +class TintEffect(Serialisable): + tagname: str + hue: Any + amt: Any + def __init__(self, hue: int = ..., amt: int = ...) -> None: ... + +class LuminanceEffect(Serialisable): + tagname: str + bright: Any + contrast: Any + def __init__(self, bright: int = ..., contrast: int = ...) -> None: ... + +class HSLEffect(Serialisable): + hue: Any + sat: Any + lum: Any + def __init__(self, hue: Any | None = ..., sat: Any | None = ..., lum: Any | None = ...) -> None: ... + +class GrayscaleEffect(Serialisable): + tagname: str + +class FillOverlayEffect(Serialisable): + blend: Any + def __init__(self, blend: Any | None = ...) -> None: ... + +class DuotoneEffect(Serialisable): ... +class ColorReplaceEffect(Serialisable): ... +class Color(Serialisable): ... + +class ColorChangeEffect(Serialisable): + useA: Any + clrFrom: Any + clrTo: Any + def __init__(self, useA: Any | None = ..., clrFrom: Any | None = ..., clrTo: Any | None = ...) -> None: ... + +class BlurEffect(Serialisable): + rad: Any + grow: Any + def __init__(self, rad: Any | None = ..., grow: Any | None = ...) -> None: ... + +class BiLevelEffect(Serialisable): + thresh: Any + def __init__(self, thresh: Any | None = ...) -> None: ... + +class AlphaReplaceEffect(Serialisable): + a: Any + def __init__(self, a: Any | None = ...) -> None: ... + +class AlphaModulateFixedEffect(Serialisable): + amt: Any + def __init__(self, amt: Any | None = ...) -> None: ... + +class EffectContainer(Serialisable): + type: Any + name: Any + def __init__(self, type: Any | None = ..., name: Any | None = ...) -> None: ... + +class AlphaModulateEffect(Serialisable): + cont: Any + def __init__(self, cont: Any | None = ...) -> None: ... + +class AlphaInverseEffect(Serialisable): ... +class AlphaFloorEffect(Serialisable): ... +class AlphaCeilingEffect(Serialisable): ... + +class AlphaBiLevelEffect(Serialisable): + thresh: Any + def __init__(self, thresh: Any | None = ...) -> None: ... + +class GlowEffect(ColorChoice): + rad: Any + scrgbClr: Any + srgbClr: Any + hslClr: Any + sysClr: Any + schemeClr: Any + prstClr: Any + __elements__: Any + def __init__(self, rad: Any | None = ..., **kw) -> None: ... + +class InnerShadowEffect(ColorChoice): + blurRad: Any + dist: Any + dir: Any + scrgbClr: Any + srgbClr: Any + hslClr: Any + sysClr: Any + schemeClr: Any + prstClr: Any + __elements__: Any + def __init__(self, blurRad: Any | None = ..., dist: Any | None = ..., dir: Any | None = ..., **kw) -> None: ... + +class OuterShadow(ColorChoice): + tagname: str + blurRad: Any + dist: Any + dir: Any + sx: Any + sy: Any + kx: Any + ky: Any + algn: Any + rotWithShape: Any + scrgbClr: Any + srgbClr: Any + hslClr: Any + sysClr: Any + schemeClr: Any + prstClr: Any + __elements__: Any + def __init__( + self, + blurRad: Any | None = ..., + dist: Any | None = ..., + dir: Any | None = ..., + sx: Any | None = ..., + sy: Any | None = ..., + kx: Any | None = ..., + ky: Any | None = ..., + algn: Any | None = ..., + rotWithShape: Any | None = ..., + **kw, + ) -> None: ... + +class PresetShadowEffect(ColorChoice): + prst: Any + dist: Any + dir: Any + scrgbClr: Any + srgbClr: Any + hslClr: Any + sysClr: Any + schemeClr: Any + prstClr: Any + __elements__: Any + def __init__(self, prst: Any | None = ..., dist: Any | None = ..., dir: Any | None = ..., **kw) -> None: ... + +class ReflectionEffect(Serialisable): + blurRad: Any + stA: Any + stPos: Any + endA: Any + endPos: Any + dist: Any + dir: Any + fadeDir: Any + sx: Any + sy: Any + kx: Any + ky: Any + algn: Any + rotWithShape: Any + def __init__( + self, + blurRad: Any | None = ..., + stA: Any | None = ..., + stPos: Any | None = ..., + endA: Any | None = ..., + endPos: Any | None = ..., + dist: Any | None = ..., + dir: Any | None = ..., + fadeDir: Any | None = ..., + sx: Any | None = ..., + sy: Any | None = ..., + kx: Any | None = ..., + ky: Any | None = ..., + algn: Any | None = ..., + rotWithShape: Any | None = ..., + ) -> None: ... + +class SoftEdgesEffect(Serialisable): + rad: Any + def __init__(self, rad: Any | None = ...) -> None: ... + +class EffectList(Serialisable): + blur: Any + fillOverlay: Any + glow: Any + innerShdw: Any + outerShdw: Any + prstShdw: Any + reflection: Any + softEdge: Any + __elements__: Any + def __init__( + self, + blur: Any | None = ..., + fillOverlay: Any | None = ..., + glow: Any | None = ..., + innerShdw: Any | None = ..., + outerShdw: Any | None = ..., + prstShdw: Any | None = ..., + reflection: Any | None = ..., + softEdge: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/fill.pyi b/stubs/openpyxl/openpyxl/drawing/fill.pyi new file mode 100644 index 000000000..6dbc40d67 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/fill.pyi @@ -0,0 +1,221 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class PatternFillProperties(Serialisable): + tagname: str + namespace: Any + prst: Any + preset: Any + fgClr: Any + foreground: Any + bgClr: Any + background: Any + __elements__: Any + def __init__(self, prst: Any | None = ..., fgClr: Any | None = ..., bgClr: Any | None = ...) -> None: ... + +class RelativeRect(Serialisable): + tagname: str + namespace: Any + l: Any + left: Any + t: Any + top: Any + r: Any + right: Any + b: Any + bottom: Any + def __init__(self, l: Any | None = ..., t: Any | None = ..., r: Any | None = ..., b: Any | None = ...) -> None: ... + +class StretchInfoProperties(Serialisable): + tagname: str + namespace: Any + fillRect: Any + def __init__(self, fillRect=...) -> None: ... + +class GradientStop(Serialisable): + tagname: str + namespace: Any + pos: Any + scrgbClr: Any + RGBPercent: Any + srgbClr: Any + RGB: Any + hslClr: Any + sysClr: Any + schemeClr: Any + prstClr: Any + __elements__: Any + def __init__( + self, + pos: Any | None = ..., + scrgbClr: Any | None = ..., + srgbClr: Any | None = ..., + hslClr: Any | None = ..., + sysClr: Any | None = ..., + schemeClr: Any | None = ..., + prstClr: Any | None = ..., + ) -> None: ... + +class LinearShadeProperties(Serialisable): + tagname: str + namespace: Any + ang: Any + scaled: Any + def __init__(self, ang: Any | None = ..., scaled: Any | None = ...) -> None: ... + +class PathShadeProperties(Serialisable): + tagname: str + namespace: Any + path: Any + fillToRect: Any + def __init__(self, path: Any | None = ..., fillToRect: Any | None = ...) -> None: ... + +class GradientFillProperties(Serialisable): + tagname: str + namespace: Any + flip: Any + rotWithShape: Any + gsLst: Any + stop_list: Any + lin: Any + linear: Any + path: Any + tileRect: Any + __elements__: Any + def __init__( + self, + flip: Any | None = ..., + rotWithShape: Any | None = ..., + gsLst=..., + lin: Any | None = ..., + path: Any | None = ..., + tileRect: Any | None = ..., + ) -> None: ... + +class SolidColorFillProperties(Serialisable): + tagname: str + scrgbClr: Any + RGBPercent: Any + srgbClr: Any + RGB: Any + hslClr: Any + sysClr: Any + schemeClr: Any + prstClr: Any + __elements__: Any + def __init__( + self, + scrgbClr: Any | None = ..., + srgbClr: Any | None = ..., + hslClr: Any | None = ..., + sysClr: Any | None = ..., + schemeClr: Any | None = ..., + prstClr: Any | None = ..., + ) -> None: ... + +class Blip(Serialisable): + tagname: str + namespace: Any + cstate: Any + embed: Any + link: Any + noGrp: Any + noSelect: Any + noRot: Any + noChangeAspect: Any + noMove: Any + noResize: Any + noEditPoints: Any + noAdjustHandles: Any + noChangeArrowheads: Any + noChangeShapeType: Any + extLst: Any + alphaBiLevel: Any + alphaCeiling: Any + alphaFloor: Any + alphaInv: Any + alphaMod: Any + alphaModFix: Any + alphaRepl: Any + biLevel: Any + blur: Any + clrChange: Any + clrRepl: Any + duotone: Any + fillOverlay: Any + grayscl: Any + hsl: Any + lum: Any + tint: Any + __elements__: Any + def __init__( + self, + cstate: Any | None = ..., + embed: Any | None = ..., + link: Any | None = ..., + noGrp: Any | None = ..., + noSelect: Any | None = ..., + noRot: Any | None = ..., + noChangeAspect: Any | None = ..., + noMove: Any | None = ..., + noResize: Any | None = ..., + noEditPoints: Any | None = ..., + noAdjustHandles: Any | None = ..., + noChangeArrowheads: Any | None = ..., + noChangeShapeType: Any | None = ..., + extLst: Any | None = ..., + alphaBiLevel: Any | None = ..., + alphaCeiling: Any | None = ..., + alphaFloor: Any | None = ..., + alphaInv: Any | None = ..., + alphaMod: Any | None = ..., + alphaModFix: Any | None = ..., + alphaRepl: Any | None = ..., + biLevel: Any | None = ..., + blur: Any | None = ..., + clrChange: Any | None = ..., + clrRepl: Any | None = ..., + duotone: Any | None = ..., + fillOverlay: Any | None = ..., + grayscl: Any | None = ..., + hsl: Any | None = ..., + lum: Any | None = ..., + tint: Any | None = ..., + ) -> None: ... + +class TileInfoProperties(Serialisable): + tx: Any + ty: Any + sx: Any + sy: Any + flip: Any + algn: Any + def __init__( + self, + tx: Any | None = ..., + ty: Any | None = ..., + sx: Any | None = ..., + sy: Any | None = ..., + flip: Any | None = ..., + algn: Any | None = ..., + ) -> None: ... + +class BlipFillProperties(Serialisable): + tagname: str + dpi: Any + rotWithShape: Any + blip: Any + srcRect: Any + tile: Any + stretch: Any + __elements__: Any + def __init__( + self, + dpi: Any | None = ..., + rotWithShape: Any | None = ..., + blip: Any | None = ..., + tile: Any | None = ..., + stretch=..., + srcRect: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/geometry.pyi b/stubs/openpyxl/openpyxl/drawing/geometry.pyi new file mode 100644 index 000000000..8515b2eda --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/geometry.pyi @@ -0,0 +1,239 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Point2D(Serialisable): + tagname: str + namespace: Any + x: Any + y: Any + def __init__(self, x: Any | None = ..., y: Any | None = ...) -> None: ... + +class PositiveSize2D(Serialisable): + tagname: str + namespace: Any + cx: Any + width: Any + cy: Any + height: Any + def __init__(self, cx: Any | None = ..., cy: Any | None = ...) -> None: ... + +class Transform2D(Serialisable): + tagname: str + namespace: Any + rot: Any + flipH: Any + flipV: Any + off: Any + ext: Any + chOff: Any + chExt: Any + __elements__: Any + def __init__( + self, + rot: Any | None = ..., + flipH: Any | None = ..., + flipV: Any | None = ..., + off: Any | None = ..., + ext: Any | None = ..., + chOff: Any | None = ..., + chExt: Any | None = ..., + ) -> None: ... + +class GroupTransform2D(Serialisable): + tagname: str + namespace: Any + rot: Any + flipH: Any + flipV: Any + off: Any + ext: Any + chOff: Any + chExt: Any + __elements__: Any + def __init__( + self, + rot: int = ..., + flipH: Any | None = ..., + flipV: Any | None = ..., + off: Any | None = ..., + ext: Any | None = ..., + chOff: Any | None = ..., + chExt: Any | None = ..., + ) -> None: ... + +class SphereCoords(Serialisable): + tagname: str + lat: Any + lon: Any + rev: Any + def __init__(self, lat: Any | None = ..., lon: Any | None = ..., rev: Any | None = ...) -> None: ... + +class Camera(Serialisable): + tagname: str + prst: Any + fov: Any + zoom: Any + rot: Any + def __init__(self, prst: Any | None = ..., fov: Any | None = ..., zoom: Any | None = ..., rot: Any | None = ...) -> None: ... + +class LightRig(Serialisable): + tagname: str + rig: Any + dir: Any + rot: Any + def __init__(self, rig: Any | None = ..., dir: Any | None = ..., rot: Any | None = ...) -> None: ... + +class Vector3D(Serialisable): + tagname: str + dx: Any + dy: Any + dz: Any + def __init__(self, dx: Any | None = ..., dy: Any | None = ..., dz: Any | None = ...) -> None: ... + +class Point3D(Serialisable): + tagname: str + x: Any + y: Any + z: Any + def __init__(self, x: Any | None = ..., y: Any | None = ..., z: Any | None = ...) -> None: ... + +class Backdrop(Serialisable): + anchor: Any + norm: Any + up: Any + extLst: Any + def __init__( + self, anchor: Any | None = ..., norm: Any | None = ..., up: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class Scene3D(Serialisable): + camera: Any + lightRig: Any + backdrop: Any + extLst: Any + def __init__( + self, camera: Any | None = ..., lightRig: Any | None = ..., backdrop: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class Bevel(Serialisable): + tagname: str + w: Any + h: Any + prst: Any + def __init__(self, w: Any | None = ..., h: Any | None = ..., prst: Any | None = ...) -> None: ... + +class Shape3D(Serialisable): + namespace: Any + z: Any + extrusionH: Any + contourW: Any + prstMaterial: Any + bevelT: Any + bevelB: Any + extrusionClr: Any + contourClr: Any + extLst: Any + def __init__( + self, + z: Any | None = ..., + extrusionH: Any | None = ..., + contourW: Any | None = ..., + prstMaterial: Any | None = ..., + bevelT: Any | None = ..., + bevelB: Any | None = ..., + extrusionClr: Any | None = ..., + contourClr: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class Path2D(Serialisable): + w: Any + h: Any + fill: Any + stroke: Any + extrusionOk: Any + def __init__( + self, + w: Any | None = ..., + h: Any | None = ..., + fill: Any | None = ..., + stroke: Any | None = ..., + extrusionOk: Any | None = ..., + ) -> None: ... + +class Path2DList(Serialisable): + path: Any + def __init__(self, path: Any | None = ...) -> None: ... + +class GeomRect(Serialisable): + l: Any + t: Any + r: Any + b: Any + def __init__(self, l: Any | None = ..., t: Any | None = ..., r: Any | None = ..., b: Any | None = ...) -> None: ... + +class AdjPoint2D(Serialisable): + x: Any + y: Any + def __init__(self, x: Any | None = ..., y: Any | None = ...) -> None: ... + +class ConnectionSite(Serialisable): + ang: Any + pos: Any + def __init__(self, ang: Any | None = ..., pos: Any | None = ...) -> None: ... + +class ConnectionSiteList(Serialisable): + cxn: Any + def __init__(self, cxn: Any | None = ...) -> None: ... + +class AdjustHandleList(Serialisable): ... + +class GeomGuide(Serialisable): + name: Any + fmla: Any + def __init__(self, name: Any | None = ..., fmla: Any | None = ...) -> None: ... + +class GeomGuideList(Serialisable): + gd: Any + def __init__(self, gd: Any | None = ...) -> None: ... + +class CustomGeometry2D(Serialisable): + avLst: Any + gdLst: Any + ahLst: Any + cxnLst: Any + pathLst: Any + rect: Any + def __init__( + self, + avLst: Any | None = ..., + gdLst: Any | None = ..., + ahLst: Any | None = ..., + cxnLst: Any | None = ..., + rect: Any | None = ..., + pathLst: Any | None = ..., + ) -> None: ... + +class PresetGeometry2D(Serialisable): + namespace: Any + prst: Any + avLst: Any + def __init__(self, prst: Any | None = ..., avLst: Any | None = ...) -> None: ... + +class FontReference(Serialisable): + idx: Any + def __init__(self, idx: Any | None = ...) -> None: ... + +class StyleMatrixReference(Serialisable): + idx: Any + def __init__(self, idx: Any | None = ...) -> None: ... + +class ShapeStyle(Serialisable): + lnRef: Any + fillRef: Any + effectRef: Any + fontRef: Any + def __init__( + self, lnRef: Any | None = ..., fillRef: Any | None = ..., effectRef: Any | None = ..., fontRef: Any | None = ... + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/graphic.pyi b/stubs/openpyxl/openpyxl/drawing/graphic.pyi new file mode 100644 index 000000000..4f75f0676 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/graphic.pyi @@ -0,0 +1,74 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class GraphicFrameLocking(Serialisable): + noGrp: Any + noDrilldown: Any + noSelect: Any + noChangeAspect: Any + noMove: Any + noResize: Any + extLst: Any + def __init__( + self, + noGrp: Any | None = ..., + noDrilldown: Any | None = ..., + noSelect: Any | None = ..., + noChangeAspect: Any | None = ..., + noMove: Any | None = ..., + noResize: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class NonVisualGraphicFrameProperties(Serialisable): + tagname: str + graphicFrameLocks: Any + extLst: Any + def __init__(self, graphicFrameLocks: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class NonVisualGraphicFrame(Serialisable): + tagname: str + cNvPr: Any + cNvGraphicFramePr: Any + __elements__: Any + def __init__(self, cNvPr: Any | None = ..., cNvGraphicFramePr: Any | None = ...) -> None: ... + +class GraphicData(Serialisable): + tagname: str + namespace: Any + uri: Any + chart: Any + def __init__(self, uri=..., chart: Any | None = ...) -> None: ... + +class GraphicObject(Serialisable): + tagname: str + namespace: Any + graphicData: Any + def __init__(self, graphicData: Any | None = ...) -> None: ... + +class GraphicFrame(Serialisable): + tagname: str + nvGraphicFramePr: Any + xfrm: Any + graphic: Any + macro: Any + fPublished: Any + __elements__: Any + def __init__( + self, + nvGraphicFramePr: Any | None = ..., + xfrm: Any | None = ..., + graphic: Any | None = ..., + macro: Any | None = ..., + fPublished: Any | None = ..., + ) -> None: ... + +class GroupShape(Serialisable): + nvGrpSpPr: Any + nonVisualProperties: Any + grpSpPr: Any + visualProperties: Any + pic: Any + __elements__: Any + def __init__(self, nvGrpSpPr: Any | None = ..., grpSpPr: Any | None = ..., pic: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/image.pyi b/stubs/openpyxl/openpyxl/drawing/image.pyi new file mode 100644 index 000000000..c1d8009f2 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/image.pyi @@ -0,0 +1,9 @@ +from typing import Any + +class Image: + anchor: str + ref: Any + format: Any + def __init__(self, img) -> None: ... + @property + def path(self): ... diff --git a/stubs/openpyxl/openpyxl/drawing/line.pyi b/stubs/openpyxl/openpyxl/drawing/line.pyi new file mode 100644 index 000000000..dd2c5395c --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/line.pyi @@ -0,0 +1,66 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class LineEndProperties(Serialisable): + tagname: str + namespace: Any + type: Any + w: Any + len: Any + def __init__(self, type: Any | None = ..., w: Any | None = ..., len: Any | None = ...) -> None: ... + +class DashStop(Serialisable): + tagname: str + namespace: Any + d: Any + length: Any + sp: Any + space: Any + def __init__(self, d: int = ..., sp: int = ...) -> None: ... + +class DashStopList(Serialisable): + ds: Any + def __init__(self, ds: Any | None = ...) -> None: ... + +class LineProperties(Serialisable): + tagname: str + namespace: Any + w: Any + width: Any + cap: Any + cmpd: Any + algn: Any + noFill: Any + solidFill: Any + gradFill: Any + pattFill: Any + prstDash: Any + dashStyle: Any + custDash: Any + round: Any + bevel: Any + miter: Any + headEnd: Any + tailEnd: Any + extLst: Any + __elements__: Any + def __init__( + self, + w: Any | None = ..., + cap: Any | None = ..., + cmpd: Any | None = ..., + algn: Any | None = ..., + noFill: Any | None = ..., + solidFill: Any | None = ..., + gradFill: Any | None = ..., + pattFill: Any | None = ..., + prstDash: Any | None = ..., + custDash: Any | None = ..., + round: Any | None = ..., + bevel: Any | None = ..., + miter: Any | None = ..., + headEnd: Any | None = ..., + tailEnd: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/picture.pyi b/stubs/openpyxl/openpyxl/drawing/picture.pyi new file mode 100644 index 000000000..1ff1db8e8 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/picture.pyi @@ -0,0 +1,70 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class PictureLocking(Serialisable): + tagname: str + namespace: Any + noCrop: Any + noGrp: Any + noSelect: Any + noRot: Any + noChangeAspect: Any + noMove: Any + noResize: Any + noEditPoints: Any + noAdjustHandles: Any + noChangeArrowheads: Any + noChangeShapeType: Any + extLst: Any + __elements__: Any + def __init__( + self, + noCrop: Any | None = ..., + noGrp: Any | None = ..., + noSelect: Any | None = ..., + noRot: Any | None = ..., + noChangeAspect: Any | None = ..., + noMove: Any | None = ..., + noResize: Any | None = ..., + noEditPoints: Any | None = ..., + noAdjustHandles: Any | None = ..., + noChangeArrowheads: Any | None = ..., + noChangeShapeType: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class NonVisualPictureProperties(Serialisable): + tagname: str + preferRelativeResize: Any + picLocks: Any + extLst: Any + __elements__: Any + def __init__(self, preferRelativeResize: Any | None = ..., picLocks: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class PictureNonVisual(Serialisable): + tagname: str + cNvPr: Any + cNvPicPr: Any + __elements__: Any + def __init__(self, cNvPr: Any | None = ..., cNvPicPr: Any | None = ...) -> None: ... + +class PictureFrame(Serialisable): + tagname: str + macro: Any + fPublished: Any + nvPicPr: Any + blipFill: Any + spPr: Any + graphicalProperties: Any + style: Any + __elements__: Any + def __init__( + self, + macro: Any | None = ..., + fPublished: Any | None = ..., + nvPicPr: Any | None = ..., + blipFill: Any | None = ..., + spPr: Any | None = ..., + style: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/properties.pyi b/stubs/openpyxl/openpyxl/drawing/properties.pyi new file mode 100644 index 000000000..f0782a45b --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/properties.pyi @@ -0,0 +1,91 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class GroupShapeProperties(Serialisable): + tagname: str + bwMode: Any + xfrm: Any + scene3d: Any + extLst: Any + def __init__( + self, bwMode: Any | None = ..., xfrm: Any | None = ..., scene3d: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class GroupLocking(Serialisable): + tagname: str + namespace: Any + noGrp: Any + noUngrp: Any + noSelect: Any + noRot: Any + noChangeAspect: Any + noMove: Any + noResize: Any + noChangeArrowheads: Any + noEditPoints: Any + noAdjustHandles: Any + noChangeShapeType: Any + extLst: Any + __elements__: Any + def __init__( + self, + noGrp: Any | None = ..., + noUngrp: Any | None = ..., + noSelect: Any | None = ..., + noRot: Any | None = ..., + noChangeAspect: Any | None = ..., + noChangeArrowheads: Any | None = ..., + noMove: Any | None = ..., + noResize: Any | None = ..., + noEditPoints: Any | None = ..., + noAdjustHandles: Any | None = ..., + noChangeShapeType: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class NonVisualGroupDrawingShapeProps(Serialisable): + tagname: str + grpSpLocks: Any + extLst: Any + __elements__: Any + def __init__(self, grpSpLocks: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class NonVisualDrawingShapeProps(Serialisable): + tagname: str + spLocks: Any + txBax: Any + extLst: Any + __elements__: Any + txBox: Any + def __init__(self, spLocks: Any | None = ..., txBox: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class NonVisualDrawingProps(Serialisable): + tagname: str + id: Any + name: Any + descr: Any + hidden: Any + title: Any + hlinkClick: Any + hlinkHover: Any + extLst: Any + __elements__: Any + def __init__( + self, + id: Any | None = ..., + name: Any | None = ..., + descr: Any | None = ..., + hidden: Any | None = ..., + title: Any | None = ..., + hlinkClick: Any | None = ..., + hlinkHover: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class NonVisualGroupShape(Serialisable): + tagname: str + cNvPr: Any + cNvGrpSpPr: Any + __elements__: Any + def __init__(self, cNvPr: Any | None = ..., cNvGrpSpPr: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/relation.pyi b/stubs/openpyxl/openpyxl/drawing/relation.pyi new file mode 100644 index 000000000..69079ce66 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/relation.pyi @@ -0,0 +1,9 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ChartRelation(Serialisable): + tagname: str + namespace: Any + id: Any + def __init__(self, id) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/spreadsheet_drawing.pyi b/stubs/openpyxl/openpyxl/drawing/spreadsheet_drawing.pyi new file mode 100644 index 000000000..1f96318e0 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/spreadsheet_drawing.pyi @@ -0,0 +1,96 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class AnchorClientData(Serialisable): + fLocksWithSheet: Any + fPrintsWithSheet: Any + def __init__(self, fLocksWithSheet: Any | None = ..., fPrintsWithSheet: Any | None = ...) -> None: ... + +class AnchorMarker(Serialisable): + tagname: str + col: Any + colOff: Any + row: Any + rowOff: Any + def __init__(self, col: int = ..., colOff: int = ..., row: int = ..., rowOff: int = ...) -> None: ... + +class _AnchorBase(Serialisable): + sp: Any + shape: Any + grpSp: Any + groupShape: Any + graphicFrame: Any + cxnSp: Any + connectionShape: Any + pic: Any + contentPart: Any + clientData: Any + __elements__: Any + def __init__( + self, + clientData: Any | None = ..., + sp: Any | None = ..., + grpSp: Any | None = ..., + graphicFrame: Any | None = ..., + cxnSp: Any | None = ..., + pic: Any | None = ..., + contentPart: Any | None = ..., + ) -> None: ... + +class AbsoluteAnchor(_AnchorBase): + tagname: str + pos: Any + ext: Any + sp: Any + grpSp: Any + graphicFrame: Any + cxnSp: Any + pic: Any + contentPart: Any + clientData: Any + __elements__: Any + def __init__(self, pos: Any | None = ..., ext: Any | None = ..., **kw) -> None: ... + +class OneCellAnchor(_AnchorBase): + tagname: str + ext: Any + sp: Any + grpSp: Any + graphicFrame: Any + cxnSp: Any + pic: Any + contentPart: Any + clientData: Any + __elements__: Any + def __init__(self, _from: Any | None = ..., ext: Any | None = ..., **kw) -> None: ... + +class TwoCellAnchor(_AnchorBase): + tagname: str + editAs: Any + to: Any + sp: Any + grpSp: Any + graphicFrame: Any + cxnSp: Any + pic: Any + contentPart: Any + clientData: Any + __elements__: Any + def __init__(self, editAs: Any | None = ..., _from: Any | None = ..., to: Any | None = ..., **kw) -> None: ... + +class SpreadsheetDrawing(Serialisable): + tagname: str + mime_type: str + PartName: str + twoCellAnchor: Any + oneCellAnchor: Any + absoluteAnchor: Any + __elements__: Any + charts: Any + images: Any + def __init__(self, twoCellAnchor=..., oneCellAnchor=..., absoluteAnchor=...) -> None: ... + def __hash__(self): ... + def __bool__(self): ... + @property + def path(self): ... diff --git a/stubs/openpyxl/openpyxl/drawing/text.pyi b/stubs/openpyxl/openpyxl/drawing/text.pyi new file mode 100644 index 000000000..86a7b04a2 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/text.pyi @@ -0,0 +1,377 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class EmbeddedWAVAudioFile(Serialisable): # type: ignore[misc] + name: Any + def __init__(self, name: Any | None = ...) -> None: ... + +class Hyperlink(Serialisable): + tagname: str + namespace: Any + invalidUrl: Any + action: Any + tgtFrame: Any + tooltip: Any + history: Any + highlightClick: Any + endSnd: Any + snd: Any + extLst: Any + id: Any + __elements__: Any + def __init__( + self, + invalidUrl: Any | None = ..., + action: Any | None = ..., + tgtFrame: Any | None = ..., + tooltip: Any | None = ..., + history: Any | None = ..., + highlightClick: Any | None = ..., + endSnd: Any | None = ..., + snd: Any | None = ..., + extLst: Any | None = ..., + id: Any | None = ..., + ) -> None: ... + +class Font(Serialisable): + tagname: str + namespace: Any + typeface: Any + panose: Any + pitchFamily: Any + charset: Any + def __init__( + self, typeface: Any | None = ..., panose: Any | None = ..., pitchFamily: Any | None = ..., charset: Any | None = ... + ) -> None: ... + +class CharacterProperties(Serialisable): + tagname: str + namespace: Any + kumimoji: Any + lang: Any + altLang: Any + sz: Any + b: Any + i: Any + u: Any + strike: Any + kern: Any + cap: Any + spc: Any + normalizeH: Any + baseline: Any + noProof: Any + dirty: Any + err: Any + smtClean: Any + smtId: Any + bmk: Any + ln: Any + highlight: Any + latin: Any + ea: Any + cs: Any + sym: Any + hlinkClick: Any + hlinkMouseOver: Any + rtl: Any + extLst: Any + noFill: Any + solidFill: Any + gradFill: Any + blipFill: Any + pattFill: Any + grpFill: Any + effectLst: Any + effectDag: Any + uLnTx: Any + uLn: Any + uFillTx: Any + uFill: Any + __elements__: Any + def __init__( + self, + kumimoji: Any | None = ..., + lang: Any | None = ..., + altLang: Any | None = ..., + sz: Any | None = ..., + b: Any | None = ..., + i: Any | None = ..., + u: Any | None = ..., + strike: Any | None = ..., + kern: Any | None = ..., + cap: Any | None = ..., + spc: Any | None = ..., + normalizeH: Any | None = ..., + baseline: Any | None = ..., + noProof: Any | None = ..., + dirty: Any | None = ..., + err: Any | None = ..., + smtClean: Any | None = ..., + smtId: Any | None = ..., + bmk: Any | None = ..., + ln: Any | None = ..., + highlight: Any | None = ..., + latin: Any | None = ..., + ea: Any | None = ..., + cs: Any | None = ..., + sym: Any | None = ..., + hlinkClick: Any | None = ..., + hlinkMouseOver: Any | None = ..., + rtl: Any | None = ..., + extLst: Any | None = ..., + noFill: Any | None = ..., + solidFill: Any | None = ..., + gradFill: Any | None = ..., + blipFill: Any | None = ..., + pattFill: Any | None = ..., + grpFill: Any | None = ..., + effectLst: Any | None = ..., + effectDag: Any | None = ..., + uLnTx: Any | None = ..., + uLn: Any | None = ..., + uFillTx: Any | None = ..., + uFill: Any | None = ..., + ) -> None: ... + +class TabStop(Serialisable): # type: ignore[misc] + pos: Any + algn: Any + def __init__(self, pos: Any | None = ..., algn: Any | None = ...) -> None: ... + +class TabStopList(Serialisable): # type: ignore[misc] + tab: Any + def __init__(self, tab: Any | None = ...) -> None: ... + +class Spacing(Serialisable): + spcPct: Any + spcPts: Any + __elements__: Any + def __init__(self, spcPct: Any | None = ..., spcPts: Any | None = ...) -> None: ... + +class AutonumberBullet(Serialisable): + type: Any + startAt: Any + def __init__(self, type: Any | None = ..., startAt: Any | None = ...) -> None: ... + +class ParagraphProperties(Serialisable): + tagname: str + namespace: Any + marL: Any + marR: Any + lvl: Any + indent: Any + algn: Any + defTabSz: Any + rtl: Any + eaLnBrk: Any + fontAlgn: Any + latinLnBrk: Any + hangingPunct: Any + lnSpc: Any + spcBef: Any + spcAft: Any + tabLst: Any + defRPr: Any + extLst: Any + buClrTx: Any + buClr: Any + buSzTx: Any + buSzPct: Any + buSzPts: Any + buFontTx: Any + buFont: Any + buNone: Any + buAutoNum: Any + buChar: Any + buBlip: Any + __elements__: Any + def __init__( + self, + marL: Any | None = ..., + marR: Any | None = ..., + lvl: Any | None = ..., + indent: Any | None = ..., + algn: Any | None = ..., + defTabSz: Any | None = ..., + rtl: Any | None = ..., + eaLnBrk: Any | None = ..., + fontAlgn: Any | None = ..., + latinLnBrk: Any | None = ..., + hangingPunct: Any | None = ..., + lnSpc: Any | None = ..., + spcBef: Any | None = ..., + spcAft: Any | None = ..., + tabLst: Any | None = ..., + defRPr: Any | None = ..., + extLst: Any | None = ..., + buClrTx: Any | None = ..., + buClr: Any | None = ..., + buSzTx: Any | None = ..., + buSzPct: Any | None = ..., + buSzPts: Any | None = ..., + buFontTx: Any | None = ..., + buFont: Any | None = ..., + buNone: Any | None = ..., + buAutoNum: Any | None = ..., + buChar: Any | None = ..., + buBlip: Any | None = ..., + ) -> None: ... + +class ListStyle(Serialisable): + tagname: str + namespace: Any + defPPr: Any + lvl1pPr: Any + lvl2pPr: Any + lvl3pPr: Any + lvl4pPr: Any + lvl5pPr: Any + lvl6pPr: Any + lvl7pPr: Any + lvl8pPr: Any + lvl9pPr: Any + extLst: Any + __elements__: Any + def __init__( + self, + defPPr: Any | None = ..., + lvl1pPr: Any | None = ..., + lvl2pPr: Any | None = ..., + lvl3pPr: Any | None = ..., + lvl4pPr: Any | None = ..., + lvl5pPr: Any | None = ..., + lvl6pPr: Any | None = ..., + lvl7pPr: Any | None = ..., + lvl8pPr: Any | None = ..., + lvl9pPr: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class RegularTextRun(Serialisable): + tagname: str + namespace: Any + rPr: Any + properties: Any + t: Any + value: Any + __elements__: Any + def __init__(self, rPr: Any | None = ..., t: str = ...) -> None: ... + +class LineBreak(Serialisable): + tagname: str + namespace: Any + rPr: Any + __elements__: Any + def __init__(self, rPr: Any | None = ...) -> None: ... + +class TextField(Serialisable): + id: Any + type: Any + rPr: Any + pPr: Any + t: Any + __elements__: Any + def __init__( + self, id: Any | None = ..., type: Any | None = ..., rPr: Any | None = ..., pPr: Any | None = ..., t: Any | None = ... + ) -> None: ... + +class Paragraph(Serialisable): + tagname: str + namespace: Any + pPr: Any + properties: Any + endParaRPr: Any + r: Any + text: Any + br: Any + fld: Any + __elements__: Any + def __init__( + self, + pPr: Any | None = ..., + endParaRPr: Any | None = ..., + r: Any | None = ..., + br: Any | None = ..., + fld: Any | None = ..., + ) -> None: ... + +class GeomGuide(Serialisable): + name: Any + fmla: Any + def __init__(self, name: Any | None = ..., fmla: Any | None = ...) -> None: ... + +class GeomGuideList(Serialisable): + gd: Any + def __init__(self, gd: Any | None = ...) -> None: ... + +class PresetTextShape(Serialisable): + prst: Any + avLst: Any + def __init__(self, prst: Any | None = ..., avLst: Any | None = ...) -> None: ... + +class TextNormalAutofit(Serialisable): + fontScale: Any + lnSpcReduction: Any + def __init__(self, fontScale: Any | None = ..., lnSpcReduction: Any | None = ...) -> None: ... + +class RichTextProperties(Serialisable): + tagname: str + namespace: Any + rot: Any + spcFirstLastPara: Any + vertOverflow: Any + horzOverflow: Any + vert: Any + wrap: Any + lIns: Any + tIns: Any + rIns: Any + bIns: Any + numCol: Any + spcCol: Any + rtlCol: Any + fromWordArt: Any + anchor: Any + anchorCtr: Any + forceAA: Any + upright: Any + compatLnSpc: Any + prstTxWarp: Any + scene3d: Any + extLst: Any + noAutofit: Any + normAutofit: Any + spAutoFit: Any + flatTx: Any + __elements__: Any + def __init__( + self, + rot: Any | None = ..., + spcFirstLastPara: Any | None = ..., + vertOverflow: Any | None = ..., + horzOverflow: Any | None = ..., + vert: Any | None = ..., + wrap: Any | None = ..., + lIns: Any | None = ..., + tIns: Any | None = ..., + rIns: Any | None = ..., + bIns: Any | None = ..., + numCol: Any | None = ..., + spcCol: Any | None = ..., + rtlCol: Any | None = ..., + fromWordArt: Any | None = ..., + anchor: Any | None = ..., + anchorCtr: Any | None = ..., + forceAA: Any | None = ..., + upright: Any | None = ..., + compatLnSpc: Any | None = ..., + prstTxWarp: Any | None = ..., + scene3d: Any | None = ..., + extLst: Any | None = ..., + noAutofit: Any | None = ..., + normAutofit: Any | None = ..., + spAutoFit: Any | None = ..., + flatTx: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/drawing/xdr.pyi b/stubs/openpyxl/openpyxl/drawing/xdr.pyi new file mode 100644 index 000000000..d54d0cc72 --- /dev/null +++ b/stubs/openpyxl/openpyxl/drawing/xdr.pyi @@ -0,0 +1,23 @@ +from typing import Any + +from .geometry import Point2D, PositiveSize2D, Transform2D + +class XDRPoint2D(Point2D): + namespace: Any + x: Any + y: Any + +class XDRPositiveSize2D(PositiveSize2D): + namespace: Any + cx: Any + cy: Any + +class XDRTransform2D(Transform2D): + namespace: Any + rot: Any + flipH: Any + flipV: Any + off: Any + ext: Any + chOff: Any + chExt: Any diff --git a/stubs/openpyxl/openpyxl/formatting/__init__.pyi b/stubs/openpyxl/openpyxl/formatting/__init__.pyi new file mode 100644 index 000000000..c4e04ce61 --- /dev/null +++ b/stubs/openpyxl/openpyxl/formatting/__init__.pyi @@ -0,0 +1 @@ +from .rule import Rule as Rule diff --git a/stubs/openpyxl/openpyxl/formatting/formatting.pyi b/stubs/openpyxl/openpyxl/formatting/formatting.pyi new file mode 100644 index 000000000..e9328cbb1 --- /dev/null +++ b/stubs/openpyxl/openpyxl/formatting/formatting.pyi @@ -0,0 +1,26 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ConditionalFormatting(Serialisable): + tagname: str + sqref: Any + cells: Any + pivot: Any + cfRule: Any + rules: Any + def __init__(self, sqref=..., pivot: Any | None = ..., cfRule=..., extLst: Any | None = ...) -> None: ... + def __eq__(self, other): ... + def __hash__(self): ... + def __contains__(self, coord): ... + +class ConditionalFormattingList: + max_priority: int + def __init__(self) -> None: ... + def add(self, range_string, cfRule) -> None: ... + def __bool__(self): ... + def __len__(self): ... + def __iter__(self): ... + def __getitem__(self, key): ... + def __delitem__(self, key) -> None: ... + def __setitem__(self, key, rule) -> None: ... diff --git a/stubs/openpyxl/openpyxl/formatting/rule.pyi b/stubs/openpyxl/openpyxl/formatting/rule.pyi new file mode 100644 index 000000000..92b4ea812 --- /dev/null +++ b/stubs/openpyxl/openpyxl/formatting/rule.pyi @@ -0,0 +1,152 @@ +from typing import Any + +from openpyxl.descriptors import Float +from openpyxl.descriptors.serialisable import Serialisable + +class ValueDescriptor(Float): + expected_type: Any + def __set__(self, instance, value) -> None: ... + +class FormatObject(Serialisable): + tagname: str + type: Any + val: Any + gte: Any + extLst: Any + __elements__: Any + def __init__(self, type, val: Any | None = ..., gte: Any | None = ..., extLst: Any | None = ...) -> None: ... + +class RuleType(Serialisable): # type: ignore[misc] + cfvo: Any + +class IconSet(RuleType): + tagname: str + iconSet: Any + showValue: Any + percent: Any + reverse: Any + __elements__: Any + cfvo: Any + def __init__( + self, + iconSet: Any | None = ..., + showValue: Any | None = ..., + percent: Any | None = ..., + reverse: Any | None = ..., + cfvo: Any | None = ..., + ) -> None: ... + +class DataBar(RuleType): + tagname: str + minLength: Any + maxLength: Any + showValue: Any + color: Any + __elements__: Any + cfvo: Any + def __init__( + self, + minLength: Any | None = ..., + maxLength: Any | None = ..., + showValue: Any | None = ..., + cfvo: Any | None = ..., + color: Any | None = ..., + ) -> None: ... + +class ColorScale(RuleType): + tagname: str + color: Any + __elements__: Any + cfvo: Any + def __init__(self, cfvo: Any | None = ..., color: Any | None = ...) -> None: ... + +class Rule(Serialisable): + tagname: str + type: Any + dxfId: Any + priority: Any + stopIfTrue: Any + aboveAverage: Any + percent: Any + bottom: Any + operator: Any + text: Any + timePeriod: Any + rank: Any + stdDev: Any + equalAverage: Any + formula: Any + colorScale: Any + dataBar: Any + iconSet: Any + extLst: Any + dxf: Any + __elements__: Any + __attrs__: Any + def __init__( + self, + type, + dxfId: Any | None = ..., + priority: int = ..., + stopIfTrue: Any | None = ..., + aboveAverage: Any | None = ..., + percent: Any | None = ..., + bottom: Any | None = ..., + operator: Any | None = ..., + text: Any | None = ..., + timePeriod: Any | None = ..., + rank: Any | None = ..., + stdDev: Any | None = ..., + equalAverage: Any | None = ..., + formula=..., + colorScale: Any | None = ..., + dataBar: Any | None = ..., + iconSet: Any | None = ..., + extLst: Any | None = ..., + dxf: Any | None = ..., + ) -> None: ... + +def ColorScaleRule( + start_type: Any | None = ..., + start_value: Any | None = ..., + start_color: Any | None = ..., + mid_type: Any | None = ..., + mid_value: Any | None = ..., + mid_color: Any | None = ..., + end_type: Any | None = ..., + end_value: Any | None = ..., + end_color: Any | None = ..., +): ... +def FormulaRule( + formula: Any | None = ..., + stopIfTrue: Any | None = ..., + font: Any | None = ..., + border: Any | None = ..., + fill: Any | None = ..., +): ... +def CellIsRule( + operator: Any | None = ..., + formula: Any | None = ..., + stopIfTrue: Any | None = ..., + font: Any | None = ..., + border: Any | None = ..., + fill: Any | None = ..., +): ... +def IconSetRule( + icon_style: Any | None = ..., + type: Any | None = ..., + values: Any | None = ..., + showValue: Any | None = ..., + percent: Any | None = ..., + reverse: Any | None = ..., +): ... +def DataBarRule( + start_type: Any | None = ..., + start_value: Any | None = ..., + end_type: Any | None = ..., + end_value: Any | None = ..., + color: Any | None = ..., + showValue: Any | None = ..., + minLength: Any | None = ..., + maxLength: Any | None = ..., +): ... diff --git a/stubs/openpyxl/openpyxl/formula/__init__.pyi b/stubs/openpyxl/openpyxl/formula/__init__.pyi new file mode 100644 index 000000000..c2decb330 --- /dev/null +++ b/stubs/openpyxl/openpyxl/formula/__init__.pyi @@ -0,0 +1 @@ +from .tokenizer import Tokenizer as Tokenizer diff --git a/stubs/openpyxl/openpyxl/formula/tokenizer.pyi b/stubs/openpyxl/openpyxl/formula/tokenizer.pyi new file mode 100644 index 000000000..355e48ee9 --- /dev/null +++ b/stubs/openpyxl/openpyxl/formula/tokenizer.pyi @@ -0,0 +1,52 @@ +from typing import Any + +class TokenizerError(Exception): ... + +class Tokenizer: + SN_RE: Any + WSPACE_RE: Any + STRING_REGEXES: Any + ERROR_CODES: Any + TOKEN_ENDERS: str + formula: Any + items: Any + token_stack: Any + offset: int + token: Any + def __init__(self, formula) -> None: ... + def check_scientific_notation(self): ... + def assert_empty_token(self, can_follow=...) -> None: ... + def save_token(self) -> None: ... + def render(self): ... + +class Token: + LITERAL: str + OPERAND: str + FUNC: str + ARRAY: str + PAREN: str + SEP: str + OP_PRE: str + OP_IN: str + OP_POST: str + WSPACE: str + value: Any + type: Any + subtype: Any + def __init__(self, value, type_, subtype: str = ...) -> None: ... + TEXT: str + NUMBER: str + LOGICAL: str + ERROR: str + RANGE: str + @classmethod + def make_operand(cls, value): ... + OPEN: str + CLOSE: str + @classmethod + def make_subexp(cls, value, func: bool = ...): ... + def get_closer(self): ... + ARG: str + ROW: str + @classmethod + def make_separator(cls, value): ... diff --git a/stubs/openpyxl/openpyxl/formula/translate.pyi b/stubs/openpyxl/openpyxl/formula/translate.pyi new file mode 100644 index 000000000..07297155d --- /dev/null +++ b/stubs/openpyxl/openpyxl/formula/translate.pyi @@ -0,0 +1,20 @@ +from typing import Any + +class TranslatorError(Exception): ... + +class Translator: + tokenizer: Any + def __init__(self, formula, origin) -> None: ... + def get_tokens(self): ... + ROW_RANGE_RE: Any + COL_RANGE_RE: Any + CELL_REF_RE: Any + @staticmethod + def translate_row(row_str, rdelta): ... + @staticmethod + def translate_col(col_str, cdelta): ... + @staticmethod + def strip_ws_name(range_str): ... + @classmethod + def translate_range(cls, range_str, rdelta, cdelta): ... + def translate_formula(self, dest: Any | None = ..., row_delta: int = ..., col_delta: int = ...): ... diff --git a/stubs/openpyxl/openpyxl/packaging/__init__.pyi b/stubs/openpyxl/openpyxl/packaging/__init__.pyi new file mode 100644 index 000000000..e69de29bb diff --git a/stubs/openpyxl/openpyxl/packaging/core.pyi b/stubs/openpyxl/openpyxl/packaging/core.pyi new file mode 100644 index 000000000..824260ed6 --- /dev/null +++ b/stubs/openpyxl/openpyxl/packaging/core.pyi @@ -0,0 +1,51 @@ +from typing import Any + +from openpyxl.descriptors import DateTime +from openpyxl.descriptors.nested import NestedText +from openpyxl.descriptors.serialisable import Serialisable + +class NestedDateTime(DateTime, NestedText): + expected_type: Any + def to_tree(self, tagname: Any | None = ..., value: Any | None = ..., namespace: Any | None = ...): ... + +class QualifiedDateTime(NestedDateTime): + def to_tree(self, tagname: Any | None = ..., value: Any | None = ..., namespace: Any | None = ...): ... + +class DocumentProperties(Serialisable): + tagname: str + namespace: Any + category: Any + contentStatus: Any + keywords: Any + lastModifiedBy: Any + lastPrinted: Any + revision: Any + version: Any + last_modified_by: Any + subject: Any + title: Any + creator: Any + description: Any + identifier: Any + language: Any + created: Any + modified: Any + __elements__: Any + def __init__( + self, + category: Any | None = ..., + contentStatus: Any | None = ..., + keywords: Any | None = ..., + lastModifiedBy: Any | None = ..., + lastPrinted: Any | None = ..., + revision: Any | None = ..., + version: Any | None = ..., + created=..., + creator: str = ..., + description: Any | None = ..., + identifier: Any | None = ..., + language: Any | None = ..., + modified=..., + subject: Any | None = ..., + title: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/packaging/extended.pyi b/stubs/openpyxl/openpyxl/packaging/extended.pyi new file mode 100644 index 000000000..72312b02a --- /dev/null +++ b/stubs/openpyxl/openpyxl/packaging/extended.pyi @@ -0,0 +1,79 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +def get_version(): ... + +class DigSigBlob(Serialisable): # type: ignore[misc] + __elements__: Any + __attrs__: Any + +class VectorLpstr(Serialisable): # type: ignore[misc] + __elements__: Any + __attrs__: Any + +class VectorVariant(Serialisable): # type: ignore[misc] + __elements__: Any + __attrs__: Any + +class ExtendedProperties(Serialisable): + tagname: str + Template: Any + Manager: Any + Company: Any + Pages: Any + Words: Any + Characters: Any + PresentationFormat: Any + Lines: Any + Paragraphs: Any + Slides: Any + Notes: Any + TotalTime: Any + HiddenSlides: Any + MMClips: Any + ScaleCrop: Any + HeadingPairs: Any + TitlesOfParts: Any + LinksUpToDate: Any + CharactersWithSpaces: Any + SharedDoc: Any + HyperlinkBase: Any + HLinks: Any + HyperlinksChanged: Any + DigSig: Any + Application: Any + AppVersion: Any + DocSecurity: Any + __elements__: Any + def __init__( + self, + Template: Any | None = ..., + Manager: Any | None = ..., + Company: Any | None = ..., + Pages: Any | None = ..., + Words: Any | None = ..., + Characters: Any | None = ..., + PresentationFormat: Any | None = ..., + Lines: Any | None = ..., + Paragraphs: Any | None = ..., + Slides: Any | None = ..., + Notes: Any | None = ..., + TotalTime: Any | None = ..., + HiddenSlides: Any | None = ..., + MMClips: Any | None = ..., + ScaleCrop: Any | None = ..., + HeadingPairs: Any | None = ..., + TitlesOfParts: Any | None = ..., + LinksUpToDate: Any | None = ..., + CharactersWithSpaces: Any | None = ..., + SharedDoc: Any | None = ..., + HyperlinkBase: Any | None = ..., + HLinks: Any | None = ..., + HyperlinksChanged: Any | None = ..., + DigSig: Any | None = ..., + Application: str = ..., + AppVersion: Any | None = ..., + DocSecurity: Any | None = ..., + ) -> None: ... + def to_tree(self): ... diff --git a/stubs/openpyxl/openpyxl/packaging/interface.pyi b/stubs/openpyxl/openpyxl/packaging/interface.pyi new file mode 100644 index 000000000..d000905f4 --- /dev/null +++ b/stubs/openpyxl/openpyxl/packaging/interface.pyi @@ -0,0 +1,6 @@ +from abc import ABC, ABCMeta, abstractmethod + +class ISerialisableFile(ABC, metaclass=ABCMeta): + @property + @abstractmethod + def id(self): ... diff --git a/stubs/openpyxl/openpyxl/packaging/manifest.pyi b/stubs/openpyxl/openpyxl/packaging/manifest.pyi new file mode 100644 index 000000000..404d7cae0 --- /dev/null +++ b/stubs/openpyxl/openpyxl/packaging/manifest.pyi @@ -0,0 +1,38 @@ +from collections.abc import Generator +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +mimetypes: Any + +class FileExtension(Serialisable): + tagname: str + Extension: Any + ContentType: Any + def __init__(self, Extension, ContentType) -> None: ... + +class Override(Serialisable): + tagname: str + PartName: Any + ContentType: Any + def __init__(self, PartName, ContentType) -> None: ... + +DEFAULT_TYPES: Any +DEFAULT_OVERRIDE: Any + +class Manifest(Serialisable): + tagname: str + Default: Any + Override: Any + path: str + __elements__: Any + def __init__(self, Default=..., Override=...) -> None: ... + @property + def filenames(self): ... + @property + def extensions(self): ... + def to_tree(self): ... + def __contains__(self, content_type): ... + def find(self, content_type): ... + def findall(self, content_type) -> Generator[Any, None, None]: ... + def append(self, obj) -> None: ... diff --git a/stubs/openpyxl/openpyxl/packaging/relationship.pyi b/stubs/openpyxl/openpyxl/packaging/relationship.pyi new file mode 100644 index 000000000..437c1e254 --- /dev/null +++ b/stubs/openpyxl/openpyxl/packaging/relationship.pyi @@ -0,0 +1,36 @@ +from collections.abc import Generator +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Relationship(Serialisable): + tagname: str + Type: Any + Target: Any + target: Any + TargetMode: Any + Id: Any + id: Any + def __init__( + self, + Id: Any | None = ..., + Type: Any | None = ..., + type: Any | None = ..., + Target: Any | None = ..., + TargetMode: Any | None = ..., + ) -> None: ... + +class RelationshipList(Serialisable): + tagname: str + Relationship: Any + def __init__(self, Relationship=...) -> None: ... + def append(self, value) -> None: ... + def __len__(self): ... + def __bool__(self): ... + def find(self, content_type) -> Generator[Any, None, None]: ... + def __getitem__(self, key): ... + def to_tree(self): ... + +def get_rels_path(path): ... +def get_dependents(archive, filename): ... +def get_rel(archive, deps, id: Any | None = ..., cls: Any | None = ...): ... diff --git a/stubs/openpyxl/openpyxl/packaging/workbook.pyi b/stubs/openpyxl/openpyxl/packaging/workbook.pyi new file mode 100644 index 000000000..d095602b4 --- /dev/null +++ b/stubs/openpyxl/openpyxl/packaging/workbook.pyi @@ -0,0 +1,86 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class FileRecoveryProperties(Serialisable): + tagname: str + autoRecover: Any + crashSave: Any + dataExtractLoad: Any + repairLoad: Any + def __init__( + self, + autoRecover: Any | None = ..., + crashSave: Any | None = ..., + dataExtractLoad: Any | None = ..., + repairLoad: Any | None = ..., + ) -> None: ... + +class ChildSheet(Serialisable): + tagname: str + name: Any + sheetId: Any + state: Any + id: Any + def __init__(self, name: Any | None = ..., sheetId: Any | None = ..., state: str = ..., id: Any | None = ...) -> None: ... + +class PivotCache(Serialisable): + tagname: str + cacheId: Any + id: Any + def __init__(self, cacheId: Any | None = ..., id: Any | None = ...) -> None: ... + +class WorkbookPackage(Serialisable): + tagname: str + conformance: Any + fileVersion: Any + fileSharing: Any + workbookPr: Any + properties: Any + workbookProtection: Any + bookViews: Any + sheets: Any + functionGroups: Any + externalReferences: Any + definedNames: Any + calcPr: Any + oleSize: Any + customWorkbookViews: Any + pivotCaches: Any + smartTagPr: Any + smartTagTypes: Any + webPublishing: Any + fileRecoveryPr: Any + webPublishObjects: Any + extLst: Any + Ignorable: Any + __elements__: Any + def __init__( + self, + conformance: Any | None = ..., + fileVersion: Any | None = ..., + fileSharing: Any | None = ..., + workbookPr: Any | None = ..., + workbookProtection: Any | None = ..., + bookViews=..., + sheets=..., + functionGroups: Any | None = ..., + externalReferences=..., + definedNames: Any | None = ..., + calcPr: Any | None = ..., + oleSize: Any | None = ..., + customWorkbookViews=..., + pivotCaches=..., + smartTagPr: Any | None = ..., + smartTagTypes: Any | None = ..., + webPublishing: Any | None = ..., + fileRecoveryPr: Any | None = ..., + webPublishObjects: Any | None = ..., + extLst: Any | None = ..., + Ignorable: Any | None = ..., + ) -> None: ... + def to_tree(self): ... + @property + def active(self): ... + @property + def pivot_caches(self): ... diff --git a/stubs/openpyxl/openpyxl/pivot/__init__.pyi b/stubs/openpyxl/openpyxl/pivot/__init__.pyi new file mode 100644 index 000000000..e69de29bb diff --git a/stubs/openpyxl/openpyxl/pivot/cache.pyi b/stubs/openpyxl/openpyxl/pivot/cache.pyi new file mode 100644 index 000000000..080c29e57 --- /dev/null +++ b/stubs/openpyxl/openpyxl/pivot/cache.pyi @@ -0,0 +1,583 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class MeasureDimensionMap(Serialisable): + tagname: str + measureGroup: Any + dimension: Any + def __init__(self, measureGroup: Any | None = ..., dimension: Any | None = ...) -> None: ... + +class MeasureGroup(Serialisable): + tagname: str + name: Any + caption: Any + def __init__(self, name: Any | None = ..., caption: Any | None = ...) -> None: ... + +class PivotDimension(Serialisable): + tagname: str + measure: Any + name: Any + uniqueName: Any + caption: Any + def __init__( + self, measure: Any | None = ..., name: Any | None = ..., uniqueName: Any | None = ..., caption: Any | None = ... + ) -> None: ... + +class CalculatedMember(Serialisable): + tagname: str + name: Any + mdx: Any + memberName: Any + hierarchy: Any + parent: Any + solveOrder: Any + set: Any + extLst: Any + __elements__: Any + def __init__( + self, + name: Any | None = ..., + mdx: Any | None = ..., + memberName: Any | None = ..., + hierarchy: Any | None = ..., + parent: Any | None = ..., + solveOrder: Any | None = ..., + set: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class CalculatedItem(Serialisable): + tagname: str + field: Any + formula: Any + pivotArea: Any + extLst: Any + __elements__: Any + def __init__( + self, field: Any | None = ..., formula: Any | None = ..., pivotArea: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class ServerFormat(Serialisable): + tagname: str + culture: Any + format: Any + def __init__(self, culture: Any | None = ..., format: Any | None = ...) -> None: ... + +class ServerFormatList(Serialisable): + tagname: str + serverFormat: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., serverFormat: Any | None = ...) -> None: ... + @property + def count(self): ... + +class Query(Serialisable): + tagname: str + mdx: Any + tpls: Any + __elements__: Any + def __init__(self, mdx: Any | None = ..., tpls: Any | None = ...) -> None: ... + +class QueryCache(Serialisable): + tagname: str + count: Any + query: Any + __elements__: Any + def __init__(self, count: Any | None = ..., query: Any | None = ...) -> None: ... + +class OLAPSet(Serialisable): + tagname: str + count: Any + maxRank: Any + setDefinition: Any + sortType: Any + queryFailed: Any + tpls: Any + sortByTuple: Any + __elements__: Any + def __init__( + self, + count: Any | None = ..., + maxRank: Any | None = ..., + setDefinition: Any | None = ..., + sortType: Any | None = ..., + queryFailed: Any | None = ..., + tpls: Any | None = ..., + sortByTuple: Any | None = ..., + ) -> None: ... + +class OLAPSets(Serialisable): # type: ignore[misc] + count: Any + set: Any + __elements__: Any + def __init__(self, count: Any | None = ..., set: Any | None = ...) -> None: ... + +class PCDSDTCEntries(Serialisable): + tagname: str + count: Any + m: Any + n: Any + e: Any + s: Any + __elements__: Any + def __init__( + self, count: Any | None = ..., m: Any | None = ..., n: Any | None = ..., e: Any | None = ..., s: Any | None = ... + ) -> None: ... + +class TupleCache(Serialisable): + tagname: str + entries: Any + sets: Any + queryCache: Any + serverFormats: Any + extLst: Any + __elements__: Any + def __init__( + self, + entries: Any | None = ..., + sets: Any | None = ..., + queryCache: Any | None = ..., + serverFormats: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class PCDKPI(Serialisable): + tagname: str + uniqueName: Any + caption: Any + displayFolder: Any + measureGroup: Any + parent: Any + value: Any + goal: Any + status: Any + trend: Any + weight: Any + time: Any + def __init__( + self, + uniqueName: Any | None = ..., + caption: Any | None = ..., + displayFolder: Any | None = ..., + measureGroup: Any | None = ..., + parent: Any | None = ..., + value: Any | None = ..., + goal: Any | None = ..., + status: Any | None = ..., + trend: Any | None = ..., + weight: Any | None = ..., + time: Any | None = ..., + ) -> None: ... + +class GroupMember(Serialisable): + tagname: str + uniqueName: Any + group: Any + def __init__(self, uniqueName: Any | None = ..., group: Any | None = ...) -> None: ... + +class GroupMembers(Serialisable): # type: ignore[misc] + count: Any + groupMember: Any + __elements__: Any + def __init__(self, count: Any | None = ..., groupMember: Any | None = ...) -> None: ... + +class LevelGroup(Serialisable): + tagname: str + name: Any + uniqueName: Any + caption: Any + uniqueParent: Any + id: Any + groupMembers: Any + __elements__: Any + def __init__( + self, + name: Any | None = ..., + uniqueName: Any | None = ..., + caption: Any | None = ..., + uniqueParent: Any | None = ..., + id: Any | None = ..., + groupMembers: Any | None = ..., + ) -> None: ... + +class Groups(Serialisable): + tagname: str + count: Any + group: Any + __elements__: Any + def __init__(self, count: Any | None = ..., group: Any | None = ...) -> None: ... + +class GroupLevel(Serialisable): + tagname: str + uniqueName: Any + caption: Any + user: Any + customRollUp: Any + groups: Any + extLst: Any + __elements__: Any + def __init__( + self, + uniqueName: Any | None = ..., + caption: Any | None = ..., + user: Any | None = ..., + customRollUp: Any | None = ..., + groups: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class GroupLevels(Serialisable): # type: ignore[misc] + count: Any + groupLevel: Any + __elements__: Any + def __init__(self, count: Any | None = ..., groupLevel: Any | None = ...) -> None: ... + +class FieldUsage(Serialisable): + tagname: str + x: Any + def __init__(self, x: Any | None = ...) -> None: ... + +class FieldsUsage(Serialisable): # type: ignore[misc] + count: Any + fieldUsage: Any + __elements__: Any + def __init__(self, count: Any | None = ..., fieldUsage: Any | None = ...) -> None: ... + +class CacheHierarchy(Serialisable): + tagname: str + uniqueName: Any + caption: Any + measure: Any + set: Any + parentSet: Any + iconSet: Any + attribute: Any + time: Any + keyAttribute: Any + defaultMemberUniqueName: Any + allUniqueName: Any + allCaption: Any + dimensionUniqueName: Any + displayFolder: Any + measureGroup: Any + measures: Any + count: Any + oneField: Any + memberValueDatatype: Any + unbalanced: Any + unbalancedGroup: Any + hidden: Any + fieldsUsage: Any + groupLevels: Any + extLst: Any + __elements__: Any + def __init__( + self, + uniqueName: str = ..., + caption: Any | None = ..., + measure: Any | None = ..., + set: Any | None = ..., + parentSet: Any | None = ..., + iconSet: int = ..., + attribute: Any | None = ..., + time: Any | None = ..., + keyAttribute: Any | None = ..., + defaultMemberUniqueName: Any | None = ..., + allUniqueName: Any | None = ..., + allCaption: Any | None = ..., + dimensionUniqueName: Any | None = ..., + displayFolder: Any | None = ..., + measureGroup: Any | None = ..., + measures: Any | None = ..., + count: Any | None = ..., + oneField: Any | None = ..., + memberValueDatatype: Any | None = ..., + unbalanced: Any | None = ..., + unbalancedGroup: Any | None = ..., + hidden: Any | None = ..., + fieldsUsage: Any | None = ..., + groupLevels: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class GroupItems(Serialisable): + tagname: str + m: Any + n: Any + b: Any + e: Any + s: Any + d: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., m=..., n=..., b=..., e=..., s=..., d=...) -> None: ... + @property + def count(self): ... + +class DiscretePr(Serialisable): + tagname: str + count: Any + x: Any + __elements__: Any + def __init__(self, count: Any | None = ..., x: Any | None = ...) -> None: ... + +class RangePr(Serialisable): + tagname: str + autoStart: Any + autoEnd: Any + groupBy: Any + startNum: Any + endNum: Any + startDate: Any + endDate: Any + groupInterval: Any + def __init__( + self, + autoStart: bool = ..., + autoEnd: bool = ..., + groupBy: str = ..., + startNum: Any | None = ..., + endNum: Any | None = ..., + startDate: Any | None = ..., + endDate: Any | None = ..., + groupInterval: int = ..., + ) -> None: ... + +class FieldGroup(Serialisable): + tagname: str + par: Any + base: Any + rangePr: Any + discretePr: Any + groupItems: Any + __elements__: Any + def __init__( + self, + par: Any | None = ..., + base: Any | None = ..., + rangePr: Any | None = ..., + discretePr: Any | None = ..., + groupItems: Any | None = ..., + ) -> None: ... + +class SharedItems(Serialisable): + tagname: str + m: Any + n: Any + b: Any + e: Any + s: Any + d: Any + containsSemiMixedTypes: Any + containsNonDate: Any + containsDate: Any + containsString: Any + containsBlank: Any + containsMixedTypes: Any + containsNumber: Any + containsInteger: Any + minValue: Any + maxValue: Any + minDate: Any + maxDate: Any + longText: Any + __attrs__: Any + def __init__( + self, + _fields=..., + containsSemiMixedTypes: Any | None = ..., + containsNonDate: Any | None = ..., + containsDate: Any | None = ..., + containsString: Any | None = ..., + containsBlank: Any | None = ..., + containsMixedTypes: Any | None = ..., + containsNumber: Any | None = ..., + containsInteger: Any | None = ..., + minValue: Any | None = ..., + maxValue: Any | None = ..., + minDate: Any | None = ..., + maxDate: Any | None = ..., + count: Any | None = ..., + longText: Any | None = ..., + ) -> None: ... + @property + def count(self): ... + +class CacheField(Serialisable): + tagname: str + sharedItems: Any + fieldGroup: Any + mpMap: Any + extLst: Any + name: Any + caption: Any + propertyName: Any + serverField: Any + uniqueList: Any + numFmtId: Any + formula: Any + sqlType: Any + hierarchy: Any + level: Any + databaseField: Any + mappingCount: Any + memberPropertyField: Any + __elements__: Any + def __init__( + self, + sharedItems: Any | None = ..., + fieldGroup: Any | None = ..., + mpMap: Any | None = ..., + extLst: Any | None = ..., + name: Any | None = ..., + caption: Any | None = ..., + propertyName: Any | None = ..., + serverField: Any | None = ..., + uniqueList: bool = ..., + numFmtId: Any | None = ..., + formula: Any | None = ..., + sqlType: int = ..., + hierarchy: int = ..., + level: int = ..., + databaseField: bool = ..., + mappingCount: Any | None = ..., + memberPropertyField: Any | None = ..., + ) -> None: ... + +class RangeSet(Serialisable): + tagname: str + i1: Any + i2: Any + i3: Any + i4: Any + ref: Any + name: Any + sheet: Any + def __init__( + self, + i1: Any | None = ..., + i2: Any | None = ..., + i3: Any | None = ..., + i4: Any | None = ..., + ref: Any | None = ..., + name: Any | None = ..., + sheet: Any | None = ..., + ) -> None: ... + +class PageItem(Serialisable): + tagname: str + name: Any + def __init__(self, name: Any | None = ...) -> None: ... + +class Page(Serialisable): + tagname: str + pageItem: Any + __elements__: Any + def __init__(self, count: Any | None = ..., pageItem: Any | None = ...) -> None: ... + @property + def count(self): ... + +class Consolidation(Serialisable): + tagname: str + autoPage: Any + pages: Any + rangeSets: Any + __elements__: Any + def __init__(self, autoPage: Any | None = ..., pages=..., rangeSets=...) -> None: ... + +class WorksheetSource(Serialisable): + tagname: str + ref: Any + name: Any + sheet: Any + def __init__(self, ref: Any | None = ..., name: Any | None = ..., sheet: Any | None = ...) -> None: ... + +class CacheSource(Serialisable): + tagname: str + type: Any + connectionId: Any + worksheetSource: Any + consolidation: Any + extLst: Any + __elements__: Any + def __init__( + self, + type: Any | None = ..., + connectionId: Any | None = ..., + worksheetSource: Any | None = ..., + consolidation: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class CacheDefinition(Serialisable): + mime_type: str + rel_type: str + records: Any + tagname: str + invalid: Any + saveData: Any + refreshOnLoad: Any + optimizeMemory: Any + enableRefresh: Any + refreshedBy: Any + refreshedDate: Any + refreshedDateIso: Any + backgroundQuery: Any + missingItemsLimit: Any + createdVersion: Any + refreshedVersion: Any + minRefreshableVersion: Any + recordCount: Any + upgradeOnRefresh: Any + tupleCache: Any + supportSubquery: Any + supportAdvancedDrill: Any + cacheSource: Any + cacheFields: Any + cacheHierarchies: Any + kpis: Any + calculatedItems: Any + calculatedMembers: Any + dimensions: Any + measureGroups: Any + maps: Any + extLst: Any + id: Any + __elements__: Any + def __init__( + self, + invalid: Any | None = ..., + saveData: Any | None = ..., + refreshOnLoad: Any | None = ..., + optimizeMemory: Any | None = ..., + enableRefresh: Any | None = ..., + refreshedBy: Any | None = ..., + refreshedDate: Any | None = ..., + refreshedDateIso: Any | None = ..., + backgroundQuery: Any | None = ..., + missingItemsLimit: Any | None = ..., + createdVersion: Any | None = ..., + refreshedVersion: Any | None = ..., + minRefreshableVersion: Any | None = ..., + recordCount: Any | None = ..., + upgradeOnRefresh: Any | None = ..., + tupleCache: Any | None = ..., + supportSubquery: Any | None = ..., + supportAdvancedDrill: Any | None = ..., + cacheSource: Any | None = ..., + cacheFields=..., + cacheHierarchies=..., + kpis=..., + calculatedItems=..., + calculatedMembers=..., + dimensions=..., + measureGroups=..., + maps=..., + extLst: Any | None = ..., + id: Any | None = ..., + ) -> None: ... + def to_tree(self): ... + @property + def path(self): ... diff --git a/stubs/openpyxl/openpyxl/pivot/fields.pyi b/stubs/openpyxl/openpyxl/pivot/fields.pyi new file mode 100644 index 000000000..a2e29fce0 --- /dev/null +++ b/stubs/openpyxl/openpyxl/pivot/fields.pyi @@ -0,0 +1,180 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Index(Serialisable): + tagname: str + v: Any + def __init__(self, v: int = ...) -> None: ... + +class Tuple(Serialisable): # type: ignore[misc] + fld: Any + hier: Any + item: Any + def __init__(self, fld: Any | None = ..., hier: Any | None = ..., item: Any | None = ...) -> None: ... + +class TupleList(Serialisable): # type: ignore[misc] + c: Any + tpl: Any + __elements__: Any + def __init__(self, c: Any | None = ..., tpl: Any | None = ...) -> None: ... + +class Missing(Serialisable): + tagname: str + tpls: Any + x: Any + u: Any + f: Any + c: Any + cp: Any + bc: Any + fc: Any + i: Any + un: Any + st: Any + b: Any + __elements__: Any + def __init__( + self, + tpls=..., + x=..., + u: Any | None = ..., + f: Any | None = ..., + c: Any | None = ..., + cp: Any | None = ..., + _in: Any | None = ..., + bc: Any | None = ..., + fc: Any | None = ..., + i: Any | None = ..., + un: Any | None = ..., + st: Any | None = ..., + b: Any | None = ..., + ) -> None: ... + +class Number(Serialisable): + tagname: str + tpls: Any + x: Any + v: Any + u: Any + f: Any + c: Any + cp: Any + bc: Any + fc: Any + i: Any + un: Any + st: Any + b: Any + __elements__: Any + def __init__( + self, + tpls=..., + x=..., + v: Any | None = ..., + u: Any | None = ..., + f: Any | None = ..., + c: Any | None = ..., + cp: Any | None = ..., + _in: Any | None = ..., + bc: Any | None = ..., + fc: Any | None = ..., + i: Any | None = ..., + un: Any | None = ..., + st: Any | None = ..., + b: Any | None = ..., + ) -> None: ... + +class Error(Serialisable): + tagname: str + tpls: Any + x: Any + v: Any + u: Any + f: Any + c: Any + cp: Any + bc: Any + fc: Any + i: Any + un: Any + st: Any + b: Any + __elements__: Any + def __init__( + self, + tpls: Any | None = ..., + x=..., + v: Any | None = ..., + u: Any | None = ..., + f: Any | None = ..., + c: Any | None = ..., + cp: Any | None = ..., + _in: Any | None = ..., + bc: Any | None = ..., + fc: Any | None = ..., + i: Any | None = ..., + un: Any | None = ..., + st: Any | None = ..., + b: Any | None = ..., + ) -> None: ... + +class Boolean(Serialisable): + tagname: str + x: Any + v: Any + u: Any + f: Any + c: Any + cp: Any + __elements__: Any + def __init__( + self, x=..., v: Any | None = ..., u: Any | None = ..., f: Any | None = ..., c: Any | None = ..., cp: Any | None = ... + ) -> None: ... + +class Text(Serialisable): + tagname: str + tpls: Any + x: Any + v: Any + u: Any + f: Any + c: Any + cp: Any + bc: Any + fc: Any + i: Any + un: Any + st: Any + b: Any + __elements__: Any + def __init__( + self, + tpls=..., + x=..., + v: Any | None = ..., + u: Any | None = ..., + f: Any | None = ..., + c: Any | None = ..., + cp: Any | None = ..., + _in: Any | None = ..., + bc: Any | None = ..., + fc: Any | None = ..., + i: Any | None = ..., + un: Any | None = ..., + st: Any | None = ..., + b: Any | None = ..., + ) -> None: ... + +class DateTimeField(Serialisable): + tagname: str + x: Any + v: Any + u: Any + f: Any + c: Any + cp: Any + __elements__: Any + def __init__( + self, x=..., v: Any | None = ..., u: Any | None = ..., f: Any | None = ..., c: Any | None = ..., cp: Any | None = ... + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/pivot/record.pyi b/stubs/openpyxl/openpyxl/pivot/record.pyi new file mode 100644 index 000000000..a10544cef --- /dev/null +++ b/stubs/openpyxl/openpyxl/pivot/record.pyi @@ -0,0 +1,39 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Record(Serialisable): + tagname: str + m: Any + n: Any + b: Any + e: Any + s: Any + d: Any + x: Any + def __init__( + self, + _fields=..., + m: Any | None = ..., + n: Any | None = ..., + b: Any | None = ..., + e: Any | None = ..., + s: Any | None = ..., + d: Any | None = ..., + x: Any | None = ..., + ) -> None: ... + +class RecordList(Serialisable): + mime_type: str + rel_type: str + tagname: str + r: Any + extLst: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., r=..., extLst: Any | None = ...) -> None: ... + @property + def count(self): ... + def to_tree(self): ... + @property + def path(self): ... diff --git a/stubs/openpyxl/openpyxl/pivot/table.pyi b/stubs/openpyxl/openpyxl/pivot/table.pyi new file mode 100644 index 000000000..93d313c10 --- /dev/null +++ b/stubs/openpyxl/openpyxl/pivot/table.pyi @@ -0,0 +1,672 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class HierarchyUsage(Serialisable): + tagname: str + hierarchyUsage: Any + def __init__(self, hierarchyUsage: Any | None = ...) -> None: ... + +class ColHierarchiesUsage(Serialisable): + tagname: str + colHierarchyUsage: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., colHierarchyUsage=...) -> None: ... + @property + def count(self): ... + +class RowHierarchiesUsage(Serialisable): + tagname: str + rowHierarchyUsage: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., rowHierarchyUsage=...) -> None: ... + @property + def count(self): ... + +class PivotFilter(Serialisable): + tagname: str + fld: Any + mpFld: Any + type: Any + evalOrder: Any + id: Any + iMeasureHier: Any + iMeasureFld: Any + name: Any + description: Any + stringValue1: Any + stringValue2: Any + autoFilter: Any + extLst: Any + __elements__: Any + def __init__( + self, + fld: Any | None = ..., + mpFld: Any | None = ..., + type: Any | None = ..., + evalOrder: Any | None = ..., + id: Any | None = ..., + iMeasureHier: Any | None = ..., + iMeasureFld: Any | None = ..., + name: Any | None = ..., + description: Any | None = ..., + stringValue1: Any | None = ..., + stringValue2: Any | None = ..., + autoFilter: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class PivotFilters(Serialisable): # type: ignore[misc] + count: Any + filter: Any + __elements__: Any + def __init__(self, count: Any | None = ..., filter: Any | None = ...) -> None: ... + +class PivotTableStyle(Serialisable): + tagname: str + name: Any + showRowHeaders: Any + showColHeaders: Any + showRowStripes: Any + showColStripes: Any + showLastColumn: Any + def __init__( + self, + name: Any | None = ..., + showRowHeaders: Any | None = ..., + showColHeaders: Any | None = ..., + showRowStripes: Any | None = ..., + showColStripes: Any | None = ..., + showLastColumn: Any | None = ..., + ) -> None: ... + +class MemberList(Serialisable): + tagname: str + level: Any + member: Any + __elements__: Any + def __init__(self, count: Any | None = ..., level: Any | None = ..., member=...) -> None: ... + @property + def count(self): ... + +class MemberProperty(Serialisable): + tagname: str + name: Any + showCell: Any + showTip: Any + showAsCaption: Any + nameLen: Any + pPos: Any + pLen: Any + level: Any + field: Any + def __init__( + self, + name: Any | None = ..., + showCell: Any | None = ..., + showTip: Any | None = ..., + showAsCaption: Any | None = ..., + nameLen: Any | None = ..., + pPos: Any | None = ..., + pLen: Any | None = ..., + level: Any | None = ..., + field: Any | None = ..., + ) -> None: ... + +class PivotHierarchy(Serialisable): + tagname: str + outline: Any + multipleItemSelectionAllowed: Any + subtotalTop: Any + showInFieldList: Any + dragToRow: Any + dragToCol: Any + dragToPage: Any + dragToData: Any + dragOff: Any + includeNewItemsInFilter: Any + caption: Any + mps: Any + members: Any + extLst: Any + __elements__: Any + def __init__( + self, + outline: Any | None = ..., + multipleItemSelectionAllowed: Any | None = ..., + subtotalTop: Any | None = ..., + showInFieldList: Any | None = ..., + dragToRow: Any | None = ..., + dragToCol: Any | None = ..., + dragToPage: Any | None = ..., + dragToData: Any | None = ..., + dragOff: Any | None = ..., + includeNewItemsInFilter: Any | None = ..., + caption: Any | None = ..., + mps=..., + members: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class Reference(Serialisable): + tagname: str + field: Any + selected: Any + byPosition: Any + relative: Any + defaultSubtotal: Any + sumSubtotal: Any + countASubtotal: Any + avgSubtotal: Any + maxSubtotal: Any + minSubtotal: Any + productSubtotal: Any + countSubtotal: Any + stdDevSubtotal: Any + stdDevPSubtotal: Any + varSubtotal: Any + varPSubtotal: Any + x: Any + extLst: Any + __elements__: Any + def __init__( + self, + field: Any | None = ..., + count: Any | None = ..., + selected: Any | None = ..., + byPosition: Any | None = ..., + relative: Any | None = ..., + defaultSubtotal: Any | None = ..., + sumSubtotal: Any | None = ..., + countASubtotal: Any | None = ..., + avgSubtotal: Any | None = ..., + maxSubtotal: Any | None = ..., + minSubtotal: Any | None = ..., + productSubtotal: Any | None = ..., + countSubtotal: Any | None = ..., + stdDevSubtotal: Any | None = ..., + stdDevPSubtotal: Any | None = ..., + varSubtotal: Any | None = ..., + varPSubtotal: Any | None = ..., + x: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + @property + def count(self): ... + +class PivotArea(Serialisable): + tagname: str + references: Any + extLst: Any + field: Any + type: Any + dataOnly: Any + labelOnly: Any + grandRow: Any + grandCol: Any + cacheIndex: Any + outline: Any + offset: Any + collapsedLevelsAreSubtotals: Any + axis: Any + fieldPosition: Any + __elements__: Any + def __init__( + self, + references=..., + extLst: Any | None = ..., + field: Any | None = ..., + type: str = ..., + dataOnly: bool = ..., + labelOnly: Any | None = ..., + grandRow: Any | None = ..., + grandCol: Any | None = ..., + cacheIndex: Any | None = ..., + outline: bool = ..., + offset: Any | None = ..., + collapsedLevelsAreSubtotals: Any | None = ..., + axis: Any | None = ..., + fieldPosition: Any | None = ..., + ) -> None: ... + +class ChartFormat(Serialisable): + tagname: str + chart: Any + format: Any + series: Any + pivotArea: Any + __elements__: Any + def __init__( + self, chart: Any | None = ..., format: Any | None = ..., series: Any | None = ..., pivotArea: Any | None = ... + ) -> None: ... + +class ConditionalFormat(Serialisable): + tagname: str + scope: Any + type: Any + priority: Any + pivotAreas: Any + extLst: Any + __elements__: Any + def __init__( + self, + scope: Any | None = ..., + type: Any | None = ..., + priority: Any | None = ..., + pivotAreas=..., + extLst: Any | None = ..., + ) -> None: ... + +class Format(Serialisable): + tagname: str + action: Any + dxfId: Any + pivotArea: Any + extLst: Any + __elements__: Any + def __init__( + self, action: str = ..., dxfId: Any | None = ..., pivotArea: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + +class DataField(Serialisable): + tagname: str + name: Any + fld: Any + subtotal: Any + showDataAs: Any + baseField: Any + baseItem: Any + numFmtId: Any + extLst: Any + __elements__: Any + def __init__( + self, + name: Any | None = ..., + fld: Any | None = ..., + subtotal: str = ..., + showDataAs: str = ..., + baseField: int = ..., + baseItem: int = ..., + numFmtId: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class PageField(Serialisable): + tagname: str + fld: Any + item: Any + hier: Any + name: Any + cap: Any + extLst: Any + __elements__: Any + def __init__( + self, + fld: Any | None = ..., + item: Any | None = ..., + hier: Any | None = ..., + name: Any | None = ..., + cap: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class RowColItem(Serialisable): + tagname: str + t: Any + r: Any + i: Any + x: Any + __elements__: Any + def __init__(self, t: str = ..., r: int = ..., i: int = ..., x=...) -> None: ... + +class RowColField(Serialisable): + tagname: str + x: Any + def __init__(self, x: Any | None = ...) -> None: ... + +class AutoSortScope(Serialisable): # type: ignore[misc] + pivotArea: Any + __elements__: Any + def __init__(self, pivotArea: Any | None = ...) -> None: ... + +class FieldItem(Serialisable): + tagname: str + n: Any + t: Any + h: Any + s: Any + sd: Any + f: Any + m: Any + c: Any + x: Any + d: Any + e: Any + def __init__( + self, + n: Any | None = ..., + t: str = ..., + h: Any | None = ..., + s: Any | None = ..., + sd: bool = ..., + f: Any | None = ..., + m: Any | None = ..., + c: Any | None = ..., + x: Any | None = ..., + d: Any | None = ..., + e: Any | None = ..., + ) -> None: ... + +class PivotField(Serialisable): + tagname: str + items: Any + autoSortScope: Any + extLst: Any + name: Any + axis: Any + dataField: Any + subtotalCaption: Any + showDropDowns: Any + hiddenLevel: Any + uniqueMemberProperty: Any + compact: Any + allDrilled: Any + numFmtId: Any + outline: Any + subtotalTop: Any + dragToRow: Any + dragToCol: Any + multipleItemSelectionAllowed: Any + dragToPage: Any + dragToData: Any + dragOff: Any + showAll: Any + insertBlankRow: Any + serverField: Any + insertPageBreak: Any + autoShow: Any + topAutoShow: Any + hideNewItems: Any + measureFilter: Any + includeNewItemsInFilter: Any + itemPageCount: Any + sortType: Any + dataSourceSort: Any + nonAutoSortDefault: Any + rankBy: Any + defaultSubtotal: Any + sumSubtotal: Any + countASubtotal: Any + avgSubtotal: Any + maxSubtotal: Any + minSubtotal: Any + productSubtotal: Any + countSubtotal: Any + stdDevSubtotal: Any + stdDevPSubtotal: Any + varSubtotal: Any + varPSubtotal: Any + showPropCell: Any + showPropTip: Any + showPropAsCaption: Any + defaultAttributeDrillState: Any + __elements__: Any + def __init__( + self, + items=..., + autoSortScope: Any | None = ..., + name: Any | None = ..., + axis: Any | None = ..., + dataField: Any | None = ..., + subtotalCaption: Any | None = ..., + showDropDowns: bool = ..., + hiddenLevel: Any | None = ..., + uniqueMemberProperty: Any | None = ..., + compact: bool = ..., + allDrilled: Any | None = ..., + numFmtId: Any | None = ..., + outline: bool = ..., + subtotalTop: bool = ..., + dragToRow: bool = ..., + dragToCol: bool = ..., + multipleItemSelectionAllowed: Any | None = ..., + dragToPage: bool = ..., + dragToData: bool = ..., + dragOff: bool = ..., + showAll: bool = ..., + insertBlankRow: Any | None = ..., + serverField: Any | None = ..., + insertPageBreak: Any | None = ..., + autoShow: Any | None = ..., + topAutoShow: bool = ..., + hideNewItems: Any | None = ..., + measureFilter: Any | None = ..., + includeNewItemsInFilter: Any | None = ..., + itemPageCount: int = ..., + sortType: str = ..., + dataSourceSort: Any | None = ..., + nonAutoSortDefault: Any | None = ..., + rankBy: Any | None = ..., + defaultSubtotal: bool = ..., + sumSubtotal: Any | None = ..., + countASubtotal: Any | None = ..., + avgSubtotal: Any | None = ..., + maxSubtotal: Any | None = ..., + minSubtotal: Any | None = ..., + productSubtotal: Any | None = ..., + countSubtotal: Any | None = ..., + stdDevSubtotal: Any | None = ..., + stdDevPSubtotal: Any | None = ..., + varSubtotal: Any | None = ..., + varPSubtotal: Any | None = ..., + showPropCell: Any | None = ..., + showPropTip: Any | None = ..., + showPropAsCaption: Any | None = ..., + defaultAttributeDrillState: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class Location(Serialisable): + tagname: str + ref: Any + firstHeaderRow: Any + firstDataRow: Any + firstDataCol: Any + rowPageCount: Any + colPageCount: Any + def __init__( + self, + ref: Any | None = ..., + firstHeaderRow: Any | None = ..., + firstDataRow: Any | None = ..., + firstDataCol: Any | None = ..., + rowPageCount: Any | None = ..., + colPageCount: Any | None = ..., + ) -> None: ... + +class TableDefinition(Serialisable): + mime_type: str + rel_type: str + tagname: str + cache: Any + name: Any + cacheId: Any + dataOnRows: Any + dataPosition: Any + dataCaption: Any + grandTotalCaption: Any + errorCaption: Any + showError: Any + missingCaption: Any + showMissing: Any + pageStyle: Any + pivotTableStyle: Any + vacatedStyle: Any + tag: Any + updatedVersion: Any + minRefreshableVersion: Any + asteriskTotals: Any + showItems: Any + editData: Any + disableFieldList: Any + showCalcMbrs: Any + visualTotals: Any + showMultipleLabel: Any + showDataDropDown: Any + showDrill: Any + printDrill: Any + showMemberPropertyTips: Any + showDataTips: Any + enableWizard: Any + enableDrill: Any + enableFieldProperties: Any + preserveFormatting: Any + useAutoFormatting: Any + pageWrap: Any + pageOverThenDown: Any + subtotalHiddenItems: Any + rowGrandTotals: Any + colGrandTotals: Any + fieldPrintTitles: Any + itemPrintTitles: Any + mergeItem: Any + showDropZones: Any + createdVersion: Any + indent: Any + showEmptyRow: Any + showEmptyCol: Any + showHeaders: Any + compact: Any + outline: Any + outlineData: Any + compactData: Any + published: Any + gridDropZones: Any + immersive: Any + multipleFieldFilters: Any + chartFormat: Any + rowHeaderCaption: Any + colHeaderCaption: Any + fieldListSortAscending: Any + mdxSubqueries: Any + customListSort: Any + autoFormatId: Any + applyNumberFormats: Any + applyBorderFormats: Any + applyFontFormats: Any + applyPatternFormats: Any + applyAlignmentFormats: Any + applyWidthHeightFormats: Any + location: Any + pivotFields: Any + rowFields: Any + rowItems: Any + colFields: Any + colItems: Any + pageFields: Any + dataFields: Any + formats: Any + conditionalFormats: Any + chartFormats: Any + pivotHierarchies: Any + pivotTableStyleInfo: Any + filters: Any + rowHierarchiesUsage: Any + colHierarchiesUsage: Any + extLst: Any + id: Any + __elements__: Any + def __init__( + self, + name: Any | None = ..., + cacheId: Any | None = ..., + dataOnRows: bool = ..., + dataPosition: Any | None = ..., + dataCaption: Any | None = ..., + grandTotalCaption: Any | None = ..., + errorCaption: Any | None = ..., + showError: bool = ..., + missingCaption: Any | None = ..., + showMissing: bool = ..., + pageStyle: Any | None = ..., + pivotTableStyle: Any | None = ..., + vacatedStyle: Any | None = ..., + tag: Any | None = ..., + updatedVersion: int = ..., + minRefreshableVersion: int = ..., + asteriskTotals: bool = ..., + showItems: bool = ..., + editData: bool = ..., + disableFieldList: bool = ..., + showCalcMbrs: bool = ..., + visualTotals: bool = ..., + showMultipleLabel: bool = ..., + showDataDropDown: bool = ..., + showDrill: bool = ..., + printDrill: bool = ..., + showMemberPropertyTips: bool = ..., + showDataTips: bool = ..., + enableWizard: bool = ..., + enableDrill: bool = ..., + enableFieldProperties: bool = ..., + preserveFormatting: bool = ..., + useAutoFormatting: bool = ..., + pageWrap: int = ..., + pageOverThenDown: bool = ..., + subtotalHiddenItems: bool = ..., + rowGrandTotals: bool = ..., + colGrandTotals: bool = ..., + fieldPrintTitles: bool = ..., + itemPrintTitles: bool = ..., + mergeItem: bool = ..., + showDropZones: bool = ..., + createdVersion: int = ..., + indent: int = ..., + showEmptyRow: bool = ..., + showEmptyCol: bool = ..., + showHeaders: bool = ..., + compact: bool = ..., + outline: bool = ..., + outlineData: bool = ..., + compactData: bool = ..., + published: bool = ..., + gridDropZones: bool = ..., + immersive: bool = ..., + multipleFieldFilters: Any | None = ..., + chartFormat: int = ..., + rowHeaderCaption: Any | None = ..., + colHeaderCaption: Any | None = ..., + fieldListSortAscending: Any | None = ..., + mdxSubqueries: Any | None = ..., + customListSort: Any | None = ..., + autoFormatId: Any | None = ..., + applyNumberFormats: bool = ..., + applyBorderFormats: bool = ..., + applyFontFormats: bool = ..., + applyPatternFormats: bool = ..., + applyAlignmentFormats: bool = ..., + applyWidthHeightFormats: bool = ..., + location: Any | None = ..., + pivotFields=..., + rowFields=..., + rowItems=..., + colFields=..., + colItems=..., + pageFields=..., + dataFields=..., + formats=..., + conditionalFormats=..., + chartFormats=..., + pivotHierarchies=..., + pivotTableStyleInfo: Any | None = ..., + filters=..., + rowHierarchiesUsage: Any | None = ..., + colHierarchiesUsage: Any | None = ..., + extLst: Any | None = ..., + id: Any | None = ..., + ) -> None: ... + def to_tree(self): ... + @property + def path(self): ... diff --git a/stubs/openpyxl/openpyxl/reader/__init__.pyi b/stubs/openpyxl/openpyxl/reader/__init__.pyi new file mode 100644 index 000000000..e69de29bb diff --git a/stubs/openpyxl/openpyxl/reader/drawings.pyi b/stubs/openpyxl/openpyxl/reader/drawings.pyi new file mode 100644 index 000000000..4334877fc --- /dev/null +++ b/stubs/openpyxl/openpyxl/reader/drawings.pyi @@ -0,0 +1 @@ +def find_images(archive, path): ... diff --git a/stubs/openpyxl/openpyxl/reader/excel.pyi b/stubs/openpyxl/openpyxl/reader/excel.pyi new file mode 100644 index 000000000..c70d2e8e4 --- /dev/null +++ b/stubs/openpyxl/openpyxl/reader/excel.pyi @@ -0,0 +1,26 @@ +from typing import Any + +SUPPORTED_FORMATS: Any + +class ExcelReader: + archive: Any + valid_files: Any + read_only: Any + keep_vba: Any + data_only: Any + keep_links: Any + shared_strings: Any + def __init__(self, fn, read_only: bool = ..., keep_vba=..., data_only: bool = ..., keep_links: bool = ...) -> None: ... + package: Any + def read_manifest(self) -> None: ... + def read_strings(self) -> None: ... + parser: Any + wb: Any + def read_workbook(self) -> None: ... + def read_properties(self) -> None: ... + def read_theme(self) -> None: ... + def read_chartsheet(self, sheet, rel) -> None: ... + def read_worksheets(self) -> None: ... + def read(self) -> None: ... + +def load_workbook(filename, read_only: bool = ..., keep_vba=..., data_only: bool = ..., keep_links: bool = ...): ... diff --git a/stubs/openpyxl/openpyxl/reader/strings.pyi b/stubs/openpyxl/openpyxl/reader/strings.pyi new file mode 100644 index 000000000..932a8b6f3 --- /dev/null +++ b/stubs/openpyxl/openpyxl/reader/strings.pyi @@ -0,0 +1 @@ +def read_string_table(xml_source): ... diff --git a/stubs/openpyxl/openpyxl/reader/workbook.pyi b/stubs/openpyxl/openpyxl/reader/workbook.pyi new file mode 100644 index 000000000..4b1bde6f7 --- /dev/null +++ b/stubs/openpyxl/openpyxl/reader/workbook.pyi @@ -0,0 +1,18 @@ +from collections.abc import Generator +from typing import Any + +class WorkbookParser: + archive: Any + workbook_part_name: Any + wb: Any + keep_links: Any + sheets: Any + def __init__(self, archive, workbook_part_name, keep_links: bool = ...) -> None: ... + @property + def rels(self): ... + caches: Any + def parse(self) -> None: ... + def find_sheets(self) -> Generator[Any, None, None]: ... + def assign_names(self) -> None: ... + @property + def pivot_caches(self): ... diff --git a/stubs/openpyxl/openpyxl/styles/__init__.pyi b/stubs/openpyxl/openpyxl/styles/__init__.pyi new file mode 100644 index 000000000..946d3a30b --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/__init__.pyi @@ -0,0 +1,8 @@ +from .alignment import Alignment as Alignment +from .borders import Border as Border, Side as Side +from .colors import Color as Color +from .fills import Fill as Fill, GradientFill as GradientFill, PatternFill as PatternFill +from .fonts import DEFAULT_FONT as DEFAULT_FONT, Font as Font +from .named_styles import NamedStyle as NamedStyle +from .numbers import NumberFormatDescriptor as NumberFormatDescriptor, is_builtin as is_builtin, is_date_format as is_date_format +from .protection import Protection as Protection diff --git a/stubs/openpyxl/openpyxl/styles/alignment.pyi b/stubs/openpyxl/openpyxl/styles/alignment.pyi new file mode 100644 index 000000000..adcc6aeef --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/alignment.pyi @@ -0,0 +1,39 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +horizontal_alignments: Any +vertical_aligments: Any + +class Alignment(Serialisable): + tagname: str + __fields__: Any + horizontal: Any + vertical: Any + textRotation: Any + text_rotation: Any + wrapText: Any + wrap_text: Any + shrinkToFit: Any + shrink_to_fit: Any + indent: Any + relativeIndent: Any + justifyLastLine: Any + readingOrder: Any + def __init__( + self, + horizontal: Any | None = ..., + vertical: Any | None = ..., + textRotation: int = ..., + wrapText: Any | None = ..., + shrinkToFit: Any | None = ..., + indent: int = ..., + relativeIndent: int = ..., + justifyLastLine: Any | None = ..., + readingOrder: int = ..., + text_rotation: Any | None = ..., + wrap_text: Any | None = ..., + shrink_to_fit: Any | None = ..., + mergeCell: Any | None = ..., + ) -> None: ... + def __iter__(self): ... diff --git a/stubs/openpyxl/openpyxl/styles/borders.pyi b/stubs/openpyxl/openpyxl/styles/borders.pyi new file mode 100644 index 000000000..d5d36e30c --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/borders.pyi @@ -0,0 +1,62 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +BORDER_NONE: Any +BORDER_DASHDOT: str +BORDER_DASHDOTDOT: str +BORDER_DASHED: str +BORDER_DOTTED: str +BORDER_DOUBLE: str +BORDER_HAIR: str +BORDER_MEDIUM: str +BORDER_MEDIUMDASHDOT: str +BORDER_MEDIUMDASHDOTDOT: str +BORDER_MEDIUMDASHED: str +BORDER_SLANTDASHDOT: str +BORDER_THICK: str +BORDER_THIN: str + +class Side(Serialisable): # type: ignore[misc] + __fields__: Any + color: Any + style: Any + border_style: Any + def __init__(self, style: Any | None = ..., color: Any | None = ..., border_style: Any | None = ...) -> None: ... + +class Border(Serialisable): + tagname: str + __fields__: Any + __elements__: Any + start: Any + end: Any + left: Any + right: Any + top: Any + bottom: Any + diagonal: Any + vertical: Any + horizontal: Any + outline: Any + diagonalUp: Any + diagonalDown: Any + diagonal_direction: Any + def __init__( + self, + left: Any | None = ..., + right: Any | None = ..., + top: Any | None = ..., + bottom: Any | None = ..., + diagonal: Any | None = ..., + diagonal_direction: Any | None = ..., + vertical: Any | None = ..., + horizontal: Any | None = ..., + diagonalUp: bool = ..., + diagonalDown: bool = ..., + outline: bool = ..., + start: Any | None = ..., + end: Any | None = ..., + ) -> None: ... + def __iter__(self): ... + +DEFAULT_BORDER: Any diff --git a/stubs/openpyxl/openpyxl/styles/builtins.pyi b/stubs/openpyxl/openpyxl/styles/builtins.pyi new file mode 100644 index 000000000..9253fb770 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/builtins.pyi @@ -0,0 +1,53 @@ +from typing import Any + +normal: str +comma: str +comma_0: str +currency: str +currency_0: str +percent: str +hyperlink: str +followed_hyperlink: str +title: str +headline_1: str +headline_2: str +headline_3: str +headline_4: str +good: str +bad: str +neutral: str +input: str +output: str +calculation: str +linked_cell: str +check_cell: str +warning: str +note: str +explanatory: str +total: str +accent_1: str +accent_1_20: str +accent_1_40: str +accent_1_60: str +accent_2: str +accent_2_20: str +accent_2_40: str +accent_2_60: str +accent_3: str +accent_3_20: str +accent_3_40: str +accent_3_60: str +accent_4: str +accent_4_20: str +accent_4_40: str +accent_4_60: str +accent_5: str +accent_5_20: str +accent_5_40: str +accent_5_60: str +accent_6: str +accent_6_20: str +accent_6_40: str +accent_6_60: str +pandas_highlight: str +styles: Any diff --git a/stubs/openpyxl/openpyxl/styles/cell_style.pyi b/stubs/openpyxl/openpyxl/styles/cell_style.pyi new file mode 100644 index 000000000..b44a750d3 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/cell_style.pyi @@ -0,0 +1,88 @@ +from array import array +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ArrayDescriptor: + key: Any + def __init__(self, key) -> None: ... + def __get__(self, instance, cls): ... + def __set__(self, instance, value) -> None: ... + +class StyleArray(array[Any]): + tagname: str + fontId: Any + fillId: Any + borderId: Any + numFmtId: Any + protectionId: Any + alignmentId: Any + pivotButton: Any + quotePrefix: Any + xfId: Any + def __new__(cls, args=...): ... + def __hash__(self): ... + def __copy__(self): ... + def __deepcopy__(self, memo): ... + +class CellStyle(Serialisable): + tagname: str + numFmtId: Any + fontId: Any + fillId: Any + borderId: Any + xfId: Any + quotePrefix: Any + pivotButton: Any + applyNumberFormat: Any + applyFont: Any + applyFill: Any + applyBorder: Any + # Overwritten by properties below + # applyAlignment: Bool + # applyProtection: Bool + alignment: Any + protection: Any + extLst: Any + __elements__: Any + __attrs__: Any + def __init__( + self, + numFmtId: int = ..., + fontId: int = ..., + fillId: int = ..., + borderId: int = ..., + xfId: Any | None = ..., + quotePrefix: Any | None = ..., + pivotButton: Any | None = ..., + applyNumberFormat: Any | None = ..., + applyFont: Any | None = ..., + applyFill: Any | None = ..., + applyBorder: Any | None = ..., + applyAlignment: Any | None = ..., + applyProtection: Any | None = ..., + alignment: Any | None = ..., + protection: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + def to_array(self): ... + @classmethod + def from_array(cls, style): ... + @property + def applyProtection(self): ... + @property + def applyAlignment(self): ... + +class CellStyleList(Serialisable): + tagname: str + __attrs__: Any + # Overwritten by property below + # count: Integer + xf: Any + alignment: Any + protection: Any + __elements__: Any + def __init__(self, count: Any | None = ..., xf=...) -> None: ... + @property + def count(self): ... + def __getitem__(self, idx): ... diff --git a/stubs/openpyxl/openpyxl/styles/colors.pyi b/stubs/openpyxl/openpyxl/styles/colors.pyi new file mode 100644 index 000000000..3f311d4db --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/colors.pyi @@ -0,0 +1,60 @@ +from typing import Any + +from openpyxl.descriptors import Typed +from openpyxl.descriptors.serialisable import Serialisable + +COLOR_INDEX: Any +BLACK: Any +WHITE: Any +BLUE: Any +aRGB_REGEX: Any + +class RGB(Typed): + expected_type: Any + def __set__(self, instance, value) -> None: ... + +class Color(Serialisable): + tagname: str + rgb: Any + indexed: Any + auto: Any + theme: Any + tint: Any + type: Any + def __init__( + self, + rgb=..., + indexed: Any | None = ..., + auto: Any | None = ..., + theme: Any | None = ..., + tint: float = ..., + index: Any | None = ..., + type: str = ..., + ) -> None: ... + @property + def value(self): ... + @value.setter + def value(self, value) -> None: ... + def __iter__(self): ... + @property + def index(self): ... + def __add__(self, other): ... + +class ColorDescriptor(Typed): + expected_type: Any + def __set__(self, instance, value) -> None: ... + +class RgbColor(Serialisable): + tagname: str + rgb: Any + def __init__(self, rgb: Any | None = ...) -> None: ... + +class ColorList(Serialisable): + tagname: str + indexedColors: Any + mruColors: Any + __elements__: Any + def __init__(self, indexedColors=..., mruColors=...) -> None: ... + def __bool__(self): ... + @property + def index(self): ... diff --git a/stubs/openpyxl/openpyxl/styles/differential.pyi b/stubs/openpyxl/openpyxl/styles/differential.pyi new file mode 100644 index 000000000..2c6c9b580 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/differential.pyi @@ -0,0 +1,37 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class DifferentialStyle(Serialisable): + tagname: str + __elements__: Any + font: Any + numFmt: Any + fill: Any + alignment: Any + border: Any + protection: Any + extLst: Any + def __init__( + self, + font: Any | None = ..., + numFmt: Any | None = ..., + fill: Any | None = ..., + alignment: Any | None = ..., + border: Any | None = ..., + protection: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class DifferentialStyleList(Serialisable): + tagname: str + dxf: Any + styles: Any + __attrs__: Any + def __init__(self, dxf=..., count: Any | None = ...) -> None: ... + def append(self, dxf) -> None: ... + def add(self, dxf): ... + def __bool__(self): ... + def __getitem__(self, idx): ... + @property + def count(self): ... diff --git a/stubs/openpyxl/openpyxl/styles/fills.pyi b/stubs/openpyxl/openpyxl/styles/fills.pyi new file mode 100644 index 000000000..f3fdda594 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/fills.pyi @@ -0,0 +1,79 @@ +from typing import Any + +from openpyxl.descriptors import Sequence +from openpyxl.descriptors.serialisable import Serialisable + +FILL_NONE: str +FILL_SOLID: str +FILL_PATTERN_DARKDOWN: str +FILL_PATTERN_DARKGRAY: str +FILL_PATTERN_DARKGRID: str +FILL_PATTERN_DARKHORIZONTAL: str +FILL_PATTERN_DARKTRELLIS: str +FILL_PATTERN_DARKUP: str +FILL_PATTERN_DARKVERTICAL: str +FILL_PATTERN_GRAY0625: str +FILL_PATTERN_GRAY125: str +FILL_PATTERN_LIGHTDOWN: str +FILL_PATTERN_LIGHTGRAY: str +FILL_PATTERN_LIGHTGRID: str +FILL_PATTERN_LIGHTHORIZONTAL: str +FILL_PATTERN_LIGHTTRELLIS: str +FILL_PATTERN_LIGHTUP: str +FILL_PATTERN_LIGHTVERTICAL: str +FILL_PATTERN_MEDIUMGRAY: str +fills: Any + +class Fill(Serialisable): + tagname: str + @classmethod + def from_tree(cls, el): ... + +class PatternFill(Fill): + tagname: str + __elements__: Any + patternType: Any + fill_type: Any + fgColor: Any + start_color: Any + bgColor: Any + end_color: Any + def __init__( + self, + patternType: Any | None = ..., + fgColor=..., + bgColor=..., + fill_type: Any | None = ..., + start_color: Any | None = ..., + end_color: Any | None = ..., + ) -> None: ... + def to_tree(self, tagname: Any | None = ..., idx: Any | None = ...): ... # type: ignore[override] + +DEFAULT_EMPTY_FILL: Any +DEFAULT_GRAY_FILL: Any + +class Stop(Serialisable): + tagname: str + position: Any + color: Any + def __init__(self, color, position) -> None: ... + +class StopList(Sequence): + expected_type: Any + def __set__(self, obj, values) -> None: ... + +class GradientFill(Fill): + tagname: str + type: Any + fill_type: Any + degree: Any + left: Any + right: Any + top: Any + bottom: Any + stop: Any + def __init__( + self, type: str = ..., degree: int = ..., left: int = ..., right: int = ..., top: int = ..., bottom: int = ..., stop=... + ) -> None: ... + def __iter__(self): ... + def to_tree(self, tagname: Any | None = ..., namespace: Any | None = ..., idx: Any | None = ...): ... # type: ignore[override] diff --git a/stubs/openpyxl/openpyxl/styles/fonts.pyi b/stubs/openpyxl/openpyxl/styles/fonts.pyi new file mode 100644 index 000000000..9c8bf2998 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/fonts.pyi @@ -0,0 +1,58 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Font(Serialisable): + UNDERLINE_DOUBLE: str + UNDERLINE_DOUBLE_ACCOUNTING: str + UNDERLINE_SINGLE: str + UNDERLINE_SINGLE_ACCOUNTING: str + name: Any + charset: Any + family: Any + sz: Any + size: Any + b: Any + bold: Any + i: Any + italic: Any + strike: Any + strikethrough: Any + outline: Any + shadow: Any + condense: Any + extend: Any + u: Any + underline: Any + vertAlign: Any + color: Any + scheme: Any + tagname: str + __elements__: Any + def __init__( + self, + name: Any | None = ..., + sz: Any | None = ..., + b: Any | None = ..., + i: Any | None = ..., + charset: Any | None = ..., + u: Any | None = ..., + strike: Any | None = ..., + color: Any | None = ..., + scheme: Any | None = ..., + family: Any | None = ..., + size: Any | None = ..., + bold: Any | None = ..., + italic: Any | None = ..., + strikethrough: Any | None = ..., + underline: Any | None = ..., + vertAlign: Any | None = ..., + outline: Any | None = ..., + shadow: Any | None = ..., + condense: Any | None = ..., + extend: Any | None = ..., + ) -> None: ... + @classmethod + def from_tree(cls, node): ... + +DEFAULT_FONT: Any diff --git a/stubs/openpyxl/openpyxl/styles/named_styles.pyi b/stubs/openpyxl/openpyxl/styles/named_styles.pyi new file mode 100644 index 000000000..b6d6f06d6 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/named_styles.pyi @@ -0,0 +1,76 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class NamedStyle(Serialisable): # type: ignore[misc] + font: Any + fill: Any + border: Any + alignment: Any + number_format: Any + protection: Any + builtinId: Any + hidden: Any + # Overwritten by property below + # xfId: Integer + name: Any + def __init__( + self, + name: str = ..., + font=..., + fill=..., + border=..., + alignment=..., + number_format: Any | None = ..., + protection=..., + builtinId: Any | None = ..., + hidden: bool = ..., + xfId: Any | None = ..., + ) -> None: ... + def __setattr__(self, attr, value) -> None: ... + def __iter__(self): ... + @property + def xfId(self): ... + def bind(self, wb) -> None: ... + def as_tuple(self): ... + def as_xf(self): ... + def as_name(self): ... + +class NamedStyleList(list[Any]): + @property + def names(self): ... + def __getitem__(self, key): ... + def append(self, style) -> None: ... + +class _NamedCellStyle(Serialisable): + tagname: str + name: Any + xfId: Any + builtinId: Any + iLevel: Any + hidden: Any + customBuiltin: Any + extLst: Any + __elements__: Any + def __init__( + self, + name: Any | None = ..., + xfId: Any | None = ..., + builtinId: Any | None = ..., + iLevel: Any | None = ..., + hidden: Any | None = ..., + customBuiltin: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class _NamedCellStyleList(Serialisable): + tagname: str + # Overwritten by property below + # count: Integer + cellStyle: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., cellStyle=...) -> None: ... + @property + def count(self): ... + @property + def names(self): ... diff --git a/stubs/openpyxl/openpyxl/styles/numbers.pyi b/stubs/openpyxl/openpyxl/styles/numbers.pyi new file mode 100644 index 000000000..421720d56 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/numbers.pyi @@ -0,0 +1,73 @@ +from typing import Any + +from openpyxl.descriptors import String +from openpyxl.descriptors.serialisable import Serialisable + +BUILTIN_FORMATS: Any +BUILTIN_FORMATS_MAX_SIZE: int +BUILTIN_FORMATS_REVERSE: Any +FORMAT_GENERAL: Any +FORMAT_TEXT: Any +FORMAT_NUMBER: Any +FORMAT_NUMBER_00: Any +FORMAT_NUMBER_COMMA_SEPARATED1: Any +FORMAT_NUMBER_COMMA_SEPARATED2: str +FORMAT_PERCENTAGE: Any +FORMAT_PERCENTAGE_00: Any +FORMAT_DATE_YYYYMMDD2: str +FORMAT_DATE_YYMMDD: str +FORMAT_DATE_DDMMYY: str +FORMAT_DATE_DMYSLASH: str +FORMAT_DATE_DMYMINUS: str +FORMAT_DATE_DMMINUS: str +FORMAT_DATE_MYMINUS: str +FORMAT_DATE_XLSX14: Any +FORMAT_DATE_XLSX15: Any +FORMAT_DATE_XLSX16: Any +FORMAT_DATE_XLSX17: Any +FORMAT_DATE_XLSX22: Any +FORMAT_DATE_DATETIME: str +FORMAT_DATE_TIME1: Any +FORMAT_DATE_TIME2: Any +FORMAT_DATE_TIME3: Any +FORMAT_DATE_TIME4: Any +FORMAT_DATE_TIME5: Any +FORMAT_DATE_TIME6: Any +FORMAT_DATE_TIME7: str +FORMAT_DATE_TIME8: str +FORMAT_DATE_TIMEDELTA: str +FORMAT_DATE_YYMMDDSLASH: str +FORMAT_CURRENCY_USD_SIMPLE: str +FORMAT_CURRENCY_USD: str +FORMAT_CURRENCY_EUR_SIMPLE: str +COLORS: str +LITERAL_GROUP: str +LOCALE_GROUP: str +STRIP_RE: Any +TIMEDELTA_RE: Any + +def is_date_format(fmt): ... +def is_timedelta_format(fmt): ... +def is_datetime(fmt): ... +def is_builtin(fmt): ... +def builtin_format_code(index): ... +def builtin_format_id(fmt): ... + +class NumberFormatDescriptor(String): + def __set__(self, instance, value) -> None: ... + +class NumberFormat(Serialisable): # type: ignore[misc] + numFmtId: Any + formatCode: Any + def __init__(self, numFmtId: Any | None = ..., formatCode: Any | None = ...) -> None: ... + +class NumberFormatList(Serialisable): # type: ignore[misc] + # Overwritten by property below + # count: Integer + numFmt: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., numFmt=...) -> None: ... + @property + def count(self): ... + def __getitem__(self, idx): ... diff --git a/stubs/openpyxl/openpyxl/styles/protection.pyi b/stubs/openpyxl/openpyxl/styles/protection.pyi new file mode 100644 index 000000000..df22903e1 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/protection.pyi @@ -0,0 +1,9 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Protection(Serialisable): + tagname: str + locked: Any + hidden: Any + def __init__(self, locked: bool = ..., hidden: bool = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/styles/proxy.pyi b/stubs/openpyxl/openpyxl/styles/proxy.pyi new file mode 100644 index 000000000..b8e13b08a --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/proxy.pyi @@ -0,0 +1,9 @@ +class StyleProxy: + def __init__(self, target) -> None: ... + def __getattr__(self, attr): ... + def __setattr__(self, attr, value) -> None: ... + def __copy__(self): ... + def __add__(self, other): ... + def copy(self, **kw): ... + def __eq__(self, other): ... + def __ne__(self, other): ... diff --git a/stubs/openpyxl/openpyxl/styles/styleable.pyi b/stubs/openpyxl/openpyxl/styles/styleable.pyi new file mode 100644 index 000000000..45929c7d8 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/styleable.pyi @@ -0,0 +1,44 @@ +from typing import Any +from warnings import warn as warn + +class StyleDescriptor: + collection: Any + key: Any + def __init__(self, collection, key) -> None: ... + def __set__(self, instance, value) -> None: ... + def __get__(self, instance, cls): ... + +class NumberFormatDescriptor: + key: str + collection: str + def __set__(self, instance, value) -> None: ... + def __get__(self, instance, cls): ... + +class NamedStyleDescriptor: + key: str + collection: str + def __set__(self, instance, value) -> None: ... + def __get__(self, instance, cls): ... + +class StyleArrayDescriptor: + key: Any + def __init__(self, key) -> None: ... + def __set__(self, instance, value) -> None: ... + def __get__(self, instance, cls): ... + +class StyleableObject: + font: Any + fill: Any + border: Any + number_format: Any + protection: Any + alignment: Any + style: Any + quotePrefix: Any + pivotButton: Any + parent: Any + def __init__(self, sheet, style_array: Any | None = ...) -> None: ... + @property + def style_id(self): ... + @property + def has_style(self): ... diff --git a/stubs/openpyxl/openpyxl/styles/stylesheet.pyi b/stubs/openpyxl/openpyxl/styles/stylesheet.pyi new file mode 100644 index 000000000..c7a44bd2d --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/stylesheet.pyi @@ -0,0 +1,45 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Stylesheet(Serialisable): + tagname: str + numFmts: Any + fonts: Any + fills: Any + borders: Any + cellStyleXfs: Any + cellXfs: Any + cellStyles: Any + dxfs: Any + tableStyles: Any + colors: Any + extLst: Any + __elements__: Any + number_formats: Any + cell_styles: Any + alignments: Any + protections: Any + named_styles: Any + def __init__( + self, + numFmts: Any | None = ..., + fonts=..., + fills=..., + borders=..., + cellStyleXfs: Any | None = ..., + cellXfs: Any | None = ..., + cellStyles: Any | None = ..., + dxfs=..., + tableStyles: Any | None = ..., + colors: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + @classmethod + def from_tree(cls, node): ... + @property + def custom_formats(self): ... + def to_tree(self, tagname: Any | None = ..., idx: Any | None = ..., namespace: Any | None = ...): ... + +def apply_stylesheet(archive, wb): ... +def write_stylesheet(wb): ... diff --git a/stubs/openpyxl/openpyxl/styles/table.pyi b/stubs/openpyxl/openpyxl/styles/table.pyi new file mode 100644 index 000000000..329070137 --- /dev/null +++ b/stubs/openpyxl/openpyxl/styles/table.pyi @@ -0,0 +1,40 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class TableStyleElement(Serialisable): + tagname: str + type: Any + size: Any + dxfId: Any + def __init__(self, type: Any | None = ..., size: Any | None = ..., dxfId: Any | None = ...) -> None: ... + +class TableStyle(Serialisable): + tagname: str + name: Any + pivot: Any + table: Any + count: Any + tableStyleElement: Any + __elements__: Any + def __init__( + self, + name: Any | None = ..., + pivot: Any | None = ..., + table: Any | None = ..., + count: Any | None = ..., + tableStyleElement=..., + ) -> None: ... + +class TableStyleList(Serialisable): + tagname: str + defaultTableStyle: Any + defaultPivotStyle: Any + tableStyle: Any + __elements__: Any + __attrs__: Any + def __init__( + self, count: Any | None = ..., defaultTableStyle: str = ..., defaultPivotStyle: str = ..., tableStyle=... + ) -> None: ... + @property + def count(self): ... diff --git a/stubs/openpyxl/openpyxl/utils/__init__.pyi b/stubs/openpyxl/openpyxl/utils/__init__.pyi new file mode 100644 index 000000000..ba4593953 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/__init__.pyi @@ -0,0 +1,13 @@ +from .cell import ( + absolute_coordinate as absolute_coordinate, + cols_from_range as cols_from_range, + column_index_from_string as column_index_from_string, + coordinate_to_tuple as coordinate_to_tuple, + get_column_interval as get_column_interval, + get_column_letter as get_column_letter, + quote_sheetname as quote_sheetname, + range_boundaries as range_boundaries, + range_to_tuple as range_to_tuple, + rows_from_range as rows_from_range, +) +from .formulas import FORMULAE as FORMULAE diff --git a/stubs/openpyxl/openpyxl/utils/bound_dictionary.pyi b/stubs/openpyxl/openpyxl/utils/bound_dictionary.pyi new file mode 100644 index 000000000..2edc1a8a4 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/bound_dictionary.pyi @@ -0,0 +1,7 @@ +from collections import defaultdict +from typing import Any + +class BoundDictionary(defaultdict[Any, Any]): + reference: Any + def __init__(self, reference: Any | None = ..., *args, **kw) -> None: ... + def __getitem__(self, key): ... diff --git a/stubs/openpyxl/openpyxl/utils/cell.pyi b/stubs/openpyxl/openpyxl/utils/cell.pyi new file mode 100644 index 000000000..3a14ebc65 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/cell.pyi @@ -0,0 +1,25 @@ +from collections.abc import Generator +from typing import Any + +COORD_RE: Any +COL_RANGE: str +ROW_RANGE: str +RANGE_EXPR: str +ABSOLUTE_RE: Any +SHEET_TITLE: str +SHEETRANGE_RE: Any + +def get_column_interval(start, end): ... +def coordinate_from_string(coord_string): ... +def absolute_coordinate(coord_string): ... + +col: Any + +def get_column_letter(idx): ... +def column_index_from_string(str_col): ... +def range_boundaries(range_string): ... +def rows_from_range(range_string) -> Generator[Any, None, None]: ... +def cols_from_range(range_string) -> Generator[Any, None, None]: ... +def coordinate_to_tuple(coordinate): ... +def range_to_tuple(range_string): ... +def quote_sheetname(sheetname): ... diff --git a/stubs/openpyxl/openpyxl/utils/dataframe.pyi b/stubs/openpyxl/openpyxl/utils/dataframe.pyi new file mode 100644 index 000000000..1f5dd0c7e --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/dataframe.pyi @@ -0,0 +1,5 @@ +from collections.abc import Generator +from typing import Any + +def dataframe_to_rows(df, index: bool = ..., header: bool = ...) -> Generator[Any, None, None]: ... +def expand_index(index, header: bool = ...) -> Generator[Any, None, None]: ... diff --git a/stubs/openpyxl/openpyxl/utils/datetime.pyi b/stubs/openpyxl/openpyxl/utils/datetime.pyi new file mode 100644 index 000000000..f407d19df --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/datetime.pyi @@ -0,0 +1,19 @@ +from typing import Any + +MAC_EPOCH: Any +WINDOWS_EPOCH: Any +# The following two constants are defined twice in the implementation. +CALENDAR_WINDOWS_1900 = WINDOWS_EPOCH # noqa: F821 +CALENDAR_MAC_1904 = MAC_EPOCH # noqa: F821 +SECS_PER_DAY: int +ISO_FORMAT: str +ISO_REGEX: Any +ISO_DURATION: Any + +def to_ISO8601(dt): ... +def from_ISO8601(formatted_string): ... +def to_excel(dt, epoch=...): ... +def from_excel(value, epoch=..., timedelta: bool = ...): ... +def time_to_days(value): ... +def timedelta_to_days(value): ... +def days_to_time(value): ... diff --git a/stubs/openpyxl/openpyxl/utils/escape.pyi b/stubs/openpyxl/openpyxl/utils/escape.pyi new file mode 100644 index 000000000..3e182f450 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/escape.pyi @@ -0,0 +1,2 @@ +def escape(value): ... +def unescape(value): ... diff --git a/stubs/openpyxl/openpyxl/utils/exceptions.pyi b/stubs/openpyxl/openpyxl/utils/exceptions.pyi new file mode 100644 index 000000000..5e9ebead8 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/exceptions.pyi @@ -0,0 +1,7 @@ +class CellCoordinatesException(Exception): ... +class IllegalCharacterError(Exception): ... +class NamedRangeException(Exception): ... +class SheetTitleException(Exception): ... +class InvalidFileException(Exception): ... +class ReadOnlyWorkbookException(Exception): ... +class WorkbookAlreadySaved(Exception): ... diff --git a/stubs/openpyxl/openpyxl/utils/formulas.pyi b/stubs/openpyxl/openpyxl/utils/formulas.pyi new file mode 100644 index 000000000..55742aa9e --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/formulas.pyi @@ -0,0 +1,3 @@ +from typing import Any + +FORMULAE: Any diff --git a/stubs/openpyxl/openpyxl/utils/indexed_list.pyi b/stubs/openpyxl/openpyxl/utils/indexed_list.pyi new file mode 100644 index 000000000..43c4516b2 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/indexed_list.pyi @@ -0,0 +1,9 @@ +from typing import Any + +class IndexedList(list[Any]): + clean: bool + def __init__(self, iterable: Any | None = ...) -> None: ... + def __contains__(self, value): ... + def index(self, value): ... + def append(self, value) -> None: ... + def add(self, value): ... diff --git a/stubs/openpyxl/openpyxl/utils/inference.pyi b/stubs/openpyxl/openpyxl/utils/inference.pyi new file mode 100644 index 000000000..6eb88af41 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/inference.pyi @@ -0,0 +1,9 @@ +from typing import Any + +PERCENT_REGEX: Any +TIME_REGEX: Any +NUMBER_REGEX: Any + +def cast_numeric(value): ... +def cast_percentage(value): ... +def cast_time(value): ... diff --git a/stubs/openpyxl/openpyxl/utils/protection.pyi b/stubs/openpyxl/openpyxl/utils/protection.pyi new file mode 100644 index 000000000..28eb69b53 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/protection.pyi @@ -0,0 +1 @@ +def hash_password(plaintext_password: str = ...): ... diff --git a/stubs/openpyxl/openpyxl/utils/units.pyi b/stubs/openpyxl/openpyxl/utils/units.pyi new file mode 100644 index 000000000..9f81dd769 --- /dev/null +++ b/stubs/openpyxl/openpyxl/utils/units.pyi @@ -0,0 +1,24 @@ +from typing import Any + +DEFAULT_ROW_HEIGHT: float +BASE_COL_WIDTH: int +DEFAULT_COLUMN_WIDTH: Any +DEFAULT_LEFT_MARGIN: float +DEFAULT_TOP_MARGIN: float +DEFAULT_HEADER: float + +def inch_to_dxa(value): ... +def dxa_to_inch(value): ... +def dxa_to_cm(value): ... +def cm_to_dxa(value): ... +def pixels_to_EMU(value): ... +def EMU_to_pixels(value): ... +def cm_to_EMU(value): ... +def EMU_to_cm(value): ... +def inch_to_EMU(value): ... +def EMU_to_inch(value): ... +def pixels_to_points(value, dpi: int = ...): ... +def points_to_pixels(value, dpi: int = ...): ... +def degrees_to_angle(value): ... +def angle_to_degrees(value): ... +def short_color(color): ... diff --git a/stubs/openpyxl/openpyxl/workbook/__init__.pyi b/stubs/openpyxl/openpyxl/workbook/__init__.pyi new file mode 100644 index 000000000..af0aa0b81 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/__init__.pyi @@ -0,0 +1 @@ +from .workbook import Workbook as Workbook diff --git a/stubs/openpyxl/openpyxl/workbook/_writer.pyi b/stubs/openpyxl/openpyxl/workbook/_writer.pyi new file mode 100644 index 000000000..5b2c00b6d --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/_writer.pyi @@ -0,0 +1,18 @@ +from typing import Any + +def get_active_sheet(wb): ... + +class WorkbookWriter: + wb: Any + rels: Any + package: Any + def __init__(self, wb) -> None: ... + def write_properties(self) -> None: ... + def write_worksheets(self) -> None: ... + def write_refs(self) -> None: ... + def write_names(self) -> None: ... + def write_pivots(self) -> None: ... + def write_views(self) -> None: ... + def write(self): ... + def write_rels(self): ... + def write_root_rels(self): ... diff --git a/stubs/openpyxl/openpyxl/workbook/child.pyi b/stubs/openpyxl/openpyxl/workbook/child.pyi new file mode 100644 index 000000000..2c924f126 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/child.pyi @@ -0,0 +1,43 @@ +from typing import Any + +INVALID_TITLE_REGEX: Any + +def avoid_duplicate_name(names, value): ... + +class _WorkbookChild: + HeaderFooter: Any + def __init__(self, parent: Any | None = ..., title: Any | None = ...) -> None: ... + @property + def parent(self): ... + @property + def encoding(self): ... + @property + def title(self): ... + @title.setter + def title(self, value) -> None: ... + @property + def oddHeader(self): ... + @oddHeader.setter + def oddHeader(self, value) -> None: ... + @property + def oddFooter(self): ... + @oddFooter.setter + def oddFooter(self, value) -> None: ... + @property + def evenHeader(self): ... + @evenHeader.setter + def evenHeader(self, value) -> None: ... + @property + def evenFooter(self): ... + @evenFooter.setter + def evenFooter(self, value) -> None: ... + @property + def firstHeader(self): ... + @firstHeader.setter + def firstHeader(self, value) -> None: ... + @property + def firstFooter(self): ... + @firstFooter.setter + def firstFooter(self, value) -> None: ... + @property + def path(self): ... diff --git a/stubs/openpyxl/openpyxl/workbook/defined_name.pyi b/stubs/openpyxl/openpyxl/workbook/defined_name.pyi new file mode 100644 index 000000000..f4e2a781a --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/defined_name.pyi @@ -0,0 +1,73 @@ +from collections.abc import Generator +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +RESERVED: Any +RESERVED_REGEX: Any +COL_RANGE: str +COL_RANGE_RE: Any +ROW_RANGE: str +ROW_RANGE_RE: Any +TITLES_REGEX: Any + +class DefinedName(Serialisable): + tagname: str + name: Any + comment: Any + customMenu: Any + description: Any + help: Any + statusBar: Any + localSheetId: Any + hidden: Any + function: Any + vbProcedure: Any + xlm: Any + functionGroupId: Any + shortcutKey: Any + publishToServer: Any + workbookParameter: Any + attr_text: Any + value: Any + def __init__( + self, + name: Any | None = ..., + comment: Any | None = ..., + customMenu: Any | None = ..., + description: Any | None = ..., + help: Any | None = ..., + statusBar: Any | None = ..., + localSheetId: Any | None = ..., + hidden: Any | None = ..., + function: Any | None = ..., + vbProcedure: Any | None = ..., + xlm: Any | None = ..., + functionGroupId: Any | None = ..., + shortcutKey: Any | None = ..., + publishToServer: Any | None = ..., + workbookParameter: Any | None = ..., + attr_text: Any | None = ..., + ) -> None: ... + @property + def type(self): ... + @property + def destinations(self) -> Generator[Any, None, None]: ... + @property + def is_reserved(self): ... + @property + def is_external(self): ... + def __iter__(self): ... + +class DefinedNameList(Serialisable): + tagname: str + definedName: Any + def __init__(self, definedName=...) -> None: ... + def append(self, defn) -> None: ... + def __len__(self): ... + def __contains__(self, name): ... + def __getitem__(self, name): ... + def get(self, name, scope: Any | None = ...): ... + def __delitem__(self, name) -> None: ... + def delete(self, name, scope: Any | None = ...): ... + def localnames(self, scope): ... diff --git a/stubs/openpyxl/openpyxl/workbook/external_link/__init__.pyi b/stubs/openpyxl/openpyxl/workbook/external_link/__init__.pyi new file mode 100644 index 000000000..37ef93721 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/external_link/__init__.pyi @@ -0,0 +1 @@ +from .external import ExternalLink as ExternalLink diff --git a/stubs/openpyxl/openpyxl/workbook/external_link/external.pyi b/stubs/openpyxl/openpyxl/workbook/external_link/external.pyi new file mode 100644 index 000000000..3e5e7c898 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/external_link/external.pyi @@ -0,0 +1,66 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ExternalCell(Serialisable): # type: ignore[misc] + r: Any + t: Any + vm: Any + v: Any + def __init__(self, r: Any | None = ..., t: Any | None = ..., vm: Any | None = ..., v: Any | None = ...) -> None: ... + +class ExternalRow(Serialisable): # type: ignore[misc] + r: Any + cell: Any + __elements__: Any + def __init__(self, r=..., cell: Any | None = ...) -> None: ... + +class ExternalSheetData(Serialisable): # type: ignore[misc] + sheetId: Any + refreshError: Any + row: Any + __elements__: Any + def __init__(self, sheetId: Any | None = ..., refreshError: Any | None = ..., row=...) -> None: ... + +class ExternalSheetDataSet(Serialisable): # type: ignore[misc] + sheetData: Any + __elements__: Any + def __init__(self, sheetData: Any | None = ...) -> None: ... + +class ExternalSheetNames(Serialisable): # type: ignore[misc] + sheetName: Any + __elements__: Any + def __init__(self, sheetName=...) -> None: ... + +class ExternalDefinedName(Serialisable): + tagname: str + name: Any + refersTo: Any + sheetId: Any + def __init__(self, name: Any | None = ..., refersTo: Any | None = ..., sheetId: Any | None = ...) -> None: ... + +class ExternalBook(Serialisable): + tagname: str + sheetNames: Any + definedNames: Any + sheetDataSet: Any + id: Any + __elements__: Any + def __init__( + self, sheetNames: Any | None = ..., definedNames=..., sheetDataSet: Any | None = ..., id: Any | None = ... + ) -> None: ... + +class ExternalLink(Serialisable): + tagname: str + mime_type: str + externalBook: Any + file_link: Any + __elements__: Any + def __init__( + self, externalBook: Any | None = ..., ddeLink: Any | None = ..., oleLink: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + def to_tree(self): ... + @property + def path(self): ... + +def read_external_link(archive, book_path): ... diff --git a/stubs/openpyxl/openpyxl/workbook/external_reference.pyi b/stubs/openpyxl/openpyxl/workbook/external_reference.pyi new file mode 100644 index 000000000..141dafe11 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/external_reference.pyi @@ -0,0 +1,8 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ExternalReference(Serialisable): + tagname: str + id: Any + def __init__(self, id) -> None: ... diff --git a/stubs/openpyxl/openpyxl/workbook/function_group.pyi b/stubs/openpyxl/openpyxl/workbook/function_group.pyi new file mode 100644 index 000000000..7ebcf0c2f --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/function_group.pyi @@ -0,0 +1,15 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class FunctionGroup(Serialisable): + tagname: str + name: Any + def __init__(self, name: Any | None = ...) -> None: ... + +class FunctionGroupList(Serialisable): + tagname: str + builtInGroupCount: Any + functionGroup: Any + __elements__: Any + def __init__(self, builtInGroupCount: int = ..., functionGroup=...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/workbook/properties.pyi b/stubs/openpyxl/openpyxl/workbook/properties.pyi new file mode 100644 index 000000000..1ada0577d --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/properties.pyi @@ -0,0 +1,95 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class WorkbookProperties(Serialisable): + tagname: str + date1904: Any + dateCompatibility: Any + showObjects: Any + showBorderUnselectedTables: Any + filterPrivacy: Any + promptedSolutions: Any + showInkAnnotation: Any + backupFile: Any + saveExternalLinkValues: Any + updateLinks: Any + codeName: Any + hidePivotFieldList: Any + showPivotChartFilter: Any + allowRefreshQuery: Any + publishItems: Any + checkCompatibility: Any + autoCompressPictures: Any + refreshAllConnections: Any + defaultThemeVersion: Any + def __init__( + self, + date1904: Any | None = ..., + dateCompatibility: Any | None = ..., + showObjects: Any | None = ..., + showBorderUnselectedTables: Any | None = ..., + filterPrivacy: Any | None = ..., + promptedSolutions: Any | None = ..., + showInkAnnotation: Any | None = ..., + backupFile: Any | None = ..., + saveExternalLinkValues: Any | None = ..., + updateLinks: Any | None = ..., + codeName: Any | None = ..., + hidePivotFieldList: Any | None = ..., + showPivotChartFilter: Any | None = ..., + allowRefreshQuery: Any | None = ..., + publishItems: Any | None = ..., + checkCompatibility: Any | None = ..., + autoCompressPictures: Any | None = ..., + refreshAllConnections: Any | None = ..., + defaultThemeVersion: Any | None = ..., + ) -> None: ... + +class CalcProperties(Serialisable): + tagname: str + calcId: Any + calcMode: Any + fullCalcOnLoad: Any + refMode: Any + iterate: Any + iterateCount: Any + iterateDelta: Any + fullPrecision: Any + calcCompleted: Any + calcOnSave: Any + concurrentCalc: Any + concurrentManualCount: Any + forceFullCalc: Any + def __init__( + self, + calcId: int = ..., + calcMode: Any | None = ..., + fullCalcOnLoad: bool = ..., + refMode: Any | None = ..., + iterate: Any | None = ..., + iterateCount: Any | None = ..., + iterateDelta: Any | None = ..., + fullPrecision: Any | None = ..., + calcCompleted: Any | None = ..., + calcOnSave: Any | None = ..., + concurrentCalc: Any | None = ..., + concurrentManualCount: Any | None = ..., + forceFullCalc: Any | None = ..., + ) -> None: ... + +class FileVersion(Serialisable): + tagname: str + appName: Any + lastEdited: Any + lowestEdited: Any + rupBuild: Any + codeName: Any + def __init__( + self, + appName: Any | None = ..., + lastEdited: Any | None = ..., + lowestEdited: Any | None = ..., + rupBuild: Any | None = ..., + codeName: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/workbook/protection.pyi b/stubs/openpyxl/openpyxl/workbook/protection.pyi new file mode 100644 index 000000000..9d53fd649 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/protection.pyi @@ -0,0 +1,77 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class WorkbookProtection(Serialisable): + tagname: str + workbook_password: Any + workbookPasswordCharacterSet: Any + revision_password: Any + revisionsPasswordCharacterSet: Any + lockStructure: Any + lock_structure: Any + lockWindows: Any + lock_windows: Any + lockRevision: Any + lock_revision: Any + revisionsAlgorithmName: Any + revisionsHashValue: Any + revisionsSaltValue: Any + revisionsSpinCount: Any + workbookAlgorithmName: Any + workbookHashValue: Any + workbookSaltValue: Any + workbookSpinCount: Any + __attrs__: Any + def __init__( + self, + workbookPassword: Any | None = ..., + workbookPasswordCharacterSet: Any | None = ..., + revisionsPassword: Any | None = ..., + revisionsPasswordCharacterSet: Any | None = ..., + lockStructure: Any | None = ..., + lockWindows: Any | None = ..., + lockRevision: Any | None = ..., + revisionsAlgorithmName: Any | None = ..., + revisionsHashValue: Any | None = ..., + revisionsSaltValue: Any | None = ..., + revisionsSpinCount: Any | None = ..., + workbookAlgorithmName: Any | None = ..., + workbookHashValue: Any | None = ..., + workbookSaltValue: Any | None = ..., + workbookSpinCount: Any | None = ..., + ) -> None: ... + def set_workbook_password(self, value: str = ..., already_hashed: bool = ...) -> None: ... + @property + def workbookPassword(self): ... + @workbookPassword.setter + def workbookPassword(self, value) -> None: ... + def set_revisions_password(self, value: str = ..., already_hashed: bool = ...) -> None: ... + @property + def revisionsPassword(self): ... + @revisionsPassword.setter + def revisionsPassword(self, value) -> None: ... + @classmethod + def from_tree(cls, node): ... + +DocumentSecurity = WorkbookProtection + +class FileSharing(Serialisable): + tagname: str + readOnlyRecommended: Any + userName: Any + reservationPassword: Any + algorithmName: Any + hashValue: Any + saltValue: Any + spinCount: Any + def __init__( + self, + readOnlyRecommended: Any | None = ..., + userName: Any | None = ..., + reservationPassword: Any | None = ..., + algorithmName: Any | None = ..., + hashValue: Any | None = ..., + saltValue: Any | None = ..., + spinCount: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/workbook/smart_tags.pyi b/stubs/openpyxl/openpyxl/workbook/smart_tags.pyi new file mode 100644 index 000000000..a538386fb --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/smart_tags.pyi @@ -0,0 +1,22 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class SmartTag(Serialisable): + tagname: str + namespaceUri: Any + name: Any + url: Any + def __init__(self, namespaceUri: Any | None = ..., name: Any | None = ..., url: Any | None = ...) -> None: ... + +class SmartTagList(Serialisable): + tagname: str + smartTagType: Any + __elements__: Any + def __init__(self, smartTagType=...) -> None: ... + +class SmartTagProperties(Serialisable): + tagname: str + embed: Any + show: Any + def __init__(self, embed: Any | None = ..., show: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/workbook/views.pyi b/stubs/openpyxl/openpyxl/workbook/views.pyi new file mode 100644 index 000000000..e22514df3 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/views.pyi @@ -0,0 +1,95 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class BookView(Serialisable): + tagname: str + visibility: Any + minimized: Any + showHorizontalScroll: Any + showVerticalScroll: Any + showSheetTabs: Any + xWindow: Any + yWindow: Any + windowWidth: Any + windowHeight: Any + tabRatio: Any + firstSheet: Any + activeTab: Any + autoFilterDateGrouping: Any + extLst: Any + __elements__: Any + def __init__( + self, + visibility: str = ..., + minimized: bool = ..., + showHorizontalScroll: bool = ..., + showVerticalScroll: bool = ..., + showSheetTabs: bool = ..., + xWindow: Any | None = ..., + yWindow: Any | None = ..., + windowWidth: Any | None = ..., + windowHeight: Any | None = ..., + tabRatio: int = ..., + firstSheet: int = ..., + activeTab: int = ..., + autoFilterDateGrouping: bool = ..., + extLst: Any | None = ..., + ) -> None: ... + +class CustomWorkbookView(Serialisable): + tagname: str + name: Any + guid: Any + autoUpdate: Any + mergeInterval: Any + changesSavedWin: Any + onlySync: Any + personalView: Any + includePrintSettings: Any + includeHiddenRowCol: Any + maximized: Any + minimized: Any + showHorizontalScroll: Any + showVerticalScroll: Any + showSheetTabs: Any + xWindow: Any + yWindow: Any + windowWidth: Any + windowHeight: Any + tabRatio: Any + activeSheetId: Any + showFormulaBar: Any + showStatusbar: Any + showComments: Any + showObjects: Any + extLst: Any + __elements__: Any + def __init__( + self, + name: Any | None = ..., + guid: Any | None = ..., + autoUpdate: Any | None = ..., + mergeInterval: Any | None = ..., + changesSavedWin: Any | None = ..., + onlySync: Any | None = ..., + personalView: Any | None = ..., + includePrintSettings: Any | None = ..., + includeHiddenRowCol: Any | None = ..., + maximized: Any | None = ..., + minimized: Any | None = ..., + showHorizontalScroll: Any | None = ..., + showVerticalScroll: Any | None = ..., + showSheetTabs: Any | None = ..., + xWindow: Any | None = ..., + yWindow: Any | None = ..., + windowWidth: Any | None = ..., + windowHeight: Any | None = ..., + tabRatio: Any | None = ..., + activeSheetId: Any | None = ..., + showFormulaBar: Any | None = ..., + showStatusbar: Any | None = ..., + showComments: str = ..., + showObjects: str = ..., + extLst: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/workbook/web.pyi b/stubs/openpyxl/openpyxl/workbook/web.pyi new file mode 100644 index 000000000..2aff3d6a6 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/web.pyi @@ -0,0 +1,55 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class WebPublishObject(Serialisable): + tagname: str + id: Any + divId: Any + sourceObject: Any + destinationFile: Any + title: Any + autoRepublish: Any + def __init__( + self, + id: Any | None = ..., + divId: Any | None = ..., + sourceObject: Any | None = ..., + destinationFile: Any | None = ..., + title: Any | None = ..., + autoRepublish: Any | None = ..., + ) -> None: ... + +class WebPublishObjectList(Serialisable): + tagname: str + # Overwritten by property below + # count: Integer + webPublishObject: Any + __elements__: Any + def __init__(self, count: Any | None = ..., webPublishObject=...) -> None: ... + @property + def count(self): ... + +class WebPublishing(Serialisable): + tagname: str + css: Any + thicket: Any + longFileNames: Any + vml: Any + allowPng: Any + targetScreenSize: Any + dpi: Any + codePage: Any + characterSet: Any + def __init__( + self, + css: Any | None = ..., + thicket: Any | None = ..., + longFileNames: Any | None = ..., + vml: Any | None = ..., + allowPng: Any | None = ..., + targetScreenSize: str = ..., + dpi: Any | None = ..., + codePage: Any | None = ..., + characterSet: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/workbook/workbook.pyi b/stubs/openpyxl/openpyxl/workbook/workbook.pyi new file mode 100644 index 000000000..0ce9d9be2 --- /dev/null +++ b/stubs/openpyxl/openpyxl/workbook/workbook.pyi @@ -0,0 +1,71 @@ +from typing import Any + +INTEGER_TYPES: Any + +class Workbook: + template: bool + path: str + defined_names: Any + properties: Any + security: Any + shared_strings: Any + loaded_theme: Any + vba_archive: Any + is_template: bool + code_name: Any + encoding: str + iso_dates: Any + rels: Any + calculation: Any + views: Any + def __init__(self, write_only: bool = ..., iso_dates: bool = ...) -> None: ... + @property + def epoch(self): ... + @epoch.setter + def epoch(self, value) -> None: ... + @property + def read_only(self): ... + @property + def data_only(self): ... + @property + def write_only(self): ... + @property + def excel_base_date(self): ... + @property + def active(self): ... + @active.setter + def active(self, value) -> None: ... + def create_sheet(self, title: Any | None = ..., index: Any | None = ...): ... + def move_sheet(self, sheet, offset: int = ...) -> None: ... + def remove(self, worksheet) -> None: ... + def remove_sheet(self, worksheet) -> None: ... + def create_chartsheet(self, title: Any | None = ..., index: Any | None = ...): ... + def get_sheet_by_name(self, name): ... + def __contains__(self, key): ... + def index(self, worksheet): ... + def get_index(self, worksheet): ... + def __getitem__(self, key): ... + def __delitem__(self, key) -> None: ... + def __iter__(self): ... + def get_sheet_names(self): ... + @property + def worksheets(self): ... + @property + def chartsheets(self): ... + @property + def sheetnames(self): ... + def create_named_range(self, name, worksheet: Any | None = ..., value: Any | None = ..., scope: Any | None = ...) -> None: ... + def add_named_style(self, style) -> None: ... + @property + def named_styles(self): ... + def get_named_ranges(self): ... + def add_named_range(self, named_range) -> None: ... + def get_named_range(self, name): ... + def remove_named_range(self, named_range) -> None: ... + @property + def mime_type(self): ... + def save(self, filename) -> None: ... + @property + def style_names(self): ... + def copy_worksheet(self, from_worksheet): ... + def close(self) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/__init__.pyi b/stubs/openpyxl/openpyxl/worksheet/__init__.pyi new file mode 100644 index 000000000..e69de29bb diff --git a/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi b/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi new file mode 100644 index 000000000..1d3efedb9 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi @@ -0,0 +1,25 @@ +from typing import Any + +def read_dimension(source): ... + +class ReadOnlyWorksheet: + cell: Any + iter_rows: Any + values: Any + rows: Any + __getitem__: Any + __iter__: Any + parent: Any + title: Any + sheet_state: str + def __init__(self, parent_workbook, title, worksheet_path, shared_strings) -> None: ... + def calculate_dimension(self, force: bool = ...): ... + def reset_dimensions(self) -> None: ... + @property + def min_row(self): ... + @property + def max_row(self): ... + @property + def min_column(self): ... + @property + def max_column(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/_reader.pyi b/stubs/openpyxl/openpyxl/worksheet/_reader.pyi new file mode 100644 index 000000000..a12256d3c --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/_reader.pyi @@ -0,0 +1,88 @@ +from collections.abc import Generator +from typing import Any + +CELL_TAG: Any +VALUE_TAG: Any +FORMULA_TAG: Any +MERGE_TAG: Any +INLINE_STRING: Any +COL_TAG: Any +ROW_TAG: Any +CF_TAG: Any +LEGACY_TAG: Any +PROT_TAG: Any +EXT_TAG: Any +HYPERLINK_TAG: Any +TABLE_TAG: Any +PRINT_TAG: Any +MARGINS_TAG: Any +PAGE_TAG: Any +HEADER_TAG: Any +FILTER_TAG: Any +VALIDATION_TAG: Any +PROPERTIES_TAG: Any +VIEWS_TAG: Any +FORMAT_TAG: Any +ROW_BREAK_TAG: Any +COL_BREAK_TAG: Any +SCENARIOS_TAG: Any +DATA_TAG: Any +DIMENSION_TAG: Any +CUSTOM_VIEWS_TAG: Any + +class WorkSheetParser: + min_row: Any + epoch: Any + source: Any + shared_strings: Any + data_only: Any + shared_formulae: Any + array_formulae: Any + row_counter: int + tables: Any + date_formats: Any + timedelta_formats: Any + row_dimensions: Any + column_dimensions: Any + number_formats: Any + keep_vba: bool + hyperlinks: Any + formatting: Any + legacy_drawing: Any + merged_cells: Any + row_breaks: Any + col_breaks: Any + def __init__( + self, src, shared_strings, data_only: bool = ..., epoch=..., date_formats=..., timedelta_formats=... + ) -> None: ... + def parse(self) -> Generator[Any, None, None]: ... + def parse_dimensions(self): ... + col_counter: Any + def parse_cell(self, element): ... + def parse_formula(self, element): ... + def parse_column_dimensions(self, col) -> None: ... + def parse_row(self, row): ... + def parse_formatting(self, element) -> None: ... + protection: Any + def parse_sheet_protection(self, element) -> None: ... + def parse_extensions(self, element) -> None: ... + def parse_legacy(self, element) -> None: ... + def parse_row_breaks(self, element) -> None: ... + def parse_col_breaks(self, element) -> None: ... + def parse_custom_views(self, element) -> None: ... + +class WorksheetReader: + ws: Any + parser: Any + tables: Any + def __init__(self, ws, xml_source, shared_strings, data_only) -> None: ... + def bind_cells(self) -> None: ... + def bind_formatting(self) -> None: ... + def bind_tables(self) -> None: ... + def bind_merged_cells(self) -> None: ... + def bind_hyperlinks(self) -> None: ... + def normalize_merged_cell_link(self, coord): ... + def bind_col_dimensions(self) -> None: ... + def bind_row_dimensions(self) -> None: ... + def bind_properties(self) -> None: ... + def bind_all(self) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/_write_only.pyi b/stubs/openpyxl/openpyxl/worksheet/_write_only.pyi new file mode 100644 index 000000000..1107f015b --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/_write_only.pyi @@ -0,0 +1,21 @@ +from typing import Any + +from openpyxl.workbook.child import _WorkbookChild + +class WriteOnlyWorksheet(_WorkbookChild): + mime_type: Any + add_chart: Any + add_image: Any + add_table: Any + tables: Any + print_titles: Any + print_title_cols: Any + print_title_rows: Any + freeze_panes: Any + print_area: Any + sheet_view: Any + def __init__(self, parent, title) -> None: ... + @property + def closed(self): ... + def close(self) -> None: ... + def append(self, row) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/_writer.pyi b/stubs/openpyxl/openpyxl/worksheet/_writer.pyi new file mode 100644 index 000000000..0c41382c8 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/_writer.pyi @@ -0,0 +1,43 @@ +from collections.abc import Generator +from typing import Any + +ALL_TEMP_FILES: Any + +def create_temporary_file(suffix: str = ...): ... + +class WorksheetWriter: + ws: Any + out: Any + xf: Any + def __init__(self, ws, out: Any | None = ...) -> None: ... + def write_properties(self) -> None: ... + def write_dimensions(self) -> None: ... + def write_format(self) -> None: ... + def write_views(self) -> None: ... + def write_cols(self) -> None: ... + def write_top(self) -> None: ... + def rows(self): ... + def write_rows(self) -> None: ... + def write_row(self, xf, row, row_idx) -> None: ... + def write_protection(self) -> None: ... + def write_scenarios(self) -> None: ... + def write_filter(self) -> None: ... + def write_sort(self) -> None: ... + def write_merged_cells(self) -> None: ... + def write_formatting(self) -> None: ... + def write_validations(self) -> None: ... + def write_hyperlinks(self) -> None: ... + def write_print(self) -> None: ... + def write_margins(self) -> None: ... + def write_page(self) -> None: ... + def write_header(self) -> None: ... + def write_breaks(self) -> None: ... + def write_drawings(self) -> None: ... + def write_legacy(self) -> None: ... + def write_tables(self) -> None: ... + def get_stream(self) -> Generator[Any, Any, None]: ... + def write_tail(self) -> None: ... + def write(self) -> None: ... + def close(self) -> None: ... + def read(self): ... + def cleanup(self) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/cell_range.pyi b/stubs/openpyxl/openpyxl/worksheet/cell_range.pyi new file mode 100644 index 000000000..0074cfd5b --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/cell_range.pyi @@ -0,0 +1,73 @@ +from collections.abc import Generator +from typing import Any + +from openpyxl.descriptors import Strict +from openpyxl.descriptors.serialisable import Serialisable + +class CellRange(Serialisable): # type: ignore[misc] + min_col: Any + min_row: Any + max_col: Any + max_row: Any + title: Any + def __init__( + self, + range_string: Any | None = ..., + min_col: Any | None = ..., + min_row: Any | None = ..., + max_col: Any | None = ..., + max_row: Any | None = ..., + title: Any | None = ..., + ) -> None: ... + @property + def bounds(self): ... + @property + def coord(self): ... + @property + def rows(self) -> Generator[Any, None, None]: ... + @property + def cols(self) -> Generator[Any, None, None]: ... + @property + def cells(self): ... + def __copy__(self): ... + def shift(self, col_shift: int = ..., row_shift: int = ...) -> None: ... + def __ne__(self, other): ... + def __eq__(self, other): ... + def issubset(self, other): ... + __le__: Any + def __lt__(self, other): ... + def issuperset(self, other): ... + __ge__: Any + def __contains__(self, coord): ... + def __gt__(self, other): ... + def isdisjoint(self, other): ... + def intersection(self, other): ... + __and__: Any + def union(self, other): ... + __or__: Any + def __iter__(self): ... + def expand(self, right: int = ..., down: int = ..., left: int = ..., up: int = ...) -> None: ... + def shrink(self, right: int = ..., bottom: int = ..., left: int = ..., top: int = ...) -> None: ... + @property + def size(self): ... + @property + def top(self): ... + @property + def bottom(self): ... + @property + def left(self): ... + @property + def right(self): ... + +class MultiCellRange(Strict): + ranges: Any + def __init__(self, ranges=...) -> None: ... + def __contains__(self, coord): ... + def add(self, coord) -> None: ... + def __iadd__(self, coord): ... + def __eq__(self, other): ... + def __ne__(self, other): ... + def __bool__(self): ... + def remove(self, coord) -> None: ... + def __iter__(self): ... + def __copy__(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/cell_watch.pyi b/stubs/openpyxl/openpyxl/worksheet/cell_watch.pyi new file mode 100644 index 000000000..bddfaa2c4 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/cell_watch.pyi @@ -0,0 +1,14 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class CellWatch(Serialisable): + tagname: str + r: Any + def __init__(self, r: Any | None = ...) -> None: ... + +class CellWatches(Serialisable): + tagname: str + cellWatch: Any + __elements__: Any + def __init__(self, cellWatch=...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/controls.pyi b/stubs/openpyxl/openpyxl/worksheet/controls.pyi new file mode 100644 index 000000000..dac0a45f8 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/controls.pyi @@ -0,0 +1,55 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ControlProperty(Serialisable): + tagname: str + anchor: Any + locked: Any + defaultSize: Any + disabled: Any + recalcAlways: Any + uiObject: Any + autoFill: Any + autoLine: Any + autoPict: Any + macro: Any + altText: Any + linkedCell: Any + listFillRange: Any + cf: Any + id: Any + __elements__: Any + def __init__( + self, + anchor: Any | None = ..., + locked: bool = ..., + defaultSize: bool = ..., + _print: bool = ..., + disabled: bool = ..., + recalcAlways: bool = ..., + uiObject: bool = ..., + autoFill: bool = ..., + autoLine: bool = ..., + autoPict: bool = ..., + macro: Any | None = ..., + altText: Any | None = ..., + linkedCell: Any | None = ..., + listFillRange: Any | None = ..., + cf: str = ..., + id: Any | None = ..., + ) -> None: ... + +class Control(Serialisable): + tagname: str + controlPr: Any + shapeId: Any + name: Any + __elements__: Any + def __init__(self, controlPr: Any | None = ..., shapeId: Any | None = ..., name: Any | None = ...) -> None: ... + +class Controls(Serialisable): + tagname: str + control: Any + __elements__: Any + def __init__(self, control=...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/copier.pyi b/stubs/openpyxl/openpyxl/worksheet/copier.pyi new file mode 100644 index 000000000..728ea6309 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/copier.pyi @@ -0,0 +1,7 @@ +from typing import Any + +class WorksheetCopy: + source: Any + target: Any + def __init__(self, source_worksheet, target_worksheet) -> None: ... + def copy_worksheet(self) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/custom.pyi b/stubs/openpyxl/openpyxl/worksheet/custom.pyi new file mode 100644 index 000000000..2e7007cea --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/custom.pyi @@ -0,0 +1,14 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class CustomProperty(Serialisable): + tagname: str + name: Any + def __init__(self, name: Any | None = ...) -> None: ... + +class CustomProperties(Serialisable): + tagname: str + customPr: Any + __elements__: Any + def __init__(self, customPr=...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/datavalidation.pyi b/stubs/openpyxl/openpyxl/worksheet/datavalidation.pyi new file mode 100644 index 000000000..2250abae8 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/datavalidation.pyi @@ -0,0 +1,72 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +def collapse_cell_addresses(cells, input_ranges=...): ... +def expand_cell_ranges(range_string): ... + +class DataValidation(Serialisable): + tagname: str + sqref: Any + cells: Any + ranges: Any + showErrorMessage: Any + showDropDown: Any + hide_drop_down: Any + showInputMessage: Any + allowBlank: Any + allow_blank: Any + errorTitle: Any + error: Any + promptTitle: Any + prompt: Any + formula1: Any + formula2: Any + type: Any + errorStyle: Any + imeMode: Any + operator: Any + validation_type: Any + def __init__( + self, + type: Any | None = ..., + formula1: Any | None = ..., + formula2: Any | None = ..., + showErrorMessage: bool = ..., + showInputMessage: bool = ..., + showDropDown: Any | None = ..., + allowBlank: Any | None = ..., + sqref=..., + promptTitle: Any | None = ..., + errorStyle: Any | None = ..., + error: Any | None = ..., + prompt: Any | None = ..., + errorTitle: Any | None = ..., + imeMode: Any | None = ..., + operator: Any | None = ..., + allow_blank: Any | None = ..., + ) -> None: ... + def add(self, cell) -> None: ... + def __contains__(self, cell): ... + +class DataValidationList(Serialisable): + tagname: str + disablePrompts: Any + xWindow: Any + yWindow: Any + dataValidation: Any + __elements__: Any + __attrs__: Any + def __init__( + self, + disablePrompts: Any | None = ..., + xWindow: Any | None = ..., + yWindow: Any | None = ..., + count: Any | None = ..., + dataValidation=..., + ) -> None: ... + @property + def count(self): ... + def __len__(self): ... + def append(self, dv) -> None: ... + def to_tree(self, tagname: Any | None = ...): ... # type: ignore[override] diff --git a/stubs/openpyxl/openpyxl/worksheet/dimensions.pyi b/stubs/openpyxl/openpyxl/worksheet/dimensions.pyi new file mode 100644 index 000000000..72a8343c7 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/dimensions.pyi @@ -0,0 +1,123 @@ +from typing import Any + +from openpyxl.descriptors import Strict +from openpyxl.descriptors.serialisable import Serialisable +from openpyxl.styles.styleable import StyleableObject +from openpyxl.utils.bound_dictionary import BoundDictionary + +class Dimension(Strict, StyleableObject): + __fields__: Any + index: Any + hidden: Any + outlineLevel: Any + outline_level: Any + collapsed: Any + style: Any + def __init__( + self, index, hidden, outlineLevel, collapsed, worksheet, visible: bool = ..., style: Any | None = ... + ) -> None: ... + def __iter__(self): ... + def __copy__(self): ... + +class RowDimension(Dimension): + __fields__: Any + r: Any + s: Any + ht: Any + height: Any + thickBot: Any + thickTop: Any + def __init__( + self, + worksheet, + index: int = ..., + ht: Any | None = ..., + customHeight: Any | None = ..., + s: Any | None = ..., + customFormat: Any | None = ..., + hidden: bool = ..., + outlineLevel: int = ..., + outline_level: Any | None = ..., + collapsed: bool = ..., + visible: Any | None = ..., + height: Any | None = ..., + r: Any | None = ..., + spans: Any | None = ..., + thickBot: Any | None = ..., + thickTop: Any | None = ..., + **kw, + ) -> None: ... + @property + def customFormat(self): ... + @property + def customHeight(self): ... + +class ColumnDimension(Dimension): + width: Any + bestFit: Any + auto_size: Any + index: Any + min: Any + max: Any + collapsed: Any + __fields__: Any + def __init__( + self, + worksheet, + index: str = ..., + width=..., + bestFit: bool = ..., + hidden: bool = ..., + outlineLevel: int = ..., + outline_level: Any | None = ..., + collapsed: bool = ..., + style: Any | None = ..., + min: Any | None = ..., + max: Any | None = ..., + customWidth: bool = ..., + visible: Any | None = ..., + auto_size: Any | None = ..., + ) -> None: ... + @property + def customWidth(self): ... + def reindex(self) -> None: ... + def to_tree(self): ... + +class DimensionHolder(BoundDictionary): + worksheet: Any + max_outline: Any + default_factory: Any + def __init__(self, worksheet, reference: str = ..., default_factory: Any | None = ...) -> None: ... + def group(self, start, end: Any | None = ..., outline_level: int = ..., hidden: bool = ...) -> None: ... + def to_tree(self): ... + +class SheetFormatProperties(Serialisable): + tagname: str + baseColWidth: Any + defaultColWidth: Any + defaultRowHeight: Any + customHeight: Any + zeroHeight: Any + thickTop: Any + thickBottom: Any + outlineLevelRow: Any + outlineLevelCol: Any + def __init__( + self, + baseColWidth: int = ..., + defaultColWidth: Any | None = ..., + defaultRowHeight: int = ..., + customHeight: Any | None = ..., + zeroHeight: Any | None = ..., + thickTop: Any | None = ..., + thickBottom: Any | None = ..., + outlineLevelRow: Any | None = ..., + outlineLevelCol: Any | None = ..., + ) -> None: ... + +class SheetDimension(Serialisable): + tagname: str + ref: Any + def __init__(self, ref: Any | None = ...) -> None: ... + @property + def boundaries(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/drawing.pyi b/stubs/openpyxl/openpyxl/worksheet/drawing.pyi new file mode 100644 index 000000000..4974b43ff --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/drawing.pyi @@ -0,0 +1,8 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Drawing(Serialisable): + tagname: str + id: Any + def __init__(self, id: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/errors.pyi b/stubs/openpyxl/openpyxl/worksheet/errors.pyi new file mode 100644 index 000000000..0403543ec --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/errors.pyi @@ -0,0 +1,47 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Extension(Serialisable): + tagname: str + uri: Any + def __init__(self, uri: Any | None = ...) -> None: ... + +class ExtensionList(Serialisable): + tagname: str + ext: Any + __elements__: Any + def __init__(self, ext=...) -> None: ... + +class IgnoredError(Serialisable): + tagname: str + sqref: Any + evalError: Any + twoDigitTextYear: Any + numberStoredAsText: Any + formula: Any + formulaRange: Any + unlockedFormula: Any + emptyCellReference: Any + listDataValidation: Any + calculatedColumn: Any + def __init__( + self, + sqref: Any | None = ..., + evalError: bool = ..., + twoDigitTextYear: bool = ..., + numberStoredAsText: bool = ..., + formula: bool = ..., + formulaRange: bool = ..., + unlockedFormula: bool = ..., + emptyCellReference: bool = ..., + listDataValidation: bool = ..., + calculatedColumn: bool = ..., + ) -> None: ... + +class IgnoredErrors(Serialisable): + tagname: str + ignoredError: Any + extLst: Any + __elements__: Any + def __init__(self, ignoredError=..., extLst: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/filters.pyi b/stubs/openpyxl/openpyxl/worksheet/filters.pyi new file mode 100644 index 000000000..77a45c178 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/filters.pyi @@ -0,0 +1,166 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class SortCondition(Serialisable): + tagname: str + descending: Any + sortBy: Any + ref: Any + customList: Any + dxfId: Any + iconSet: Any + iconId: Any + def __init__( + self, + ref: Any | None = ..., + descending: Any | None = ..., + sortBy: Any | None = ..., + customList: Any | None = ..., + dxfId: Any | None = ..., + iconSet: Any | None = ..., + iconId: Any | None = ..., + ) -> None: ... + +class SortState(Serialisable): + tagname: str + columnSort: Any + caseSensitive: Any + sortMethod: Any + ref: Any + sortCondition: Any + extLst: Any + __elements__: Any + def __init__( + self, + columnSort: Any | None = ..., + caseSensitive: Any | None = ..., + sortMethod: Any | None = ..., + ref: Any | None = ..., + sortCondition=..., + extLst: Any | None = ..., + ) -> None: ... + def __bool__(self): ... + +class IconFilter(Serialisable): + tagname: str + iconSet: Any + iconId: Any + def __init__(self, iconSet: Any | None = ..., iconId: Any | None = ...) -> None: ... + +class ColorFilter(Serialisable): + tagname: str + dxfId: Any + cellColor: Any + def __init__(self, dxfId: Any | None = ..., cellColor: Any | None = ...) -> None: ... + +class DynamicFilter(Serialisable): + tagname: str + type: Any + val: Any + valIso: Any + maxVal: Any + maxValIso: Any + def __init__( + self, + type: Any | None = ..., + val: Any | None = ..., + valIso: Any | None = ..., + maxVal: Any | None = ..., + maxValIso: Any | None = ..., + ) -> None: ... + +class CustomFilter(Serialisable): + tagname: str + operator: Any + val: Any + def __init__(self, operator: Any | None = ..., val: Any | None = ...) -> None: ... + +class CustomFilters(Serialisable): + tagname: str + customFilter: Any + __elements__: Any + def __init__(self, _and: Any | None = ..., customFilter=...) -> None: ... + +class Top10(Serialisable): + tagname: str + top: Any + percent: Any + val: Any + filterVal: Any + def __init__( + self, top: Any | None = ..., percent: Any | None = ..., val: Any | None = ..., filterVal: Any | None = ... + ) -> None: ... + +class DateGroupItem(Serialisable): + tagname: str + year: Any + month: Any + day: Any + hour: Any + minute: Any + second: Any + dateTimeGrouping: Any + def __init__( + self, + year: Any | None = ..., + month: Any | None = ..., + day: Any | None = ..., + hour: Any | None = ..., + minute: Any | None = ..., + second: Any | None = ..., + dateTimeGrouping: Any | None = ..., + ) -> None: ... + +class Filters(Serialisable): + tagname: str + blank: Any + calendarType: Any + filter: Any + dateGroupItem: Any + __elements__: Any + def __init__(self, blank: Any | None = ..., calendarType: Any | None = ..., filter=..., dateGroupItem=...) -> None: ... + +class FilterColumn(Serialisable): + tagname: str + colId: Any + col_id: Any + hiddenButton: Any + showButton: Any + filters: Any + top10: Any + customFilters: Any + dynamicFilter: Any + colorFilter: Any + iconFilter: Any + extLst: Any + __elements__: Any + def __init__( + self, + colId: Any | None = ..., + hiddenButton: Any | None = ..., + showButton: Any | None = ..., + filters: Any | None = ..., + top10: Any | None = ..., + customFilters: Any | None = ..., + dynamicFilter: Any | None = ..., + colorFilter: Any | None = ..., + iconFilter: Any | None = ..., + extLst: Any | None = ..., + blank: Any | None = ..., + vals: Any | None = ..., + ) -> None: ... + +class AutoFilter(Serialisable): + tagname: str + ref: Any + filterColumn: Any + sortState: Any + extLst: Any + __elements__: Any + def __init__( + self, ref: Any | None = ..., filterColumn=..., sortState: Any | None = ..., extLst: Any | None = ... + ) -> None: ... + def __bool__(self): ... + def add_filter_column(self, col_id, vals, blank: bool = ...) -> None: ... + def add_sort_condition(self, ref, descending: bool = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/header_footer.pyi b/stubs/openpyxl/openpyxl/worksheet/header_footer.pyi new file mode 100644 index 000000000..3f09bbdf8 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/header_footer.pyi @@ -0,0 +1,61 @@ +from typing import Any + +from openpyxl.descriptors import Strict +from openpyxl.descriptors.serialisable import Serialisable + +FONT_PATTERN: str +COLOR_PATTERN: str +SIZE_REGEX: str +FORMAT_REGEX: Any + +class _HeaderFooterPart(Strict): + text: Any + font: Any + size: Any + RGB: str + color: Any + def __init__( + self, text: Any | None = ..., font: Any | None = ..., size: Any | None = ..., color: Any | None = ... + ) -> None: ... + def __bool__(self): ... + @classmethod + def from_str(cls, text): ... + +class HeaderFooterItem(Strict): + left: Any + center: Any + centre: Any + right: Any + def __init__(self, left: Any | None = ..., right: Any | None = ..., center: Any | None = ...) -> None: ... + def __bool__(self): ... + def to_tree(self, tagname): ... + @classmethod + def from_tree(cls, node): ... + +class HeaderFooter(Serialisable): + tagname: str + differentOddEven: Any + differentFirst: Any + scaleWithDoc: Any + alignWithMargins: Any + oddHeader: Any + oddFooter: Any + evenHeader: Any + evenFooter: Any + firstHeader: Any + firstFooter: Any + __elements__: Any + def __init__( + self, + differentOddEven: Any | None = ..., + differentFirst: Any | None = ..., + scaleWithDoc: Any | None = ..., + alignWithMargins: Any | None = ..., + oddHeader: Any | None = ..., + oddFooter: Any | None = ..., + evenHeader: Any | None = ..., + evenFooter: Any | None = ..., + firstHeader: Any | None = ..., + firstFooter: Any | None = ..., + ) -> None: ... + def __bool__(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/hyperlink.pyi b/stubs/openpyxl/openpyxl/worksheet/hyperlink.pyi new file mode 100644 index 000000000..3ec7b5b05 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/hyperlink.pyi @@ -0,0 +1,30 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Hyperlink(Serialisable): + tagname: str + ref: Any + location: Any + tooltip: Any + display: Any + id: Any + target: Any + __attrs__: Any + def __init__( + self, + ref: Any | None = ..., + location: Any | None = ..., + tooltip: Any | None = ..., + display: Any | None = ..., + id: Any | None = ..., + target: Any | None = ..., + ) -> None: ... + +class HyperlinkList(Serialisable): + tagname: str + hyperlink: Any + def __init__(self, hyperlink=...) -> None: ... + def __bool__(self): ... + def __len__(self): ... + def append(self, value) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/merge.pyi b/stubs/openpyxl/openpyxl/worksheet/merge.pyi new file mode 100644 index 000000000..b52975cca --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/merge.pyi @@ -0,0 +1,31 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +from .cell_range import CellRange + +class MergeCell(CellRange): + tagname: str + ref: Any + __attrs__: Any + def __init__(self, ref: Any | None = ...) -> None: ... + def __copy__(self): ... + +class MergeCells(Serialisable): + tagname: str + # Overwritten by property below + # count: Integer + mergeCell: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., mergeCell=...) -> None: ... + @property + def count(self): ... + +class MergedCellRange(CellRange): + ws: Any + start_cell: Any + def __init__(self, worksheet, coord) -> None: ... + def format(self) -> None: ... + def __contains__(self, coord): ... + def __copy__(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/ole.pyi b/stubs/openpyxl/openpyxl/worksheet/ole.pyi new file mode 100644 index 000000000..04270d802 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/ole.pyi @@ -0,0 +1,75 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class ObjectAnchor(Serialisable): + tagname: str + to: Any + moveWithCells: Any + sizeWithCells: Any + z_order: Any + def __init__( + self, + _from: Any | None = ..., + to: Any | None = ..., + moveWithCells: bool = ..., + sizeWithCells: bool = ..., + z_order: Any | None = ..., + ) -> None: ... + +class ObjectPr(Serialisable): + tagname: str + anchor: Any + locked: Any + defaultSize: Any + disabled: Any + uiObject: Any + autoFill: Any + autoLine: Any + autoPict: Any + macro: Any + altText: Any + dde: Any + __elements__: Any + def __init__( + self, + anchor: Any | None = ..., + locked: bool = ..., + defaultSize: bool = ..., + _print: bool = ..., + disabled: bool = ..., + uiObject: bool = ..., + autoFill: bool = ..., + autoLine: bool = ..., + autoPict: bool = ..., + macro: Any | None = ..., + altText: Any | None = ..., + dde: bool = ..., + ) -> None: ... + +class OleObject(Serialisable): + tagname: str + objectPr: Any + progId: Any + dvAspect: Any + link: Any + oleUpdate: Any + autoLoad: Any + shapeId: Any + __elements__: Any + def __init__( + self, + objectPr: Any | None = ..., + progId: Any | None = ..., + dvAspect: str = ..., + link: Any | None = ..., + oleUpdate: Any | None = ..., + autoLoad: bool = ..., + shapeId: Any | None = ..., + ) -> None: ... + +class OleObjects(Serialisable): + tagname: str + oleObject: Any + __elements__: Any + def __init__(self, oleObject=...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/page.pyi b/stubs/openpyxl/openpyxl/worksheet/page.pyi new file mode 100644 index 000000000..19b0f0a95 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/page.pyi @@ -0,0 +1,90 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class PrintPageSetup(Serialisable): + tagname: str + orientation: Any + paperSize: Any + scale: Any + fitToHeight: Any + fitToWidth: Any + firstPageNumber: Any + useFirstPageNumber: Any + paperHeight: Any + paperWidth: Any + pageOrder: Any + usePrinterDefaults: Any + blackAndWhite: Any + draft: Any + cellComments: Any + errors: Any + horizontalDpi: Any + verticalDpi: Any + copies: Any + id: Any + def __init__( + self, + worksheet: Any | None = ..., + orientation: Any | None = ..., + paperSize: Any | None = ..., + scale: Any | None = ..., + fitToHeight: Any | None = ..., + fitToWidth: Any | None = ..., + firstPageNumber: Any | None = ..., + useFirstPageNumber: Any | None = ..., + paperHeight: Any | None = ..., + paperWidth: Any | None = ..., + pageOrder: Any | None = ..., + usePrinterDefaults: Any | None = ..., + blackAndWhite: Any | None = ..., + draft: Any | None = ..., + cellComments: Any | None = ..., + errors: Any | None = ..., + horizontalDpi: Any | None = ..., + verticalDpi: Any | None = ..., + copies: Any | None = ..., + id: Any | None = ..., + ) -> None: ... + def __bool__(self): ... + @property + def sheet_properties(self): ... + @property + def fitToPage(self): ... + @fitToPage.setter + def fitToPage(self, value) -> None: ... + @property + def autoPageBreaks(self): ... + @autoPageBreaks.setter + def autoPageBreaks(self, value) -> None: ... + @classmethod + def from_tree(cls, node): ... + +class PrintOptions(Serialisable): + tagname: str + horizontalCentered: Any + verticalCentered: Any + headings: Any + gridLines: Any + gridLinesSet: Any + def __init__( + self, + horizontalCentered: Any | None = ..., + verticalCentered: Any | None = ..., + headings: Any | None = ..., + gridLines: Any | None = ..., + gridLinesSet: Any | None = ..., + ) -> None: ... + def __bool__(self): ... + +class PageMargins(Serialisable): + tagname: str + left: Any + right: Any + top: Any + bottom: Any + header: Any + footer: Any + def __init__( + self, left: float = ..., right: float = ..., top: int = ..., bottom: int = ..., header: float = ..., footer: float = ... + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/pagebreak.pyi b/stubs/openpyxl/openpyxl/worksheet/pagebreak.pyi new file mode 100644 index 000000000..067230c11 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/pagebreak.pyi @@ -0,0 +1,38 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Break(Serialisable): + tagname: str + id: Any + min: Any + max: Any + man: Any + pt: Any + def __init__(self, id: int = ..., min: int = ..., max: int = ..., man: bool = ..., pt: Any | None = ...) -> None: ... + +class RowBreak(Serialisable): + tagname: str + # Overwritten by properties below + # count: Integer + # manualBreakCount: Integer + brk: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., manualBreakCount: Any | None = ..., brk=...) -> None: ... + def __bool__(self): ... + def __len__(self): ... + @property + def count(self): ... + @property + def manualBreakCount(self): ... + def append(self, brk: Any | None = ...) -> None: ... + +PageBreak = RowBreak + +class ColBreak(RowBreak): + tagname: str + count: Any + manualBreakCount: Any + brk: Any + __attrs__: Any diff --git a/stubs/openpyxl/openpyxl/worksheet/picture.pyi b/stubs/openpyxl/openpyxl/worksheet/picture.pyi new file mode 100644 index 000000000..71b3f1340 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/picture.pyi @@ -0,0 +1,4 @@ +from openpyxl.descriptors.serialisable import Serialisable + +class SheetBackgroundPicture(Serialisable): + tagname: str diff --git a/stubs/openpyxl/openpyxl/worksheet/properties.pyi b/stubs/openpyxl/openpyxl/worksheet/properties.pyi new file mode 100644 index 000000000..1b9f0a50a --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/properties.pyi @@ -0,0 +1,54 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Outline(Serialisable): + tagname: str + applyStyles: Any + summaryBelow: Any + summaryRight: Any + showOutlineSymbols: Any + def __init__( + self, + applyStyles: Any | None = ..., + summaryBelow: Any | None = ..., + summaryRight: Any | None = ..., + showOutlineSymbols: Any | None = ..., + ) -> None: ... + +class PageSetupProperties(Serialisable): + tagname: str + autoPageBreaks: Any + fitToPage: Any + def __init__(self, autoPageBreaks: Any | None = ..., fitToPage: Any | None = ...) -> None: ... + +class WorksheetProperties(Serialisable): + tagname: str + codeName: Any + enableFormatConditionsCalculation: Any + filterMode: Any + published: Any + syncHorizontal: Any + syncRef: Any + syncVertical: Any + transitionEvaluation: Any + transitionEntry: Any + tabColor: Any + outlinePr: Any + pageSetUpPr: Any + __elements__: Any + def __init__( + self, + codeName: Any | None = ..., + enableFormatConditionsCalculation: Any | None = ..., + filterMode: Any | None = ..., + published: Any | None = ..., + syncHorizontal: Any | None = ..., + syncRef: Any | None = ..., + syncVertical: Any | None = ..., + transitionEvaluation: Any | None = ..., + transitionEntry: Any | None = ..., + tabColor: Any | None = ..., + outlinePr: Any | None = ..., + pageSetUpPr: Any | None = ..., + ) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/protection.pyi b/stubs/openpyxl/openpyxl/worksheet/protection.pyi new file mode 100644 index 000000000..e1646297f --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/protection.pyi @@ -0,0 +1,64 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class _Protected: + def set_password(self, value: str = ..., already_hashed: bool = ...) -> None: ... + @property + def password(self): ... + @password.setter + def password(self, value) -> None: ... + +class SheetProtection(Serialisable, _Protected): + tagname: str + sheet: Any + enabled: Any + objects: Any + scenarios: Any + formatCells: Any + formatColumns: Any + formatRows: Any + insertColumns: Any + insertRows: Any + insertHyperlinks: Any + deleteColumns: Any + deleteRows: Any + selectLockedCells: Any + selectUnlockedCells: Any + sort: Any + autoFilter: Any + pivotTables: Any + saltValue: Any + spinCount: Any + algorithmName: Any + hashValue: Any + __attrs__: Any + password: Any + def __init__( + self, + sheet: bool = ..., + objects: bool = ..., + scenarios: bool = ..., + formatCells: bool = ..., + formatRows: bool = ..., + formatColumns: bool = ..., + insertColumns: bool = ..., + insertRows: bool = ..., + insertHyperlinks: bool = ..., + deleteColumns: bool = ..., + deleteRows: bool = ..., + selectLockedCells: bool = ..., + selectUnlockedCells: bool = ..., + sort: bool = ..., + autoFilter: bool = ..., + pivotTables: bool = ..., + password: Any | None = ..., + algorithmName: Any | None = ..., + saltValue: Any | None = ..., + spinCount: Any | None = ..., + hashValue: Any | None = ..., + ) -> None: ... + def set_password(self, value: str = ..., already_hashed: bool = ...) -> None: ... + def enable(self) -> None: ... + def disable(self) -> None: ... + def __bool__(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/related.pyi b/stubs/openpyxl/openpyxl/worksheet/related.pyi new file mode 100644 index 000000000..c0926c68c --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/related.pyi @@ -0,0 +1,8 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Related(Serialisable): # type: ignore[misc] + id: Any + def __init__(self, id: Any | None = ...) -> None: ... + def to_tree(self, tagname, idx: Any | None = ...): ... # type: ignore[override] diff --git a/stubs/openpyxl/openpyxl/worksheet/scenario.pyi b/stubs/openpyxl/openpyxl/worksheet/scenario.pyi new file mode 100644 index 000000000..83286c1a3 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/scenario.pyi @@ -0,0 +1,48 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class InputCells(Serialisable): + tagname: str + r: Any + deleted: Any + undone: Any + val: Any + numFmtId: Any + def __init__( + self, r: Any | None = ..., deleted: bool = ..., undone: bool = ..., val: Any | None = ..., numFmtId: Any | None = ... + ) -> None: ... + +class Scenario(Serialisable): + tagname: str + inputCells: Any + name: Any + locked: Any + hidden: Any + user: Any + comment: Any + __elements__: Any + __attrs__: Any + def __init__( + self, + inputCells=..., + name: Any | None = ..., + locked: bool = ..., + hidden: bool = ..., + count: Any | None = ..., + user: Any | None = ..., + comment: Any | None = ..., + ) -> None: ... + @property + def count(self): ... + +class ScenarioList(Serialisable): + tagname: str + scenario: Any + current: Any + show: Any + sqref: Any + __elements__: Any + def __init__(self, scenario=..., current: Any | None = ..., show: Any | None = ..., sqref: Any | None = ...) -> None: ... + def append(self, scenario) -> None: ... + def __bool__(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/smart_tag.pyi b/stubs/openpyxl/openpyxl/worksheet/smart_tag.pyi new file mode 100644 index 000000000..386ff51c2 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/smart_tag.pyi @@ -0,0 +1,31 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class CellSmartTagPr(Serialisable): + tagname: str + key: Any + val: Any + def __init__(self, key: Any | None = ..., val: Any | None = ...) -> None: ... + +class CellSmartTag(Serialisable): + tagname: str + cellSmartTagPr: Any + type: Any + deleted: Any + xmlBased: Any + __elements__: Any + def __init__(self, cellSmartTagPr=..., type: Any | None = ..., deleted: bool = ..., xmlBased: bool = ...) -> None: ... + +class CellSmartTags(Serialisable): + tagname: str + cellSmartTag: Any + r: Any + __elements__: Any + def __init__(self, cellSmartTag=..., r: Any | None = ...) -> None: ... + +class SmartTags(Serialisable): + tagname: str + cellSmartTags: Any + __elements__: Any + def __init__(self, cellSmartTags=...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/table.pyi b/stubs/openpyxl/openpyxl/worksheet/table.pyi new file mode 100644 index 000000000..ce808f18a --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/table.pyi @@ -0,0 +1,177 @@ +from typing import Any + +from openpyxl.descriptors import String +from openpyxl.descriptors.serialisable import Serialisable + +TABLESTYLES: Any +PIVOTSTYLES: Any + +class TableStyleInfo(Serialisable): + tagname: str + name: Any + showFirstColumn: Any + showLastColumn: Any + showRowStripes: Any + showColumnStripes: Any + def __init__( + self, + name: Any | None = ..., + showFirstColumn: Any | None = ..., + showLastColumn: Any | None = ..., + showRowStripes: Any | None = ..., + showColumnStripes: Any | None = ..., + ) -> None: ... + +class XMLColumnProps(Serialisable): + tagname: str + mapId: Any + xpath: Any + denormalized: Any + xmlDataType: Any + extLst: Any + __elements__: Any + def __init__( + self, + mapId: Any | None = ..., + xpath: Any | None = ..., + denormalized: Any | None = ..., + xmlDataType: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + +class TableFormula(Serialisable): + tagname: str + array: Any + attr_text: Any + text: Any + def __init__(self, array: Any | None = ..., attr_text: Any | None = ...) -> None: ... + +class TableColumn(Serialisable): + tagname: str + id: Any + uniqueName: Any + name: Any + totalsRowFunction: Any + totalsRowLabel: Any + queryTableFieldId: Any + headerRowDxfId: Any + dataDxfId: Any + totalsRowDxfId: Any + headerRowCellStyle: Any + dataCellStyle: Any + totalsRowCellStyle: Any + calculatedColumnFormula: Any + totalsRowFormula: Any + xmlColumnPr: Any + extLst: Any + __elements__: Any + def __init__( + self, + id: Any | None = ..., + uniqueName: Any | None = ..., + name: Any | None = ..., + totalsRowFunction: Any | None = ..., + totalsRowLabel: Any | None = ..., + queryTableFieldId: Any | None = ..., + headerRowDxfId: Any | None = ..., + dataDxfId: Any | None = ..., + totalsRowDxfId: Any | None = ..., + headerRowCellStyle: Any | None = ..., + dataCellStyle: Any | None = ..., + totalsRowCellStyle: Any | None = ..., + calculatedColumnFormula: Any | None = ..., + totalsRowFormula: Any | None = ..., + xmlColumnPr: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + def __iter__(self): ... + @classmethod + def from_tree(cls, node): ... + +class TableNameDescriptor(String): + def __set__(self, instance, value) -> None: ... + +class Table(Serialisable): + mime_type: str + tagname: str + id: Any + name: Any + displayName: Any + comment: Any + ref: Any + tableType: Any + headerRowCount: Any + insertRow: Any + insertRowShift: Any + totalsRowCount: Any + totalsRowShown: Any + published: Any + headerRowDxfId: Any + dataDxfId: Any + totalsRowDxfId: Any + headerRowBorderDxfId: Any + tableBorderDxfId: Any + totalsRowBorderDxfId: Any + headerRowCellStyle: Any + dataCellStyle: Any + totalsRowCellStyle: Any + connectionId: Any + autoFilter: Any + sortState: Any + tableColumns: Any + tableStyleInfo: Any + extLst: Any + __elements__: Any + def __init__( + self, + id: int = ..., + displayName: Any | None = ..., + ref: Any | None = ..., + name: Any | None = ..., + comment: Any | None = ..., + tableType: Any | None = ..., + headerRowCount: int = ..., + insertRow: Any | None = ..., + insertRowShift: Any | None = ..., + totalsRowCount: Any | None = ..., + totalsRowShown: Any | None = ..., + published: Any | None = ..., + headerRowDxfId: Any | None = ..., + dataDxfId: Any | None = ..., + totalsRowDxfId: Any | None = ..., + headerRowBorderDxfId: Any | None = ..., + tableBorderDxfId: Any | None = ..., + totalsRowBorderDxfId: Any | None = ..., + headerRowCellStyle: Any | None = ..., + dataCellStyle: Any | None = ..., + totalsRowCellStyle: Any | None = ..., + connectionId: Any | None = ..., + autoFilter: Any | None = ..., + sortState: Any | None = ..., + tableColumns=..., + tableStyleInfo: Any | None = ..., + extLst: Any | None = ..., + ) -> None: ... + def to_tree(self): ... + @property + def path(self): ... + @property + def column_names(self): ... + +class TablePartList(Serialisable): + tagname: str + # Overwritten by property below + # count: Integer + tablePart: Any + __elements__: Any + __attrs__: Any + def __init__(self, count: Any | None = ..., tablePart=...) -> None: ... + def append(self, part) -> None: ... + @property + def count(self): ... + def __bool__(self): ... + +class TableList(dict[Any, Any]): + def add(self, table) -> None: ... + def get(self, name: Any | None = ..., table_range: Any | None = ...): ... + def items(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/views.pyi b/stubs/openpyxl/openpyxl/worksheet/views.pyi new file mode 100644 index 000000000..a4234e431 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/views.pyi @@ -0,0 +1,84 @@ +from typing import Any + +from openpyxl.descriptors.serialisable import Serialisable + +class Pane(Serialisable): # type: ignore[misc] + xSplit: Any + ySplit: Any + topLeftCell: Any + activePane: Any + state: Any + def __init__( + self, + xSplit: Any | None = ..., + ySplit: Any | None = ..., + topLeftCell: Any | None = ..., + activePane: str = ..., + state: str = ..., + ) -> None: ... + +class Selection(Serialisable): # type: ignore[misc] + pane: Any + activeCell: Any + activeCellId: Any + sqref: Any + def __init__( + self, pane: Any | None = ..., activeCell: str = ..., activeCellId: Any | None = ..., sqref: str = ... + ) -> None: ... + +class SheetView(Serialisable): + tagname: str + windowProtection: Any + showFormulas: Any + showGridLines: Any + showRowColHeaders: Any + showZeros: Any + rightToLeft: Any + tabSelected: Any + showRuler: Any + showOutlineSymbols: Any + defaultGridColor: Any + showWhiteSpace: Any + view: Any + topLeftCell: Any + colorId: Any + zoomScale: Any + zoomScaleNormal: Any + zoomScaleSheetLayoutView: Any + zoomScalePageLayoutView: Any + zoomToFit: Any + workbookViewId: Any + selection: Any + pane: Any + def __init__( + self, + windowProtection: Any | None = ..., + showFormulas: Any | None = ..., + showGridLines: Any | None = ..., + showRowColHeaders: Any | None = ..., + showZeros: Any | None = ..., + rightToLeft: Any | None = ..., + tabSelected: Any | None = ..., + showRuler: Any | None = ..., + showOutlineSymbols: Any | None = ..., + defaultGridColor: Any | None = ..., + showWhiteSpace: Any | None = ..., + view: Any | None = ..., + topLeftCell: Any | None = ..., + colorId: Any | None = ..., + zoomScale: Any | None = ..., + zoomScaleNormal: Any | None = ..., + zoomScaleSheetLayoutView: Any | None = ..., + zoomScalePageLayoutView: Any | None = ..., + zoomToFit: Any | None = ..., + workbookViewId: int = ..., + selection: Any | None = ..., + pane: Any | None = ..., + ) -> None: ... + +class SheetViewList(Serialisable): + tagname: str + sheetView: Any + extLst: Any + __elements__: Any + def __init__(self, sheetView: Any | None = ..., extLst: Any | None = ...) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi b/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi new file mode 100644 index 000000000..615fd2ad3 --- /dev/null +++ b/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi @@ -0,0 +1,129 @@ +from collections.abc import Generator +from typing import Any + +from openpyxl.workbook.child import _WorkbookChild + +class Worksheet(_WorkbookChild): + mime_type: str + BREAK_NONE: int + BREAK_ROW: int + BREAK_COLUMN: int + SHEETSTATE_VISIBLE: str + SHEETSTATE_HIDDEN: str + SHEETSTATE_VERYHIDDEN: str + PAPERSIZE_LETTER: str + PAPERSIZE_LETTER_SMALL: str + PAPERSIZE_TABLOID: str + PAPERSIZE_LEDGER: str + PAPERSIZE_LEGAL: str + PAPERSIZE_STATEMENT: str + PAPERSIZE_EXECUTIVE: str + PAPERSIZE_A3: str + PAPERSIZE_A4: str + PAPERSIZE_A4_SMALL: str + PAPERSIZE_A5: str + ORIENTATION_PORTRAIT: str + ORIENTATION_LANDSCAPE: str + def __init__(self, parent, title: Any | None = ...) -> None: ... + @property + def sheet_view(self): ... + @property + def selected_cell(self): ... + @property + def active_cell(self): ... + @property + def page_breaks(self): ... + @property + def show_gridlines(self): ... + @property + def show_summary_below(self): ... + @property + def show_summary_right(self): ... + @property + def freeze_panes(self): ... + @freeze_panes.setter + def freeze_panes(self, topLeftCell: Any | None = ...) -> None: ... + def cell(self, row, column, value: Any | None = ...): ... + def __getitem__(self, key): ... + def __setitem__(self, key, value) -> None: ... + def __iter__(self): ... + def __delitem__(self, key) -> None: ... + @property + def min_row(self): ... + @property + def max_row(self): ... + @property + def min_column(self): ... + @property + def max_column(self): ... + def calculate_dimension(self): ... + @property + def dimensions(self): ... + def iter_rows( + self, + min_row: Any | None = ..., + max_row: Any | None = ..., + min_col: Any | None = ..., + max_col: Any | None = ..., + values_only: bool = ..., + ): ... + @property + def rows(self): ... + @property + def values(self) -> Generator[Any, None, None]: ... + def iter_cols( + self, + min_col: Any | None = ..., + max_col: Any | None = ..., + min_row: Any | None = ..., + max_row: Any | None = ..., + values_only: bool = ..., + ): ... + @property + def columns(self): ... + def set_printer_settings(self, paper_size, orientation) -> None: ... + def add_data_validation(self, data_validation) -> None: ... + def add_chart(self, chart, anchor: Any | None = ...) -> None: ... + def add_image(self, img, anchor: Any | None = ...) -> None: ... + def add_table(self, table) -> None: ... + @property + def tables(self): ... + def add_pivot(self, pivot) -> None: ... + def merge_cells( + self, + range_string: Any | None = ..., + start_row: Any | None = ..., + start_column: Any | None = ..., + end_row: Any | None = ..., + end_column: Any | None = ..., + ) -> None: ... + @property + def merged_cell_ranges(self): ... + def unmerge_cells( + self, + range_string: Any | None = ..., + start_row: Any | None = ..., + start_column: Any | None = ..., + end_row: Any | None = ..., + end_column: Any | None = ..., + ) -> None: ... + def append(self, iterable) -> None: ... + def insert_rows(self, idx, amount: int = ...) -> None: ... + def insert_cols(self, idx, amount: int = ...) -> None: ... + def delete_rows(self, idx, amount: int = ...) -> None: ... + def delete_cols(self, idx, amount: int = ...) -> None: ... + def move_range(self, cell_range, rows: int = ..., cols: int = ..., translate: bool = ...) -> None: ... + @property + def print_title_rows(self): ... + @print_title_rows.setter + def print_title_rows(self, rows) -> None: ... + @property + def print_title_cols(self): ... + @print_title_cols.setter + def print_title_cols(self, cols) -> None: ... + @property + def print_titles(self): ... + @property + def print_area(self): ... + @print_area.setter + def print_area(self, value) -> None: ... diff --git a/stubs/openpyxl/openpyxl/writer/__init__.pyi b/stubs/openpyxl/openpyxl/writer/__init__.pyi new file mode 100644 index 000000000..e69de29bb diff --git a/stubs/openpyxl/openpyxl/writer/excel.pyi b/stubs/openpyxl/openpyxl/writer/excel.pyi new file mode 100644 index 000000000..57e9d2ac1 --- /dev/null +++ b/stubs/openpyxl/openpyxl/writer/excel.pyi @@ -0,0 +1,13 @@ +from typing import Any + +class ExcelWriter: + workbook: Any + manifest: Any + vba_modified: Any + def __init__(self, workbook, archive) -> None: ... + def write_data(self) -> None: ... + def write_worksheet(self, ws) -> None: ... + def save(self) -> None: ... + +def save_workbook(workbook, filename): ... +def save_virtual_workbook(workbook): ... diff --git a/stubs/openpyxl/openpyxl/writer/theme.pyi b/stubs/openpyxl/openpyxl/writer/theme.pyi new file mode 100644 index 000000000..079c7d650 --- /dev/null +++ b/stubs/openpyxl/openpyxl/writer/theme.pyi @@ -0,0 +1,3 @@ +theme_xml: str + +def write_theme(): ... diff --git a/stubs/openpyxl/openpyxl/xml/__init__.pyi b/stubs/openpyxl/openpyxl/xml/__init__.pyi new file mode 100644 index 000000000..c074aaf44 --- /dev/null +++ b/stubs/openpyxl/openpyxl/xml/__init__.pyi @@ -0,0 +1,11 @@ +from typing import Any + +def lxml_available(): ... +def lxml_env_set(): ... + +LXML: Any + +def defusedxml_available(): ... +def defusedxml_env_set(): ... + +DEFUSEDXML: Any diff --git a/stubs/openpyxl/openpyxl/xml/constants.pyi b/stubs/openpyxl/openpyxl/xml/constants.pyi new file mode 100644 index 000000000..9380e8668 --- /dev/null +++ b/stubs/openpyxl/openpyxl/xml/constants.pyi @@ -0,0 +1,74 @@ +from typing import Any + +MIN_ROW: int +MIN_COLUMN: int +MAX_COLUMN: int +MAX_ROW: int +PACKAGE_PROPS: str +PACKAGE_XL: str +PACKAGE_RELS: str +PACKAGE_THEME: Any +PACKAGE_WORKSHEETS: Any +PACKAGE_CHARTSHEETS: Any +PACKAGE_DRAWINGS: Any +PACKAGE_CHARTS: Any +PACKAGE_IMAGES: Any +PACKAGE_WORKSHEET_RELS: Any +PACKAGE_CHARTSHEETS_RELS: Any +PACKAGE_PIVOT_TABLE: Any +PACKAGE_PIVOT_CACHE: Any +ARC_CONTENT_TYPES: str +ARC_ROOT_RELS: Any +ARC_WORKBOOK_RELS: Any +ARC_CORE: Any +ARC_APP: Any +ARC_WORKBOOK: Any +ARC_STYLE: Any +ARC_THEME: Any +ARC_SHARED_STRINGS: Any +ARC_CUSTOM_UI: str +XML_NS: str +DCORE_NS: str +DCTERMS_NS: str +DCTERMS_PREFIX: str +DOC_NS: str +REL_NS: Any +COMMENTS_NS: Any +IMAGE_NS: Any +VML_NS: Any +VTYPES_NS: Any +XPROPS_NS: Any +EXTERNAL_LINK_NS: Any +PKG_NS: str +PKG_REL_NS: Any +COREPROPS_NS: Any +CONTYPES_NS: Any +XSI_NS: str +SHEET_MAIN_NS: str +CHART_NS: str +DRAWING_NS: str +SHEET_DRAWING_NS: str +CHART_DRAWING_NS: str +CUSTOMUI_NS: str +NAMESPACES: Any +WORKBOOK_MACRO: str +WORKBOOK: str +SPREADSHEET: str +SHARED_STRINGS: Any +EXTERNAL_LINK: Any +WORKSHEET_TYPE: Any +COMMENTS_TYPE: Any +STYLES_TYPE: Any +CHARTSHEET_TYPE: Any +DRAWING_TYPE: str +CHART_TYPE: str +CHARTSHAPE_TYPE: str +THEME_TYPE: str +XLTM: Any +XLSM: Any +XLTX: Any +XLSX: Any +EXT_TYPES: Any +CTRL: str +ACTIVEX: str +VBA: str diff --git a/stubs/openpyxl/openpyxl/xml/functions.pyi b/stubs/openpyxl/openpyxl/xml/functions.pyi new file mode 100644 index 000000000..9c34b837c --- /dev/null +++ b/stubs/openpyxl/openpyxl/xml/functions.pyi @@ -0,0 +1,6 @@ +from typing import Any + +NS_REGEX: Any + +def localname(node): ... +def whitespace(node) -> None: ...