[openpyxl] Complete base descriptors (#10001)

This commit is contained in:
Avasam
2023-05-10 02:37:11 -04:00
committed by GitHub
parent a584b43769
commit dfee77ef6b
115 changed files with 7343 additions and 4184 deletions

View File

@@ -7,3 +7,171 @@ openpyxl.utils.dataframe
# Element can be imported from lxml or xml.etree, so the attributes can
# differ at runtime.
openpyxl.xml.functions.Element.*
# Fake getters
openpyxl\.descriptors\..*\.__get__
# Stubtest sees <class T> and type[T] as different: https://github.com/python/mypy/issues/13316
openpyxl.chart.descriptors.NumberFormatDescriptor.expected_type
openpyxl.chart.title.TitleDescriptor.expected_type
openpyxl.drawing.colors.ColorChoiceDescriptor.expected_type
openpyxl.styles.colors.ColorDescriptor.expected_type
# Stubtest doesn't like generics here
openpyxl\.descriptors\.(base\.)?Bool\.allow_none
openpyxl\.descriptors\.(base\.)?DateTime\.allow_none
openpyxl\.descriptors\.(base\.)?Float\.allow_none
openpyxl\.descriptors\.(base\.)?Integer\.allow_none
openpyxl\.descriptors\.(base\.)?MatchPattern\.allow_none
openpyxl\.descriptors\.(base\.)?Max\.allow_none
openpyxl\.descriptors\.(base\.)?Min\.allow_none
openpyxl\.descriptors\.(base\.)?MinMax\.allow_none
openpyxl\.descriptors\.(base\.)?String\.allow_none
openpyxl\.descriptors\.(base\.)?Typed\.allow_none
# "has a default value but stub argument does not"
# Runtime has default arguments that would fail
openpyxl.cell.text.PhoneticProperties.__init__
openpyxl.cell.text.PhoneticText.__init__
openpyxl.chart.chartspace.ChartSpace.__init__
openpyxl.chart.chartspace.ExternalData.__init__
openpyxl.chart.data_source.NumFmt.__init__
openpyxl.chart.data_source.NumVal.__init__
openpyxl.chartsheet.custom.CustomChartsheetView.__init__
openpyxl.chartsheet.publish.WebPublishItem.__init__
openpyxl.comments.comment_sheet.CommentSheet.__init__
openpyxl.comments.comment_sheet.Properties.__init__
openpyxl.descriptors.excel.Extension.__init__
openpyxl.drawing.colors.HSLColor.__init__
openpyxl.drawing.colors.RGBPercent.__init__
openpyxl.drawing.colors.SchemeColor.__init__
openpyxl.drawing.connector.Connection.__init__
openpyxl.drawing.connector.ConnectorNonVisual.__init__
openpyxl.drawing.connector.ConnectorShape.__init__
openpyxl.drawing.connector.Shape.__init__
openpyxl.drawing.connector.ShapeMeta.__init__
openpyxl.drawing.effect.AlphaBiLevelEffect.__init__
openpyxl.drawing.effect.AlphaModulateEffect.__init__
openpyxl.drawing.effect.AlphaModulateFixedEffect.__init__
openpyxl.drawing.effect.AlphaReplaceEffect.__init__
openpyxl.drawing.effect.BiLevelEffect.__init__
openpyxl.drawing.effect.BlurEffect.__init__
openpyxl.drawing.effect.ColorChangeEffect.__init__
openpyxl.drawing.effect.EffectContainer.__init__
openpyxl.drawing.effect.FillOverlayEffect.__init__
openpyxl.drawing.effect.GlowEffect.__init__
openpyxl.drawing.effect.HSLEffect.__init__
openpyxl.drawing.effect.InnerShadowEffect.__init__
openpyxl.drawing.effect.OuterShadow.__init__
openpyxl.drawing.effect.PresetShadowEffect.__init__
openpyxl.drawing.effect.ReflectionEffect.__init__
openpyxl.drawing.effect.SoftEdgesEffect.__init__
openpyxl.drawing.fill.LinearShadeProperties.__init__
openpyxl.drawing.fill.PathShadeProperties.__init__
openpyxl.drawing.fill.TileInfoProperties.__init__
openpyxl.drawing.geometry.Backdrop.__init__
openpyxl.drawing.geometry.Bevel.__init__
openpyxl.drawing.geometry.Camera.__init__
openpyxl.drawing.geometry.ConnectionSite.__init__
openpyxl.drawing.geometry.CustomGeometry2D.__init__
openpyxl.drawing.geometry.GeomGuide.__init__
openpyxl.drawing.geometry.LightRig.__init__
openpyxl.drawing.geometry.Path2D.__init__
openpyxl.drawing.geometry.Point3D.__init__
openpyxl.drawing.geometry.PositiveSize2D.__init__
openpyxl.drawing.geometry.PresetGeometry2D.__init__
openpyxl.drawing.geometry.Scene3D.__init__
openpyxl.drawing.geometry.ShapeStyle.__init__
openpyxl.drawing.geometry.SphereCoords.__init__
openpyxl.drawing.geometry.StyleMatrixReference.__init__
openpyxl.drawing.geometry.Vector3D.__init__
openpyxl.drawing.graphic.GroupShape.__init__
openpyxl.drawing.properties.NonVisualDrawingProps.__init__
openpyxl.drawing.properties.NonVisualGroupShape.__init__
openpyxl.drawing.text.AutonumberBullet.__init__
openpyxl.drawing.text.Font.__init__
openpyxl.drawing.text.GeomGuide.__init__
openpyxl.drawing.text.PresetTextShape.__init__
openpyxl.drawing.text.TextField.__init__
openpyxl.drawing.text.TextNormalAutofit.__init__
openpyxl.packaging.relationship.Relationship.__init__
openpyxl.packaging.workbook.ChildSheet.__init__
openpyxl.packaging.workbook.PivotCache.__init__
openpyxl.pivot.cache.CacheDefinition.__init__
openpyxl.pivot.cache.CacheField.__init__
openpyxl.pivot.cache.CacheHierarchy.__init__
openpyxl.pivot.cache.CacheSource.__init__
openpyxl.pivot.cache.CalculatedItem.__init__
openpyxl.pivot.cache.CalculatedMember.__init__
openpyxl.pivot.cache.DiscretePr.__init__
openpyxl.pivot.cache.FieldsUsage.__init__
openpyxl.pivot.cache.FieldUsage.__init__
openpyxl.pivot.cache.GroupLevel.__init__
openpyxl.pivot.cache.GroupLevels.__init__
openpyxl.pivot.cache.GroupMember.__init__
openpyxl.pivot.cache.GroupMembers.__init__
openpyxl.pivot.cache.Groups.__init__
openpyxl.pivot.cache.LevelGroup.__init__
openpyxl.pivot.cache.MeasureGroup.__init__
openpyxl.pivot.cache.OLAPSet.__init__
openpyxl.pivot.cache.OLAPSets.__init__
openpyxl.pivot.cache.PageItem.__init__
openpyxl.pivot.cache.PCDKPI.__init__
openpyxl.pivot.cache.PCDSDTCEntries.__init__
openpyxl.pivot.cache.PivotDimension.__init__
openpyxl.pivot.cache.Query.__init__
openpyxl.pivot.cache.QueryCache.__init__
openpyxl.pivot.cache.RangeSet.__init__
openpyxl.pivot.fields.Error.__init__
openpyxl.pivot.fields.Number.__init__
openpyxl.pivot.fields.Tuple.__init__
openpyxl.pivot.fields.TupleList.__init__
openpyxl.pivot.table.AutoSortScope.__init__
openpyxl.pivot.table.ChartFormat.__init__
openpyxl.pivot.table.ConditionalFormat.__init__
openpyxl.pivot.table.DataField.__init__
openpyxl.pivot.table.Format.__init__
openpyxl.pivot.table.HierarchyUsage.__init__
openpyxl.pivot.table.Location.__init__
openpyxl.pivot.table.MemberProperty.__init__
openpyxl.pivot.table.PageField.__init__
openpyxl.pivot.table.PivotFilter.__init__
openpyxl.pivot.table.PivotFilters.__init__
openpyxl.pivot.table.RowColField.__init__
openpyxl.pivot.table.TableDefinition.__init__
openpyxl.styles.named_styles._NamedCellStyle.__init__
openpyxl.styles.numbers.NumberFormat.__init__
openpyxl.styles.table.TableStyle.__init__
openpyxl.styles.table.TableStyleElement.__init__
openpyxl.workbook.defined_name.DefinedName.__init__
openpyxl.workbook.external_link.external.ExternalCell.__init__
openpyxl.workbook.external_link.external.ExternalDefinedName.__init__
openpyxl.workbook.external_link.external.ExternalRow.__init__
openpyxl.workbook.external_link.external.ExternalSheetData.__init__
openpyxl.workbook.function_group.FunctionGroup.__init__
openpyxl.workbook.views.CustomWorkbookView.__init__
openpyxl.workbook.web.WebPublishObject.__init__
openpyxl.worksheet.cell_watch.CellWatch.__init__
openpyxl.worksheet.controls.Control.__init__
openpyxl.worksheet.controls.ControlProperty.__init__
openpyxl.worksheet.custom.CustomProperty.__init__
openpyxl.worksheet.dimensions.RowDimension.__init__
openpyxl.worksheet.dimensions.SheetDimension.__init__
openpyxl.worksheet.filters.DateGroupItem.__init__
openpyxl.worksheet.filters.DynamicFilter.__init__
openpyxl.worksheet.filters.FilterColumn.__init__
openpyxl.worksheet.filters.IconFilter.__init__
openpyxl.worksheet.filters.Top10.__init__
openpyxl.worksheet.hyperlink.Hyperlink.__init__
openpyxl.worksheet.ole.ObjectAnchor.__init__
openpyxl.worksheet.ole.ObjectPr.__init__
openpyxl.worksheet.ole.OleObject.__init__
openpyxl.worksheet.print_settings.RowRange.__init__
openpyxl.worksheet.scenario.InputCells.__init__
openpyxl.worksheet.scenario.Scenario.__init__
openpyxl.worksheet.smart_tag.CellSmartTag.__init__
openpyxl.worksheet.smart_tag.CellSmartTagPr.__init__
openpyxl.worksheet.smart_tag.CellSmartTags.__init__
openpyxl.worksheet.table.TableColumn.__init__
openpyxl.worksheet.table.XMLColumnProps.__init__

View File

@@ -0,0 +1,392 @@
# Needed until mypy issues are solved
# pyright: reportUnnecessaryTypeIgnoreComment=false
from __future__ import annotations
from _typeshed import ReadableBuffer
from datetime import date, datetime, time
from typing import Any, List, Tuple, Union
from typing_extensions import Literal, assert_type
from openpyxl.descriptors import Strict
from openpyxl.descriptors.base import (
Bool,
Convertible,
DateTime,
Descriptor,
Float,
Integer,
Length,
MatchPattern,
MinMax,
NoneSet,
Set,
String,
Typed,
)
from openpyxl.descriptors.serialisable import Serialisable
class WithDescriptors(Serialisable):
descriptor = Descriptor[str]()
typed_default = Typed(expected_type=str)
typed_not_none = Typed(expected_type=str, allow_none=False)
typed_none = Typed(expected_type=str, allow_none=True)
set_tuple = Set(values=("a", 1, 0.0))
set_list = Set(values=["a", 1, 0.0])
set_tuple_none = Set(values=("a", 1, 0.0, None))
noneset_tuple = NoneSet(values=("a", 1, 0.0))
noneset_list = NoneSet(values=["a", 1, 0.0])
length_tuple = Length[Tuple[str, str]](length=1) # Can't validate tuple length in a generic manner
length_list = Length[List[str]](length=1)
length_invalid = Length[object](length=1) # type: ignore
match_pattern_str_default = MatchPattern(pattern="")
match_pattern_str = MatchPattern(pattern="", allow_none=False)
match_pattern_str_none = MatchPattern(pattern="", allow_none=True)
match_pattern_bytes_default = MatchPattern(pattern=b"")
match_pattern_bytes = MatchPattern(pattern=b"", allow_none=False)
match_pattern_bytes_none = MatchPattern(pattern=b"", allow_none=True)
convertible_default = Convertible(expected_type=int)
convertible_not_none = Convertible(expected_type=int, allow_none=False)
convertible_none = Convertible(expected_type=int, allow_none=True)
# NOTE: min and max params are independent of expected_type since int and floats can always be compared together
minmax_default = MinMax(min=0, max=0)
minmax_float = MinMax(min=0, max=0, expected_type=float, allow_none=False)
minmax_float_none = MinMax(min=0, max=0, expected_type=float, allow_none=True)
minmax_int = MinMax(min=0.0, max=0.0, expected_type=int, allow_none=False)
minmax_int_none = MinMax(min=0.0, max=0.0, expected_type=int, allow_none=True)
bool_default = Bool()
bool_not_none = Bool(allow_none=False)
bool_none = Bool(allow_none=True)
datetime_default = DateTime()
datetime_not_none = DateTime(allow_none=False)
datetime_none = DateTime(allow_none=True)
string_default = String()
string_not_none = String(allow_none=False)
string_none = String(allow_none=True)
float_default = Float()
float_not_none = Float(allow_none=False)
float_none = Float(allow_none=True)
integer_default = Integer()
integer_not_none = Integer(allow_none=False)
integer_none = Integer(allow_none=True)
# Test inferred annotation
assert_type(descriptor, Descriptor[str])
assert_type(typed_default, Typed[str, Literal[False]])
assert_type(typed_not_none, Typed[str, Literal[False]])
assert_type(typed_none, Typed[str, Literal[True]])
assert_type(set_tuple, Set[Union[Literal["a", 1], float]]) # type: ignore[assert-type] # False-positive in mypy
assert_type(set_list, Set[Union[str, int, float]]) # type: ignore[assert-type] # False-positive in mypy # Literals are simplified in non-tuples
assert_type(set_tuple_none, Set[Union[Literal["a", 1, None], float]]) # type: ignore[assert-type] # False-positive in mypy
assert_type(noneset_tuple, NoneSet[Union[Literal["a", 1], float]]) # type: ignore[assert-type] # False-positive in mypy
assert_type(noneset_list, NoneSet[Union[str, float]]) # type: ignore[assert-type] # False-positive in mypy# int and float are merged in generic unions
assert_type(length_tuple, Length[Tuple[str, str]])
assert_type(length_list, Length[List[str]])
assert_type(match_pattern_str_default, MatchPattern[str, Literal[False]])
assert_type(match_pattern_str, MatchPattern[str, Literal[False]])
assert_type(match_pattern_str_none, MatchPattern[str, Literal[True]])
assert_type(match_pattern_bytes_default, MatchPattern[ReadableBuffer, Literal[False]])
assert_type(match_pattern_bytes, MatchPattern[ReadableBuffer, Literal[False]])
assert_type(match_pattern_bytes_none, MatchPattern[ReadableBuffer, Literal[True]])
assert_type(convertible_default, Convertible[int, Literal[False]])
assert_type(convertible_not_none, Convertible[int, Literal[False]])
assert_type(convertible_none, Convertible[int, Literal[True]])
assert_type(minmax_default, MinMax[float, Literal[False]])
assert_type(minmax_float, MinMax[float, Literal[False]])
assert_type(minmax_float_none, MinMax[float, Literal[True]])
assert_type(minmax_int, MinMax[int, Literal[False]])
assert_type(minmax_int_none, MinMax[int, Literal[True]])
assert_type(bool_default, Bool[Literal[False]])
assert_type(bool_not_none, Bool[Literal[False]])
assert_type(bool_none, Bool[Literal[True]])
assert_type(datetime_default, DateTime[Literal[False]])
assert_type(datetime_not_none, DateTime[Literal[False]])
assert_type(datetime_none, DateTime[Literal[True]])
assert_type(string_default, String[Literal[False]])
assert_type(string_not_none, String[Literal[False]])
assert_type(string_none, String[Literal[True]])
assert_type(float_default, Float[Literal[False]])
assert_type(float_not_none, Float[Literal[False]])
assert_type(float_none, Float[Literal[True]])
assert_type(integer_default, Integer[Literal[False]])
assert_type(integer_not_none, Integer[Literal[False]])
assert_type(integer_none, Integer[Literal[True]])
with_descriptors = WithDescriptors()
# Test with missing subclass
class NotSerialisable:
descriptor = Descriptor[Any]()
NotSerialisable().descriptor = None # type: ignore
# Test with Strict subclass
class WithDescriptorsStrict(Strict):
descriptor = Descriptor[Any]()
WithDescriptorsStrict().descriptor = None
# Test getters
assert_type(with_descriptors.descriptor, str)
assert_type(with_descriptors.typed_not_none, str) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.typed_none, Union[str, None])
assert_type(with_descriptors.set_tuple, Union[Literal["a", 1], float]) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.set_list, Union[str, int, float]) # type: ignore[assert-type] # False-positive in mypy # Literals are simplified in non-tuples
assert_type(with_descriptors.set_tuple_none, Union[Literal["a", 1, None], float]) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.noneset_tuple, Union[Literal["a", 1], float, None]) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.noneset_list, Union[str, float, None]) # type: ignore[assert-type] # False-positive in mypy # int and float are merged in generic unions
assert_type(with_descriptors.length_tuple, Tuple[str, str])
assert_type(with_descriptors.length_list, List[str])
assert_type(with_descriptors.match_pattern_str, str) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.match_pattern_str_none, Union[str, None])
assert_type(with_descriptors.match_pattern_bytes, ReadableBuffer) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.match_pattern_bytes_none, Union[ReadableBuffer, None])
assert_type(with_descriptors.convertible_not_none, int) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.convertible_none, Union[int, None])
assert_type(with_descriptors.minmax_float, float) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.minmax_float_none, Union[float, None])
assert_type(with_descriptors.minmax_int, int) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.minmax_int_none, Union[int, None])
assert_type(with_descriptors.bool_not_none, bool) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.bool_none, Union[bool, None])
assert_type(with_descriptors.datetime_not_none, datetime) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.datetime_none, Union[datetime, None])
assert_type(with_descriptors.string_not_none, str) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.string_none, Union[str, None])
assert_type(with_descriptors.float_not_none, float) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.float_none, Union[float, None])
assert_type(with_descriptors.integer_not_none, int) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.integer_none, Union[int, None])
# Test setters (expected type, None, unexpected type)
with_descriptors.descriptor = ""
with_descriptors.descriptor = None # type: ignore
with_descriptors.descriptor = 0 # type: ignore
with_descriptors.typed_not_none = ""
with_descriptors.typed_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.typed_not_none = 0 # type: ignore
with_descriptors.typed_none = ""
with_descriptors.typed_none = None
with_descriptors.typed_none = 0 # type: ignore
# NOTE: Can't check Set for literal int wen used with a float because any int is a vlaid float
with_descriptors.set_tuple = "a"
with_descriptors.set_tuple = 0
with_descriptors.set_tuple = 0.0
with_descriptors.set_tuple = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = "none" # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = "a"
with_descriptors.set_list = 0
with_descriptors.set_list = 0.0
with_descriptors.set_list = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = "none" # can't check literals validity
with_descriptors.set_list = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = "a"
with_descriptors.set_tuple_none = 0
with_descriptors.set_tuple_none = 0.0
with_descriptors.set_tuple_none = None
with_descriptors.set_tuple_none = "none" # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_tuple = "a"
with_descriptors.noneset_tuple = 0
with_descriptors.noneset_tuple = 0.0
with_descriptors.noneset_tuple = None
with_descriptors.noneset_tuple = "none"
with_descriptors.noneset_tuple = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_list = "a"
with_descriptors.noneset_list = 0
with_descriptors.noneset_list = 0.0
with_descriptors.noneset_list = None
with_descriptors.noneset_list = "none"
with_descriptors.noneset_list = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
# NOTE: Can't validate tuple length in a generic manner
with_descriptors.length_tuple = ("a", "a")
with_descriptors.length_tuple = None # type: ignore
with_descriptors.length_tuple = ["a", "a"] # type: ignore
with_descriptors.length_tuple = "" # type: ignore
with_descriptors.length_list = ["a", "a"]
with_descriptors.length_list = None # type: ignore
with_descriptors.length_list = ("a", "a") # type: ignore
with_descriptors.length_list = "" # type: ignore
with_descriptors.match_pattern_str = ""
with_descriptors.match_pattern_str = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.match_pattern_str = b"" # type: ignore
with_descriptors.match_pattern_str = 0 # type: ignore
with_descriptors.match_pattern_str_none = ""
with_descriptors.match_pattern_str_none = None
with_descriptors.match_pattern_str_none = b"" # type: ignore
with_descriptors.match_pattern_str_none = 0 # type: ignore
with_descriptors.match_pattern_bytes = b""
with_descriptors.match_pattern_bytes = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.match_pattern_bytes = "" # type: ignore
with_descriptors.match_pattern_bytes = 0 # type: ignore
with_descriptors.match_pattern_bytes_none = b""
with_descriptors.match_pattern_bytes_none = None
with_descriptors.match_pattern_bytes_none = "" # type: ignore
with_descriptors.match_pattern_bytes_none = 0 # type: ignore
with_descriptors.convertible_not_none = 0
with_descriptors.convertible_not_none = "0"
with_descriptors.convertible_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_none = 0
with_descriptors.convertible_none = "0"
with_descriptors.convertible_none = None
with_descriptors.convertible_none = object() # FIXME: False positive(?) in pyright and mypy
with_descriptors.minmax_float = 0
with_descriptors.minmax_float = "0"
with_descriptors.minmax_float = 0.0
with_descriptors.minmax_float = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_float = object() # type: ignore
with_descriptors.minmax_float_none = 0
with_descriptors.minmax_float_none = "0"
with_descriptors.minmax_float_none = 0.0
with_descriptors.minmax_float_none = None
with_descriptors.minmax_float_none = object() # type: ignore
with_descriptors.minmax_int = 0
with_descriptors.minmax_int = "0"
with_descriptors.minmax_int = 0.0
with_descriptors.minmax_int = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_int = object() # type: ignore
with_descriptors.minmax_int_none = 0
with_descriptors.minmax_int_none = "0"
with_descriptors.minmax_int_none = 0.0
with_descriptors.minmax_int_none = None
with_descriptors.minmax_int_none = object() # type: ignore
with_descriptors.bool_not_none = False
with_descriptors.bool_not_none = "0"
with_descriptors.bool_not_none = 0
with_descriptors.bool_not_none = None
with_descriptors.bool_not_none = 0.0 # type: ignore
with_descriptors.bool_not_none = object() # type: ignore
with_descriptors.bool_none = False
with_descriptors.bool_none = "0"
with_descriptors.bool_none = 0
with_descriptors.bool_none = None
with_descriptors.bool_none = 0.0 # type: ignore
with_descriptors.bool_none = object() # type: ignore
with_descriptors.datetime_not_none = datetime(0, 0, 0)
with_descriptors.datetime_not_none = ""
with_descriptors.datetime_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.datetime_not_none = 0 # type: ignore
with_descriptors.datetime_not_none = date(0, 0, 0) # type: ignore
with_descriptors.datetime_not_none = time() # type: ignore
with_descriptors.datetime_none = datetime(0, 0, 0)
with_descriptors.datetime_none = ""
with_descriptors.datetime_none = None
with_descriptors.datetime_none = 0 # type: ignore
with_descriptors.datetime_none = date(0, 0, 0) # type: ignore
with_descriptors.datetime_none = time() # type: ignore
with_descriptors.string_not_none = ""
with_descriptors.string_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.string_not_none = 0 # type: ignore
with_descriptors.string_none = ""
with_descriptors.string_none = None
with_descriptors.string_none = 0 # type: ignore
with_descriptors.float_not_none = 0
with_descriptors.float_not_none = 0.0
with_descriptors.float_not_none = "0"
with_descriptors.float_not_none = b"0"
with_descriptors.float_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_none = 0
with_descriptors.float_none = 0.0
with_descriptors.float_none = "0"
with_descriptors.float_none = b"0"
with_descriptors.float_none = None
with_descriptors.float_none = object() # FIXME: False positive(?) in pyright and mypy
with_descriptors.integer_not_none = 0
with_descriptors.integer_not_none = 0.0
with_descriptors.integer_not_none = "0"
with_descriptors.integer_not_none = b"0"
with_descriptors.integer_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_none = 0
with_descriptors.integer_none = 0.0
with_descriptors.integer_none = "0"
with_descriptors.integer_none = b"0"
with_descriptors.integer_none = None
with_descriptors.integer_none = object() # FIXME: False positive(?) in pyright and mypy

View File

@@ -1,14 +1,15 @@
from collections.abc import Iterable
from typing import overload
from typing_extensions import Self
from typing_extensions import Literal, Self
from openpyxl.cell.text import InlineFont
from openpyxl.descriptors import Strict, String, Typed
class TextBlock(Strict):
font: Typed
text: String
font: Typed[InlineFont, Literal[False]]
text: String[Literal[False]]
def __init__(self, font: Typed, text: String) -> None: ...
def __init__(self, font: InlineFont, text: str) -> None: ...
def __eq__(self, other: TextBlock) -> bool: ... # type: ignore[override]
class CellRichText(list[str | TextBlock]):

View File

@@ -1,24 +1,34 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Alias, Integer, NoneSet, Typed, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.styles.fonts import Font
_PhoneticPropertiesType: TypeAlias = Literal["halfwidthKatakana", "fullwidthKatakana", "Hiragana", "noConversion"]
_PhoneticPropertiesAlignment: TypeAlias = Literal["noControl", "left", "center", "distributed"]
class PhoneticProperties(Serialisable):
tagname: str
fontId: Incomplete
type: Incomplete
alignment: Incomplete
fontId: Integer[Literal[False]]
type: NoneSet[_PhoneticPropertiesType]
alignment: NoneSet[_PhoneticPropertiesAlignment]
def __init__(
self, fontId: Incomplete | None = None, type: Incomplete | None = None, alignment: Incomplete | None = None
self,
fontId: _ConvertibleToInt,
type: _PhoneticPropertiesType | Literal["none"] | None = None,
alignment: _PhoneticPropertiesAlignment | Literal["none"] | None = None,
) -> None: ...
_PhoneticProperties: TypeAlias = PhoneticProperties
class PhoneticText(Serialisable):
tagname: str
sb: Incomplete
eb: Incomplete
sb: Integer[Literal[False]]
eb: Integer[Literal[False]]
t: Incomplete
text: Incomplete
def __init__(self, sb: Incomplete | None = None, eb: Incomplete | None = None, t: Incomplete | None = None) -> None: ...
text: Alias
def __init__(self, sb: _ConvertibleToInt, eb: _ConvertibleToInt, t: Incomplete | None = None) -> None: ...
class InlineFont(Font):
tagname: str
@@ -59,24 +69,24 @@ class InlineFont(Font):
class RichText(Serialisable):
tagname: str
rPr: Incomplete
font: Incomplete
rPr: Typed[InlineFont, Literal[True]]
font: Alias
t: Incomplete
text: Incomplete
text: Alias
__elements__: Incomplete
def __init__(self, rPr: Incomplete | None = None, t: Incomplete | None = None) -> None: ...
def __init__(self, rPr: InlineFont | None = None, t: Incomplete | None = None) -> None: ...
class Text(Serialisable):
tagname: str
t: Incomplete
plain: Incomplete
plain: Alias
r: Incomplete
formatted: Incomplete
formatted: Alias
rPh: Incomplete
phonetic: Incomplete
phoneticPr: Incomplete
PhoneticProperties: Incomplete
phonetic: Alias
phoneticPr: Typed[_PhoneticProperties, Literal[True]]
PhoneticProperties: Alias
__elements__: Incomplete
def __init__(self, t: Incomplete | None = None, r=(), rPh=(), phoneticPr: Incomplete | None = None) -> None: ...
def __init__(self, t: Incomplete | None = None, r=(), rPh=(), phoneticPr: _PhoneticProperties | None = None) -> None: ...
@property
def content(self): ...

View File

@@ -1,20 +1,25 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.picture import PictureOptions
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class View3D(Serialisable):
tagname: str
rotX: Incomplete
x_rotation: Incomplete
x_rotation: Alias
hPercent: Incomplete
height_percent: Incomplete
height_percent: Alias
rotY: Incomplete
y_rotation: Incomplete
y_rotation: Alias
depthPercent: Incomplete
rAngAx: Incomplete
right_angle_axes: Incomplete
right_angle_axes: Alias
perspective: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
@@ -24,35 +29,35 @@ class View3D(Serialisable):
depthPercent: Incomplete | None = None,
rAngAx: bool = True,
perspective: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
class Surface(Serialisable):
tagname: str
thickness: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
pictureOptions: Incomplete
extLst: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
pictureOptions: Typed[PictureOptions, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
thickness: Incomplete | None = None,
spPr: Incomplete | None = None,
pictureOptions: Incomplete | None = None,
extLst: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
pictureOptions: PictureOptions | None = None,
extLst: Unused = None,
) -> None: ...
class _3DBase(Serialisable):
tagname: str
view3D: Incomplete
floor: Incomplete
sideWall: Incomplete
backWall: Incomplete
view3D: Typed[View3D, Literal[True]]
floor: Typed[Surface, Literal[True]]
sideWall: Typed[Surface, Literal[True]]
backWall: Typed[Surface, Literal[True]]
def __init__(
self,
view3D: Incomplete | None = None,
floor: Incomplete | None = None,
sideWall: Incomplete | None = None,
backWall: Incomplete | None = None,
view3D: View3D | None = None,
floor: Surface | None = None,
sideWall: Surface | None = None,
backWall: Surface | None = None,
) -> None: ...

View File

@@ -1,36 +1,43 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from typing_extensions import Literal, TypeAlias
from openpyxl.chart.layout import Layout
from openpyxl.chart.legend import Legend
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.descriptors.base import Alias, Bool, Integer, MinMax, Set, Typed, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
class AxId(Serialisable): # type: ignore[misc]
val: Incomplete
def __init__(self, val) -> None: ...
_ChartBaseDisplayBlanks: TypeAlias = Literal["span", "gap", "zero"]
class AxId(Serialisable):
val: Integer[Literal[False]]
def __init__(self, val: _ConvertibleToInt) -> None: ...
def PlotArea(): ...
class ChartBase(Serialisable):
legend: Incomplete
layout: Incomplete
roundedCorners: Incomplete
legend: Typed[Legend, Literal[True]]
layout: Typed[Layout, Literal[True]]
roundedCorners: Bool[Literal[True]]
axId: Incomplete
visible_cells_only: Incomplete
display_blanks: Incomplete
visible_cells_only: Bool[Literal[True]]
display_blanks: Set[_ChartBaseDisplayBlanks]
ser: Incomplete
series: Incomplete
series: Alias
title: Incomplete
anchor: str
width: int
height: float
style: Incomplete
style: MinMax[float, Literal[True]]
mime_type: str
graphical_properties: Incomplete
graphical_properties: Typed[GraphicalProperties, Literal[True]]
__elements__: Incomplete
plot_area: Incomplete
pivotSource: Incomplete
pivotFormats: Incomplete
idx_base: int
def __init__(self, axId=(), **kw) -> None: ...
def __init__(self, axId=(), **kw: Unused) -> None: ...
def __hash__(self) -> int: ...
def __iadd__(self, other): ...
def to_tree(self, namespace: Incomplete | None = None, tagname: Incomplete | None = None, idx: Incomplete | None = None): ... # type: ignore[override]

View File

@@ -1,5 +1,11 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from typing_extensions import Literal
from openpyxl.chart.axis import ChartLines, NumericAxis, SeriesAxis, TextAxis
from openpyxl.chart.label import DataLabelList
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from ._chart import ChartBase
@@ -7,17 +13,17 @@ class _AreaChartBase(ChartBase):
grouping: Incomplete
varyColors: Incomplete
ser: Incomplete
dLbls: Incomplete
dataLabels: Incomplete
dropLines: Incomplete
dLbls: Typed[DataLabelList, Literal[True]]
dataLabels: Alias
dropLines: Typed[ChartLines, Literal[True]]
__elements__: Incomplete
def __init__(
self,
grouping: str = "standard",
varyColors: Incomplete | None = None,
ser=(),
dLbls: Incomplete | None = None,
dropLines: Incomplete | None = None,
dLbls: DataLabelList | None = None,
dropLines: ChartLines | None = None,
) -> None: ...
@property
@abstractmethod
@@ -30,11 +36,11 @@ class AreaChart(_AreaChartBase):
ser: Incomplete
dLbls: Incomplete
dropLines: Incomplete
x_axis: Incomplete
y_axis: Incomplete
extLst: Incomplete
x_axis: Typed[TextAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, axId: Incomplete | None = None, extLst: Incomplete | None = None, **kw) -> None: ...
def __init__(self, axId: Unused = None, extLst: Unused = None, **kw) -> None: ...
class AreaChart3D(AreaChart):
tagname: str
@@ -44,8 +50,8 @@ class AreaChart3D(AreaChart):
dLbls: Incomplete
dropLines: Incomplete
gapDepth: Incomplete
x_axis: Incomplete
y_axis: Incomplete
z_axis: Incomplete
x_axis: Typed[TextAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
z_axis: Typed[SeriesAxis, Literal[True]]
__elements__: Incomplete
def __init__(self, gapDepth: Incomplete | None = None, **kw) -> None: ...

View File

@@ -1,13 +1,19 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from typing_extensions import Literal
from openpyxl.chart.layout import Layout
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText, Text
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class ChartLines(Serialisable):
tagname: str
spPr: Incomplete
graphicalProperties: Incomplete
def __init__(self, spPr: Incomplete | None = None) -> None: ...
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
def __init__(self, spPr: GraphicalProperties | None = None) -> None: ...
class Scaling(Serialisable):
tagname: str
@@ -15,7 +21,7 @@ class Scaling(Serialisable):
orientation: Incomplete
max: Incomplete
min: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
@@ -23,26 +29,26 @@ class Scaling(Serialisable):
orientation: str = "minMax",
max: Incomplete | None = None,
min: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
class _BaseAxis(Serialisable):
axId: Incomplete
scaling: Incomplete
scaling: Typed[Scaling, Literal[False]]
delete: Incomplete
axPos: Incomplete
majorGridlines: Incomplete
minorGridlines: Incomplete
majorGridlines: Typed[ChartLines, Literal[True]]
minorGridlines: Typed[ChartLines, Literal[True]]
title: Incomplete
numFmt: Incomplete
number_format: Incomplete
number_format: Alias
majorTickMark: Incomplete
minorTickMark: Incomplete
tickLblPos: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
textProperties: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
textProperties: Alias
crossAx: Incomplete
crosses: Incomplete
crossesAt: Incomplete
@@ -50,18 +56,18 @@ class _BaseAxis(Serialisable):
def __init__(
self,
axId: Incomplete | None = None,
scaling: Incomplete | None = None,
scaling: Scaling | None = None,
delete: Incomplete | None = None,
axPos: str = "l",
majorGridlines: Incomplete | None = None,
minorGridlines: Incomplete | None = None,
majorGridlines: ChartLines | None = None,
minorGridlines: ChartLines | None = None,
title: Incomplete | None = None,
numFmt: Incomplete | None = None,
majorTickMark: Incomplete | None = None,
minorTickMark: Incomplete | None = None,
tickLblPos: Incomplete | None = None,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
crossAx: Incomplete | None = None,
crosses: Incomplete | None = None,
crossesAt: Incomplete | None = None,
@@ -72,35 +78,35 @@ class _BaseAxis(Serialisable):
class DisplayUnitsLabel(Serialisable):
tagname: str
layout: Incomplete
tx: Incomplete
text: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
textPropertes: Incomplete
layout: Typed[Layout, Literal[True]]
tx: Typed[Text, Literal[True]]
text: Alias
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
textPropertes: Alias
__elements__: Incomplete
def __init__(
self,
layout: Incomplete | None = None,
tx: Incomplete | None = None,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
layout: Layout | None = None,
tx: Text | None = None,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
) -> None: ...
class DisplayUnitsLabelList(Serialisable):
tagname: str
custUnit: Incomplete
builtInUnit: Incomplete
dispUnitsLbl: Incomplete
extLst: Incomplete
dispUnitsLbl: Typed[DisplayUnitsLabel, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
custUnit: Incomplete | None = None,
builtInUnit: Incomplete | None = None,
dispUnitsLbl: Incomplete | None = None,
extLst: Incomplete | None = None,
dispUnitsLbl: DisplayUnitsLabel | None = None,
extLst: Unused = None,
) -> None: ...
class NumericAxis(_BaseAxis):
@@ -124,16 +130,16 @@ class NumericAxis(_BaseAxis):
crossBetween: Incomplete
majorUnit: Incomplete
minorUnit: Incomplete
dispUnits: Incomplete
extLst: Incomplete
dispUnits: Typed[DisplayUnitsLabelList, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
crossBetween: Incomplete | None = None,
majorUnit: Incomplete | None = None,
minorUnit: Incomplete | None = None,
dispUnits: Incomplete | None = None,
extLst: Incomplete | None = None,
dispUnits: DisplayUnitsLabelList | None = None,
extLst: Unused = None,
**kw,
) -> None: ...
@classmethod
@@ -163,7 +169,7 @@ class TextAxis(_BaseAxis):
tickLblSkip: Incomplete
tickMarkSkip: Incomplete
noMultiLvlLbl: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
@@ -173,7 +179,7 @@ class TextAxis(_BaseAxis):
tickLblSkip: Incomplete | None = None,
tickMarkSkip: Incomplete | None = None,
noMultiLvlLbl: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
**kw,
) -> None: ...
@@ -202,7 +208,7 @@ class DateAxis(TextAxis):
majorTimeUnit: Incomplete
minorUnit: Incomplete
minorTimeUnit: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
@@ -213,7 +219,7 @@ class DateAxis(TextAxis):
majorTimeUnit: Incomplete | None = None,
minorUnit: Incomplete | None = None,
minorTimeUnit: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
**kw,
) -> None: ...
@@ -237,12 +243,8 @@ class SeriesAxis(_BaseAxis):
crossesAt: Incomplete
tickLblSkip: Incomplete
tickMarkSkip: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
tickLblSkip: Incomplete | None = None,
tickMarkSkip: Incomplete | None = None,
extLst: Incomplete | None = None,
**kw,
self, tickLblSkip: Incomplete | None = None, tickMarkSkip: Incomplete | None = None, extLst: Unused = None, **kw
) -> None: ...

View File

@@ -1,17 +1,23 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from typing_extensions import Literal
from openpyxl.chart.axis import ChartLines, NumericAxis, SeriesAxis, TextAxis
from openpyxl.chart.label import DataLabelList
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from ._3d import _3DBase
from ._chart import ChartBase
class _BarChartBase(ChartBase):
barDir: Incomplete
type: Incomplete
type: Alias
grouping: Incomplete
varyColors: Incomplete
ser: Incomplete
dLbls: Incomplete
dataLabels: Incomplete
dLbls: Typed[DataLabelList, Literal[True]]
dataLabels: Alias
__elements__: Incomplete
def __init__(
self,
@@ -19,7 +25,7 @@ class _BarChartBase(ChartBase):
grouping: str = "clustered",
varyColors: Incomplete | None = None,
ser=(),
dLbls: Incomplete | None = None,
dLbls: DataLabelList | None = None,
**kw,
) -> None: ...
@property
@@ -35,18 +41,18 @@ class BarChart(_BarChartBase):
dLbls: Incomplete
gapWidth: Incomplete
overlap: Incomplete
serLines: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
serLines: Typed[ChartLines, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[TextAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
__elements__: Incomplete
legend: Incomplete
def __init__(
self,
gapWidth: int = 150,
overlap: Incomplete | None = None,
serLines: Incomplete | None = None,
extLst: Incomplete | None = None,
serLines: ChartLines | None = None,
extLst: Unused = None,
**kw,
) -> None: ...
@@ -64,18 +70,18 @@ class BarChart3D(_BarChartBase, _3DBase):
gapWidth: Incomplete
gapDepth: Incomplete
shape: Incomplete
serLines: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
z_axis: Incomplete
serLines: Typed[ChartLines, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[TextAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
z_axis: Typed[SeriesAxis, Literal[True]]
__elements__: Incomplete
def __init__(
self,
gapWidth: int = 150,
gapDepth: int = 150,
shape: Incomplete | None = None,
serLines: Incomplete | None = None,
extLst: Incomplete | None = None,
serLines: ChartLines | None = None,
extLst: Unused = None,
**kw,
) -> None: ...

View File

@@ -1,4 +1,10 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.axis import NumericAxis
from openpyxl.chart.label import DataLabelList
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from ._chart import ChartBase
@@ -6,25 +12,25 @@ class BubbleChart(ChartBase):
tagname: str
varyColors: Incomplete
ser: Incomplete
dLbls: Incomplete
dataLabels: Incomplete
dLbls: Typed[DataLabelList, Literal[True]]
dataLabels: Alias
bubble3D: Incomplete
bubbleScale: Incomplete
showNegBubbles: Incomplete
sizeRepresents: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[NumericAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
__elements__: Incomplete
def __init__(
self,
varyColors: Incomplete | None = None,
ser=(),
dLbls: Incomplete | None = None,
dLbls: DataLabelList | None = None,
bubble3D: Incomplete | None = None,
bubbleScale: Incomplete | None = None,
showNegBubbles: Incomplete | None = None,
sizeRepresents: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
**kw,
) -> None: ...

View File

@@ -1,38 +1,50 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing import overload
from typing_extensions import Literal
from openpyxl.chart.legend import Legend
from openpyxl.chart.pivot import PivotSource
from openpyxl.chart.plotarea import PlotArea
from openpyxl.chart.print_settings import PrintSettings
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText
from openpyxl.chart.title import Title
from openpyxl.descriptors.base import Alias, String, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.colors import ColorMapping
class ChartContainer(Serialisable):
tagname: str
title: Incomplete
title: Typed[Title, Literal[True]]
autoTitleDeleted: Incomplete
pivotFmts: Incomplete
view3D: Incomplete
floor: Incomplete
sideWall: Incomplete
backWall: Incomplete
plotArea: Incomplete
legend: Incomplete
plotArea: Typed[PlotArea, Literal[False]]
legend: Typed[Legend, Literal[True]]
plotVisOnly: Incomplete
dispBlanksAs: Incomplete
showDLblsOverMax: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
title: Incomplete | None = None,
title: Title | None = None,
autoTitleDeleted: Incomplete | None = None,
pivotFmts=(),
view3D: Incomplete | None = None,
floor: Incomplete | None = None,
sideWall: Incomplete | None = None,
backWall: Incomplete | None = None,
plotArea: Incomplete | None = None,
legend: Incomplete | None = None,
plotArea: PlotArea | None = None,
legend: Legend | None = None,
plotVisOnly: bool = True,
dispBlanksAs: str = "gap",
showDLblsOverMax: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
class Protection(Serialisable):
@@ -55,8 +67,11 @@ class Protection(Serialisable):
class ExternalData(Serialisable):
tagname: str
autoUpdate: Incomplete
id: Incomplete
def __init__(self, autoUpdate: Incomplete | None = None, id: Incomplete | None = None) -> None: ...
id: String[Literal[False]]
@overload
def __init__(self, autoUpdate: Incomplete | None = None, *, id: str) -> None: ...
@overload
def __init__(self, autoUpdate: Incomplete | None, id: str) -> None: ...
class ChartSpace(Serialisable):
tagname: str
@@ -64,34 +79,54 @@ class ChartSpace(Serialisable):
lang: Incomplete
roundedCorners: Incomplete
style: Incomplete
clrMapOvr: Incomplete
pivotSource: Incomplete
protection: Incomplete
chart: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
textProperties: Incomplete
externalData: Incomplete
printSettings: Incomplete
clrMapOvr: Typed[ColorMapping, Literal[True]]
pivotSource: Typed[PivotSource, Literal[True]]
protection: Typed[Protection, Literal[True]]
chart: Typed[ChartContainer, Literal[False]]
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
textProperties: Alias
externalData: Typed[ExternalData, Literal[True]]
printSettings: Typed[PrintSettings, Literal[True]]
userShapes: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
@overload
def __init__(
self,
date1904: Incomplete | None = None,
lang: Incomplete | None = None,
roundedCorners: Incomplete | None = None,
style: Incomplete | None = None,
clrMapOvr: Incomplete | None = None,
pivotSource: Incomplete | None = None,
protection: Incomplete | None = None,
chart: Incomplete | None = None,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
externalData: Incomplete | None = None,
printSettings: Incomplete | None = None,
clrMapOvr: ColorMapping | None = None,
pivotSource: PivotSource | None = None,
protection: Protection | None = None,
*,
chart: ChartContainer,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
externalData: ExternalData | None = None,
printSettings: PrintSettings | None = None,
userShapes: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
@overload
def __init__(
self,
date1904: Incomplete | None,
lang: Incomplete | None,
roundedCorners: Incomplete | None,
style: Incomplete | None,
clrMapOvr: ColorMapping | None,
pivotSource: PivotSource | None,
protection: Protection | None,
chart: ChartContainer,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
externalData: ExternalData | None = None,
printSettings: PrintSettings | None = None,
userShapes: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
def to_tree(self, tagname: Incomplete | None = None, idx: Incomplete | None = None, namespace: Incomplete | None = None): ...

View File

@@ -1,74 +1,73 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing import NoReturn, overload
from typing_extensions import Literal
from openpyxl.descriptors import Strict
from openpyxl.descriptors.base import Alias, Bool, Integer, String, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.nested import NestedText
from openpyxl.descriptors.serialisable import Serialisable
class NumFmt(Serialisable): # type: ignore[misc]
formatCode: Incomplete
sourceLinked: Incomplete
def __init__(self, formatCode: Incomplete | None = None, sourceLinked: bool = False) -> None: ...
class NumFmt(Serialisable):
formatCode: String[Literal[False]]
sourceLinked: Bool[Literal[False]]
def __init__(self, formatCode: str, sourceLinked: _ConvertibleToBool = False) -> None: ...
class NumberValueDescriptor(NestedText):
allow_none: bool
expected_type: Incomplete
def __set__(self, instance, value) -> None: ...
expected_type: type[Incomplete]
def __set__(self, instance: Serialisable | Strict, value) -> None: ... # type: ignore[override]
class NumVal(Serialisable): # type: ignore[misc]
idx: Incomplete
class NumVal(Serialisable):
idx: Integer[Literal[False]]
formatCode: Incomplete
v: Incomplete
def __init__(
self, idx: Incomplete | None = None, formatCode: Incomplete | None = None, v: Incomplete | None = None
) -> None: ...
def __init__(self, idx: _ConvertibleToInt, formatCode: Incomplete | None = None, v: Incomplete | None = None) -> None: ...
class NumData(Serialisable): # type: ignore[misc]
class NumData(Serialisable):
formatCode: Incomplete
ptCount: Incomplete
pt: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self, formatCode: Incomplete | None = None, ptCount: Incomplete | None = None, pt=(), extLst: Incomplete | None = None
self, formatCode: Incomplete | None = None, ptCount: Incomplete | None = None, pt=(), extLst: Unused = None
) -> None: ...
class NumRef(Serialisable): # type: ignore[misc]
class NumRef(Serialisable):
f: Incomplete
ref: Incomplete
numCache: Incomplete
extLst: Incomplete
ref: Alias
numCache: Typed[NumData, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self, f: Incomplete | None = None, numCache: Incomplete | None = None, extLst: Incomplete | None = None
) -> None: ...
def __init__(self, f: Incomplete | None = None, numCache: NumData | None = None, extLst: Unused = None) -> None: ...
class StrVal(Serialisable):
tagname: str
idx: Incomplete
idx: Integer[Literal[False]]
v: Incomplete
def __init__(self, idx: int = 0, v: Incomplete | None = None) -> None: ...
def __init__(self, idx: _ConvertibleToInt = 0, v: Incomplete | None = None) -> None: ...
class StrData(Serialisable):
tagname: str
ptCount: Incomplete
pt: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, ptCount: Incomplete | None = None, pt=(), extLst: Incomplete | None = None) -> None: ...
def __init__(self, ptCount: Incomplete | None = None, pt=(), extLst: Unused = None) -> None: ...
class StrRef(Serialisable):
tagname: str
f: Incomplete
strCache: Incomplete
extLst: Incomplete
strCache: Typed[StrData, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self, f: Incomplete | None = None, strCache: Incomplete | None = None, extLst: Incomplete | None = None
) -> None: ...
def __init__(self, f: Incomplete | None = None, strCache: StrData | None = None, extLst: Unused = None) -> None: ...
class NumDataSource(Serialisable): # type: ignore[misc]
numRef: Incomplete
numLit: Incomplete
def __init__(self, numRef: Incomplete | None = None, numLit: Incomplete | None = None) -> None: ...
class NumDataSource(Serialisable):
numRef: Typed[NumRef, Literal[True]]
numLit: Typed[NumData, Literal[True]]
def __init__(self, numRef: NumRef | None = None, numLit: NumData | None = None) -> None: ...
class Level(Serialisable):
tagname: str
@@ -78,34 +77,39 @@ class Level(Serialisable):
class MultiLevelStrData(Serialisable):
tagname: str
ptCount: Incomplete
ptCount: Integer[Literal[True]]
lvl: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, ptCount: Incomplete | None = None, lvl=(), extLst: Incomplete | None = None) -> None: ...
def __init__(self, ptCount: _ConvertibleToInt | None = None, lvl=(), extLst: Unused = None) -> None: ...
class MultiLevelStrRef(Serialisable):
tagname: str
f: Incomplete
multiLvlStrCache: Incomplete
extLst: Incomplete
multiLvlStrCache: Typed[MultiLevelStrData, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self, f: Incomplete | None = None, multiLvlStrCache: Incomplete | None = None, extLst: Incomplete | None = None
self, f: Incomplete | None = None, multiLvlStrCache: MultiLevelStrData | None = None, extLst: Unused = None
) -> None: ...
class AxDataSource(Serialisable):
tagname: str
numRef: Incomplete
numLit: Incomplete
strRef: Incomplete
strLit: Incomplete
multiLvlStrRef: Incomplete
numRef: Typed[NumRef, Literal[True]]
numLit: Typed[NumData, Literal[True]]
strRef: Typed[StrRef, Literal[True]]
strLit: Typed[StrData, Literal[True]]
multiLvlStrRef: Typed[MultiLevelStrRef, Literal[True]]
@overload
def __init__(
self, numRef: None = None, numLit: None = None, strRef: None = None, strLit: None = None, multiLvlStrRef: None = None
) -> NoReturn: ...
@overload
def __init__(
self,
numRef: Incomplete | None = None,
numLit: Incomplete | None = None,
strRef: Incomplete | None = None,
strLit: Incomplete | None = None,
multiLvlStrRef: Incomplete | None = None,
numRef: NumRef | None = None,
numLit: NumData | None = None,
strRef: StrRef | None = None,
strLit: StrData | None = None,
multiLvlStrRef: MultiLevelStrRef | None = None,
) -> None: ...

View File

@@ -1,19 +1,22 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors import Typed
from openpyxl.chart.data_source import NumFmt
from openpyxl.descriptors import Strict, Typed
from openpyxl.descriptors.nested import NestedMinMax
from openpyxl.descriptors.serialisable import Serialisable
class NestedGapAmount(NestedMinMax):
allow_none: bool
min: int
max: int
min: float
max: float
class NestedOverlap(NestedMinMax):
allow_none: bool
min: int
max: int
min: float
max: float
class NumberFormatDescriptor(Typed):
expected_type: Incomplete
allow_none: bool
def __set__(self, instance, value) -> None: ...
class NumberFormatDescriptor(Typed[NumFmt, Incomplete]):
expected_type: type[NumFmt]
allow_none: Literal[True]
def __set__(self, instance: Serialisable | Strict, value) -> None: ...

View File

@@ -1,22 +1,27 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.data_source import NumDataSource
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class ErrorBars(Serialisable):
tagname: str
errDir: Incomplete
direction: Incomplete
direction: Alias
errBarType: Incomplete
style: Incomplete
style: Alias
errValType: Incomplete
size: Incomplete
size: Alias
noEndCap: Incomplete
plus: Incomplete
minus: Incomplete
plus: Typed[NumDataSource, Literal[True]]
minus: Typed[NumDataSource, Literal[True]]
val: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
extLst: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
@@ -24,9 +29,9 @@ class ErrorBars(Serialisable):
errBarType: str = "both",
errValType: str = "fixedVal",
noEndCap: Incomplete | None = None,
plus: Incomplete | None = None,
minus: Incomplete | None = None,
plus: NumDataSource | None = None,
minus: NumDataSource | None = None,
val: Incomplete | None = None,
spPr: Incomplete | None = None,
extLst: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
extLst: Unused = None,
) -> None: ...

View File

@@ -1,16 +1,21 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from typing_extensions import Literal
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable as Serialisable
class _DataLabelBase(Serialisable):
numFmt: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
textProperties: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
textProperties: Alias
dLblPos: Incomplete
position: Incomplete
position: Alias
showLegendKey: Incomplete
showVal: Incomplete
showCatName: Incomplete
@@ -19,13 +24,13 @@ class _DataLabelBase(Serialisable):
showBubbleSize: Incomplete
showLeaderLines: Incomplete
separator: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
numFmt: Incomplete | None = None,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
dLblPos: Incomplete | None = None,
showLegendKey: Incomplete | None = None,
showVal: Incomplete | None = None,
@@ -35,7 +40,7 @@ class _DataLabelBase(Serialisable):
showBubbleSize: Incomplete | None = None,
showLeaderLines: Incomplete | None = None,
separator: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
@property
@abstractmethod

View File

@@ -1,5 +1,8 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class ManualLayout(Serialisable):
@@ -12,10 +15,10 @@ class ManualLayout(Serialisable):
x: Incomplete
y: Incomplete
w: Incomplete
width: Incomplete
width: Alias
h: Incomplete
height: Incomplete
extLst: Incomplete
height: Alias
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
@@ -28,12 +31,12 @@ class ManualLayout(Serialisable):
y: Incomplete | None = None,
w: Incomplete | None = None,
h: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
class Layout(Serialisable):
tagname: str
manualLayout: Incomplete
extLst: Incomplete
manualLayout: Typed[ManualLayout, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, manualLayout: Incomplete | None = None, extLst: Incomplete | None = None) -> None: ...
def __init__(self, manualLayout: ManualLayout | None = None, extLst: Unused = None) -> None: ...

View File

@@ -1,38 +1,42 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.layout import Layout
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class LegendEntry(Serialisable):
tagname: str
idx: Incomplete
delete: Incomplete
txPr: Incomplete
extLst: Incomplete
txPr: Typed[RichText, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self, idx: int = 0, delete: bool = False, txPr: Incomplete | None = None, extLst: Incomplete | None = None
) -> None: ...
def __init__(self, idx: int = 0, delete: bool = False, txPr: RichText | None = None, extLst: Unused = None) -> None: ...
class Legend(Serialisable):
tagname: str
legendPos: Incomplete
position: Incomplete
position: Alias
legendEntry: Incomplete
layout: Incomplete
layout: Typed[Layout, Literal[True]]
overlay: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
textProperties: Incomplete
extLst: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
textProperties: Alias
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
legendPos: str = "r",
legendEntry=(),
layout: Incomplete | None = None,
layout: Layout | None = None,
overlay: Incomplete | None = None,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
extLst: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
extLst: Unused = None,
) -> None: ...

View File

@@ -1,5 +1,12 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from typing_extensions import Literal
from openpyxl.chart.axis import ChartLines, NumericAxis, _BaseAxis
from openpyxl.chart.label import DataLabelList
from openpyxl.chart.updown_bars import UpDownBars
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from ._chart import ChartBase
@@ -7,17 +14,17 @@ class _LineChartBase(ChartBase):
grouping: Incomplete
varyColors: Incomplete
ser: Incomplete
dLbls: Incomplete
dataLabels: Incomplete
dropLines: Incomplete
dLbls: Typed[DataLabelList, Literal[True]]
dataLabels: Alias
dropLines: Typed[ChartLines, Literal[True]]
__elements__: Incomplete
def __init__(
self,
grouping: str = "standard",
varyColors: Incomplete | None = None,
ser=(),
dLbls: Incomplete | None = None,
dropLines: Incomplete | None = None,
dLbls: DataLabelList | None = None,
dropLines: ChartLines | None = None,
**kw,
) -> None: ...
@property
@@ -31,21 +38,21 @@ class LineChart(_LineChartBase):
ser: Incomplete
dLbls: Incomplete
dropLines: Incomplete
hiLowLines: Incomplete
upDownBars: Incomplete
hiLowLines: Typed[ChartLines, Literal[True]]
upDownBars: Typed[UpDownBars, Literal[True]]
marker: Incomplete
smooth: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[_BaseAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
__elements__: Incomplete
def __init__(
self,
hiLowLines: Incomplete | None = None,
upDownBars: Incomplete | None = None,
hiLowLines: ChartLines | None = None,
upDownBars: UpDownBars | None = None,
marker: Incomplete | None = None,
smooth: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
**kw,
) -> None: ...
@@ -57,20 +64,20 @@ class LineChart3D(_LineChartBase):
dLbls: Incomplete
dropLines: Incomplete
gapDepth: Incomplete
hiLowLines: Incomplete
upDownBars: Incomplete
hiLowLines: Typed[ChartLines, Literal[True]]
upDownBars: Typed[UpDownBars, Literal[True]]
marker: Incomplete
smooth: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
z_axis: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[ExtensionList, Literal[False]]
y_axis: Typed[ExtensionList, Literal[False]]
z_axis: Typed[ExtensionList, Literal[False]]
__elements__: Incomplete
def __init__(
self,
gapDepth: Incomplete | None = None,
hiLowLines: Incomplete | None = None,
upDownBars: Incomplete | None = None,
hiLowLines: ChartLines | None = None,
upDownBars: UpDownBars | None = None,
marker: Incomplete | None = None,
smooth: Incomplete | None = None,
**kw,

View File

@@ -1,43 +1,48 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.picture import PictureOptions
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class Marker(Serialisable):
tagname: str
symbol: Incomplete
size: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
extLst: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
symbol: Incomplete | None = None,
size: Incomplete | None = None,
spPr: Incomplete | None = None,
extLst: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
extLst: Unused = None,
) -> None: ...
class DataPoint(Serialisable):
tagname: str
idx: Incomplete
invertIfNegative: Incomplete
marker: Incomplete
marker: Typed[Marker, Literal[True]]
bubble3D: Incomplete
explosion: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
pictureOptions: Incomplete
extLst: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
pictureOptions: Typed[PictureOptions, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
idx: Incomplete | None = None,
invertIfNegative: Incomplete | None = None,
marker: Incomplete | None = None,
marker: Marker | None = None,
bubble3D: Incomplete | None = None,
explosion: Incomplete | None = None,
spPr: Incomplete | None = None,
pictureOptions: Incomplete | None = None,
extLst: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
pictureOptions: PictureOptions | None = None,
extLst: Unused = None,
) -> None: ...

View File

@@ -1,6 +1,11 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from typing_extensions import Literal
from openpyxl.chart.axis import ChartLines
from openpyxl.chart.label import DataLabelList
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from ._chart import ChartBase
@@ -8,10 +13,10 @@ from ._chart import ChartBase
class _PieChartBase(ChartBase):
varyColors: Incomplete
ser: Incomplete
dLbls: Incomplete
dataLabels: Incomplete
dLbls: Typed[DataLabelList, Literal[True]]
dataLabels: Alias
__elements__: Incomplete
def __init__(self, varyColors: bool = True, ser=(), dLbls: Incomplete | None = None) -> None: ...
def __init__(self, varyColors: bool = True, ser=(), dLbls: DataLabelList | None = None) -> None: ...
@property
@abstractmethod
def tagname(self) -> str: ...
@@ -22,16 +27,16 @@ class PieChart(_PieChartBase):
ser: Incomplete
dLbls: Incomplete
firstSliceAng: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, firstSliceAng: int = 0, extLst: Incomplete | None = None, **kw) -> None: ...
def __init__(self, firstSliceAng: int = 0, extLst: Unused = None, **kw) -> None: ...
class PieChart3D(_PieChartBase):
tagname: str
varyColors: Incomplete
ser: Incomplete
dLbls: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
class DoughnutChart(_PieChartBase):
@@ -41,9 +46,9 @@ class DoughnutChart(_PieChartBase):
dLbls: Incomplete
firstSliceAng: Incomplete
holeSize: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, firstSliceAng: int = 0, holeSize: int = 10, extLst: Incomplete | None = None, **kw) -> None: ...
def __init__(self, firstSliceAng: int = 0, holeSize: int = 10, extLst: Unused = None, **kw) -> None: ...
class CustomSplit(Serialisable):
tagname: str
@@ -57,15 +62,15 @@ class ProjectedPieChart(_PieChartBase):
ser: Incomplete
dLbls: Incomplete
ofPieType: Incomplete
type: Incomplete
type: Alias
gapWidth: Incomplete
splitType: Incomplete
splitPos: Incomplete
custSplit: Incomplete
custSplit: Typed[CustomSplit, Literal[True]]
secondPieSize: Incomplete
serLines: Incomplete
join_lines: Incomplete
extLst: Incomplete
serLines: Typed[ChartLines, Literal[True]]
join_lines: Alias
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
@@ -73,9 +78,9 @@ class ProjectedPieChart(_PieChartBase):
gapWidth: Incomplete | None = None,
splitType: str = "auto",
splitPos: Incomplete | None = None,
custSplit: Incomplete | None = None,
custSplit: CustomSplit | None = None,
secondPieSize: int = 75,
serLines: Incomplete | None = None,
extLst: Incomplete | None = None,
serLines: ChartLines | None = None,
extLst: Unused = None,
**kw,
) -> None: ...

View File

@@ -1,35 +1,40 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.label import DataLabel as _DataLabel
from openpyxl.chart.marker import Marker
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class PivotSource(Serialisable):
tagname: str
name: Incomplete
fmtId: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self, name: Incomplete | None = None, fmtId: Incomplete | None = None, extLst: Incomplete | None = None
) -> None: ...
def __init__(self, name: str | None = None, fmtId: Incomplete | None = None, extLst: Unused = None) -> None: ...
class PivotFormat(Serialisable):
tagname: str
idx: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
TextBody: Incomplete
marker: Incomplete
dLbl: Incomplete
DataLabel: Incomplete
extLst: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
TextBody: Alias
marker: Typed[Marker, Literal[True]]
dLbl: Typed[_DataLabel, Literal[True]]
DataLabel: Alias
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
idx: int = 0,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
marker: Incomplete | None = None,
dLbl: Incomplete | None = None,
extLst: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
marker: Marker | None = None,
dLbl: _DataLabel | None = None,
extLst: Unused = None,
) -> None: ...

View File

@@ -1,5 +1,11 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.layout import Layout
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class DataTable(Serialisable):
@@ -8,10 +14,10 @@ class DataTable(Serialisable):
showVertBorder: Incomplete
showOutline: Incomplete
showKeys: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
extLst: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
@@ -19,18 +25,18 @@ class DataTable(Serialisable):
showVertBorder: Incomplete | None = None,
showOutline: Incomplete | None = None,
showKeys: Incomplete | None = None,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
extLst: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
extLst: Unused = None,
) -> None: ...
class PlotArea(Serialisable):
tagname: str
layout: Incomplete
dTable: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
extLst: Incomplete
layout: Typed[Layout, Literal[True]]
dTable: Typed[DataTable, Literal[True]]
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
extLst: Typed[ExtensionList, Literal[True]]
areaChart: Incomplete
area3DChart: Incomplete
lineChart: Incomplete
@@ -54,12 +60,12 @@ class PlotArea(Serialisable):
__elements__: Incomplete
def __init__(
self,
layout: Incomplete | None = None,
dTable: Incomplete | None = None,
spPr: Incomplete | None = None,
layout: Layout | None = None,
dTable: DataTable | None = None,
spPr: GraphicalProperties | None = None,
_charts=(),
_axes=(),
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
def to_tree(self, tagname: Incomplete | None = None, idx: Incomplete | None = None, namespace: Incomplete | None = None): ...
@classmethod

View File

@@ -1,29 +1,42 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Alias, Float, Typed, _ConvertibleToFloat
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.worksheet.header_footer import HeaderFooter
from openpyxl.worksheet.page import PrintPageSetup
class PageMargins(Serialisable):
tagname: str
l: Incomplete
left: Incomplete
r: Incomplete
right: Incomplete
t: Incomplete
top: Incomplete
b: Incomplete
bottom: Incomplete
header: Incomplete
footer: Incomplete
l: Float[Literal[False]]
left: Alias
r: Float[Literal[False]]
right: Alias
t: Float[Literal[False]]
top: Alias
b: Float[Literal[False]]
bottom: Alias
header: Float[Literal[False]]
footer: Float[Literal[False]]
def __init__(
self, l: float = 0.75, r: float = 0.75, t: int = 1, b: int = 1, header: float = 0.5, footer: float = 0.5
self,
l: _ConvertibleToFloat = 0.75,
r: _ConvertibleToFloat = 0.75,
t: _ConvertibleToFloat = 1,
b: _ConvertibleToFloat = 1,
header: _ConvertibleToFloat = 0.5,
footer: _ConvertibleToFloat = 0.5,
) -> None: ...
class PrintSettings(Serialisable):
tagname: str
headerFooter: Incomplete
pageMargins: Incomplete
pageSetup: Incomplete
headerFooter: Typed[HeaderFooter, Literal[True]]
pageMargins: Typed[PageMargins, Literal[True]]
pageSetup: Typed[PrintPageSetup, Literal[True]]
__elements__: Incomplete
def __init__(
self, headerFooter: Incomplete | None = None, pageMargins: Incomplete | None = None, pageSetup: Incomplete | None = None
self,
headerFooter: HeaderFooter | None = None,
pageMargins: PageMargins | None = None,
pageSetup: PrintPageSetup | None = None,
) -> None: ...

View File

@@ -1,25 +1,31 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.axis import NumericAxis, TextAxis
from openpyxl.chart.label import DataLabelList
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from ._chart import ChartBase
class RadarChart(ChartBase):
tagname: str
radarStyle: Incomplete
type: Incomplete
type: Alias
varyColors: Incomplete
ser: Incomplete
dLbls: Incomplete
dataLabels: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
dLbls: Typed[DataLabelList, Literal[True]]
dataLabels: Alias
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[TextAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
__elements__: Incomplete
def __init__(
self,
radarStyle: str = "standard",
varyColors: Incomplete | None = None,
ser=(),
dLbls: Incomplete | None = None,
extLst: Incomplete | None = None,
dLbls: DataLabelList | None = None,
extLst: Unused = None,
**kw,
) -> None: ...

View File

@@ -1,27 +1,42 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from collections.abc import Generator
from typing import overload
from typing_extensions import Literal
from openpyxl.descriptors import Strict
from openpyxl.descriptors.base import MinMax, String, _ConvertibleToInt
class DummyWorksheet:
title: Incomplete
def __init__(self, title) -> None: ...
class Reference(Strict):
min_row: Incomplete
max_row: Incomplete
min_col: Incomplete
max_col: Incomplete
range_string: Incomplete
worksheet: Incomplete
min_row: MinMax[int, Literal[False]]
max_row: MinMax[int, Literal[False]]
min_col: MinMax[int, Literal[False]]
max_col: MinMax[int, Literal[False]]
range_string: String[Literal[True]]
worksheet: Incomplete | None
@overload
def __init__(
self,
worksheet: Incomplete | None = None,
min_col: Incomplete | None = None,
min_row: Incomplete | None = None,
max_col: Incomplete | None = None,
max_row: Incomplete | None = None,
range_string: Incomplete | None = None,
*,
worksheet: Unused = None,
min_col: Unused = None,
min_row: Unused = None,
max_col: Unused = None,
max_row: Unused = None,
range_string: str,
) -> None: ...
@overload
def __init__(
self,
worksheet: Incomplete | None,
min_col: _ConvertibleToInt,
min_row: _ConvertibleToInt,
max_col: _ConvertibleToInt | None = None,
max_row: _ConvertibleToInt | None = None,
range_string: str | None = None,
) -> None: ...
def __len__(self) -> int: ...
def __eq__(self, other): ...

View File

@@ -1,4 +1,10 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.axis import NumericAxis, TextAxis
from openpyxl.chart.label import DataLabelList
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from ._chart import ChartBase as ChartBase
@@ -7,18 +13,18 @@ class ScatterChart(ChartBase):
scatterStyle: Incomplete
varyColors: Incomplete
ser: Incomplete
dLbls: Incomplete
dataLabels: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
dLbls: Typed[DataLabelList, Literal[True]]
dataLabels: Alias
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[NumericAxis | TextAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
__elements__: Incomplete
def __init__(
self,
scatterStyle: Incomplete | None = None,
varyColors: Incomplete | None = None,
ser=(),
dLbls: Incomplete | None = None,
extLst: Incomplete | None = None,
dLbls: DataLabelList | None = None,
extLst: Unused = None,
**kw,
) -> None: ...

View File

@@ -1,44 +1,54 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.data_source import AxDataSource, NumDataSource, StrRef
from openpyxl.chart.error_bar import ErrorBars
from openpyxl.chart.label import DataLabelList
from openpyxl.chart.marker import Marker
from openpyxl.chart.picture import PictureOptions
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.trendline import Trendline
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
attribute_mapping: Incomplete
class SeriesLabel(Serialisable):
tagname: str
strRef: Incomplete
strRef: Typed[StrRef, Literal[True]]
v: Incomplete
value: Incomplete
value: Alias
__elements__: Incomplete
def __init__(self, strRef: Incomplete | None = None, v: Incomplete | None = None) -> None: ...
def __init__(self, strRef: StrRef | None = None, v: Incomplete | None = None) -> None: ...
class Series(Serialisable):
tagname: str
idx: Incomplete
order: Incomplete
tx: Incomplete
title: Incomplete
spPr: Incomplete
tx: Typed[SeriesLabel, Literal[True]]
title: Alias
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Incomplete
pictureOptions: Incomplete
pictureOptions: Typed[PictureOptions, Literal[True]]
dPt: Incomplete
data_points: Incomplete
dLbls: Incomplete
labels: Incomplete
trendline: Incomplete
errBars: Incomplete
cat: Incomplete
identifiers: Incomplete
val: Incomplete
extLst: Incomplete
data_points: Alias
dLbls: Typed[DataLabelList, Literal[True]]
labels: Alias
trendline: Typed[Trendline, Literal[True]]
errBars: Typed[ErrorBars, Literal[True]]
cat: Typed[AxDataSource, Literal[True]]
identifiers: Alias
val: Typed[NumDataSource, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
invertIfNegative: Incomplete
shape: Incomplete
xVal: Incomplete
yVal: Incomplete
bubbleSize: Incomplete
zVal: Incomplete
xVal: Typed[AxDataSource, Literal[True]]
yVal: Typed[NumDataSource, Literal[True]]
bubbleSize: Typed[NumDataSource, Literal[True]]
zVal: Alias
bubble3D: Incomplete
marker: Incomplete
marker: Typed[Marker, Literal[True]]
smooth: Incomplete
explosion: Incomplete
__elements__: Incomplete
@@ -46,25 +56,25 @@ class Series(Serialisable):
self,
idx: int = 0,
order: int = 0,
tx: Incomplete | None = None,
spPr: Incomplete | None = None,
pictureOptions: Incomplete | None = None,
tx: SeriesLabel | None = None,
spPr: GraphicalProperties | None = None,
pictureOptions: PictureOptions | None = None,
dPt=(),
dLbls: Incomplete | None = None,
trendline: Incomplete | None = None,
errBars: Incomplete | None = None,
cat: Incomplete | None = None,
val: Incomplete | None = None,
dLbls: DataLabelList | None = None,
trendline: Trendline | None = None,
errBars: ErrorBars | None = None,
cat: AxDataSource | None = None,
val: NumDataSource | None = None,
invertIfNegative: Incomplete | None = None,
shape: Incomplete | None = None,
xVal: Incomplete | None = None,
yVal: Incomplete | None = None,
bubbleSize: Incomplete | None = None,
xVal: AxDataSource | None = None,
yVal: NumDataSource | None = None,
bubbleSize: NumDataSource | None = None,
bubble3D: Incomplete | None = None,
marker: Incomplete | None = None,
marker: Marker | None = None,
smooth: Incomplete | None = None,
explosion: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
def to_tree(self, tagname: Incomplete | None = None, idx: Incomplete | None = None): ... # type: ignore[override]

View File

@@ -1,37 +1,46 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Alias, NoneSet, Typed
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.fill import GradientFillProperties, PatternFillProperties
from openpyxl.drawing.geometry import CustomGeometry2D, PresetGeometry2D, Scene3D, Shape3D, Transform2D
from openpyxl.drawing.line import LineProperties
_GraphicalPropertiesBwMode: TypeAlias = Literal[
"clr", "auto", "gray", "ltGray", "invGray", "grayWhite", "blackGray", "blackWhite", "black", "white", "hidden"
]
class GraphicalProperties(Serialisable):
tagname: str
bwMode: Incomplete
xfrm: Incomplete
transform: Incomplete
custGeom: Incomplete
prstGeom: Incomplete
bwMode: NoneSet[_GraphicalPropertiesBwMode]
xfrm: Typed[Transform2D, Literal[True]]
transform: Alias
custGeom: Typed[CustomGeometry2D, Literal[True]]
prstGeom: Typed[PresetGeometry2D, Literal[True]]
noFill: Incomplete
solidFill: Incomplete
gradFill: Incomplete
pattFill: Incomplete
ln: Incomplete
line: Incomplete
scene3d: Incomplete
sp3d: Incomplete
shape3D: Incomplete
extLst: Incomplete
gradFill: Typed[GradientFillProperties, Literal[True]]
pattFill: Typed[PatternFillProperties, Literal[True]]
ln: Typed[LineProperties, Literal[True]]
line: Alias
scene3d: Typed[Scene3D, Literal[True]]
sp3d: Typed[Shape3D, Literal[True]]
shape3D: Alias
extLst: Typed[Incomplete, Literal[True]]
__elements__: Incomplete
def __init__(
self,
bwMode: Incomplete | None = None,
xfrm: Incomplete | None = None,
bwMode: _GraphicalPropertiesBwMode | Literal["none"] | None = None,
xfrm: Transform2D | None = None,
noFill: Incomplete | None = None,
solidFill: Incomplete | None = None,
gradFill: Incomplete | None = None,
pattFill: Incomplete | None = None,
gradFill: GradientFillProperties | None = None,
pattFill: PatternFillProperties | None = None,
ln: Incomplete | None = None,
scene3d: Incomplete | None = None,
custGeom: Incomplete | None = None,
prstGeom: Incomplete | None = None,
sp3d: Incomplete | None = None,
extLst: Incomplete | None = None,
scene3d: Scene3D | None = None,
custGeom: CustomGeometry2D | None = None,
prstGeom: PresetGeometry2D | None = None,
sp3d: Shape3D | None = None,
extLst: Unused = None,
) -> None: ...

View File

@@ -1,26 +1,33 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.axis import ChartLines, NumericAxis, TextAxis
from openpyxl.chart.label import DataLabelList
from openpyxl.chart.updown_bars import UpDownBars
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from ._chart import ChartBase
class StockChart(ChartBase):
tagname: str
ser: Incomplete
dLbls: Incomplete
dataLabels: Incomplete
dropLines: Incomplete
hiLowLines: Incomplete
upDownBars: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
dLbls: Typed[DataLabelList, Literal[True]]
dataLabels: Alias
dropLines: Typed[ChartLines, Literal[True]]
hiLowLines: Typed[ChartLines, Literal[True]]
upDownBars: Typed[UpDownBars, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[TextAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
__elements__: Incomplete
def __init__(
self,
ser=(),
dLbls: Incomplete | None = None,
dropLines: Incomplete | None = None,
hiLowLines: Incomplete | None = None,
upDownBars: Incomplete | None = None,
extLst: Incomplete | None = None,
dLbls: DataLabelList | None = None,
dropLines: ChartLines | None = None,
hiLowLines: ChartLines | None = None,
upDownBars: UpDownBars | None = None,
extLst: Unused = None,
**kw,
) -> None: ...

View File

@@ -1,6 +1,11 @@
from _typeshed import Incomplete
from abc import abstractmethod
from typing_extensions import Literal
from openpyxl.chart.axis import NumericAxis, SeriesAxis, TextAxis
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from ._3d import _3DBase
@@ -9,10 +14,10 @@ from ._chart import ChartBase
class BandFormat(Serialisable):
tagname: str
idx: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
__elements__: Incomplete
def __init__(self, idx: int = 0, spPr: Incomplete | None = None) -> None: ...
def __init__(self, idx: int = 0, spPr: GraphicalProperties | None = None) -> None: ...
class BandFormatList(Serialisable):
tagname: str
@@ -23,9 +28,9 @@ class BandFormatList(Serialisable):
class _SurfaceChartBase(ChartBase):
wireframe: Incomplete
ser: Incomplete
bandFmts: Incomplete
bandFmts: Typed[BandFormatList, Literal[True]]
__elements__: Incomplete
def __init__(self, wireframe: Incomplete | None = None, ser=(), bandFmts: Incomplete | None = None, **kw) -> None: ...
def __init__(self, wireframe: Incomplete | None = None, ser=(), bandFmts: BandFormatList | None = None, **kw) -> None: ...
@property
@abstractmethod
def tagname(self) -> str: ...
@@ -35,10 +40,10 @@ class SurfaceChart3D(_SurfaceChartBase, _3DBase):
wireframe: Incomplete
ser: Incomplete
bandFmts: Incomplete
extLst: Incomplete
x_axis: Incomplete
y_axis: Incomplete
z_axis: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
x_axis: Typed[TextAxis, Literal[False]]
y_axis: Typed[NumericAxis, Literal[False]]
z_axis: Typed[SeriesAxis, Literal[False]]
__elements__: Incomplete
def __init__(self, **kw) -> None: ...
@@ -47,6 +52,6 @@ class SurfaceChart(SurfaceChart3D):
wireframe: Incomplete
ser: Incomplete
bandFmts: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, **kw) -> None: ...

View File

@@ -1,23 +1,27 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.chart.data_source import StrRef
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.text import ListStyle, RichTextProperties
class RichText(Serialisable):
tagname: str
bodyPr: Incomplete
properties: Incomplete
lstStyle: Incomplete
bodyPr: Typed[RichTextProperties, Literal[False]]
properties: Alias
lstStyle: Typed[ListStyle, Literal[True]]
p: Incomplete
paragraphs: Incomplete
paragraphs: Alias
__elements__: Incomplete
def __init__(
self, bodyPr: Incomplete | None = None, lstStyle: Incomplete | None = None, p: Incomplete | None = None
self, bodyPr: RichTextProperties | None = None, lstStyle: ListStyle | None = None, p: Incomplete | None = None
) -> None: ...
class Text(Serialisable):
tagname: str
strRef: Incomplete
rich: Incomplete
strRef: Typed[StrRef, Literal[True]]
rich: Typed[RichText, Literal[True]]
__elements__: Incomplete
def __init__(self, strRef: Incomplete | None = None, rich: Incomplete | None = None) -> None: ...
def __init__(self, strRef: StrRef | None = None, rich: RichText | None = None) -> None: ...
def to_tree(self, tagname: Incomplete | None = None, idx: Incomplete | None = None, namespace: Incomplete | None = None): ...

View File

@@ -1,33 +1,39 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors import Typed
from openpyxl.chart.layout import Layout
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText, Text
from openpyxl.descriptors import Strict, Typed
from openpyxl.descriptors.base import Alias
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class Title(Serialisable):
tagname: str
tx: Incomplete
text: Incomplete
layout: Incomplete
tx: Typed[Text, Literal[True]]
text: Alias
layout: Typed[Layout, Literal[True]]
overlay: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
body: Incomplete
extLst: Incomplete
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
body: Alias
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
tx: Incomplete | None = None,
layout: Incomplete | None = None,
tx: Text | None = None,
layout: Layout | None = None,
overlay: Incomplete | None = None,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
extLst: Incomplete | None = None,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
extLst: Unused = None,
) -> None: ...
def title_maker(text): ...
class TitleDescriptor(Typed):
expected_type: Incomplete
allow_none: bool
def __set__(self, instance, value) -> None: ...
class TitleDescriptor(Typed[Title, Incomplete]):
expected_type: type[Title]
allow_none: Literal[True]
def __set__(self, instance: Serialisable | Strict, value) -> None: ...

View File

@@ -1,33 +1,40 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.data_source import NumFmt
from openpyxl.chart.layout import Layout
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText, Text
from openpyxl.descriptors.base import Alias, String, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class TrendlineLabel(Serialisable):
tagname: str
layout: Incomplete
tx: Incomplete
numFmt: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
txPr: Incomplete
textProperties: Incomplete
extLst: Incomplete
layout: Typed[Layout, Literal[True]]
tx: Typed[Text, Literal[True]]
numFmt: Typed[NumFmt, Literal[True]]
spPr: Typed[GraphicalProperties, Literal[True]]
graphicalProperties: Alias
txPr: Typed[RichText, Literal[True]]
textProperties: Alias
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
layout: Incomplete | None = None,
tx: Incomplete | None = None,
numFmt: Incomplete | None = None,
spPr: Incomplete | None = None,
txPr: Incomplete | None = None,
extLst: Incomplete | None = None,
layout: Layout | None = None,
tx: Text | None = None,
numFmt: NumFmt | None = None,
spPr: GraphicalProperties | None = None,
txPr: RichText | None = None,
extLst: Unused = None,
) -> None: ...
class Trendline(Serialisable):
tagname: str
name: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
name: String[Literal[True]]
spPr: Typed[ExtensionList, Literal[True]]
graphicalProperties: Alias
trendlineType: Incomplete
order: Incomplete
period: Incomplete
@@ -36,13 +43,13 @@ class Trendline(Serialisable):
intercept: Incomplete
dispRSqr: Incomplete
dispEq: Incomplete
trendlineLbl: Incomplete
extLst: Incomplete
trendlineLbl: Typed[ExtensionList, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
name: Incomplete | None = None,
spPr: Incomplete | None = None,
name: str | None = None,
spPr: ExtensionList | None = None,
trendlineType: str = "linear",
order: Incomplete | None = None,
period: Incomplete | None = None,
@@ -51,6 +58,6 @@ class Trendline(Serialisable):
intercept: Incomplete | None = None,
dispRSqr: Incomplete | None = None,
dispEq: Incomplete | None = None,
trendlineLbl: Incomplete | None = None,
extLst: Incomplete | None = None,
trendlineLbl: ExtensionList | None = None,
extLst: Unused = None,
) -> None: ...

View File

@@ -1,18 +1,18 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.axis import ChartLines
from openpyxl.descriptors.base import Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class UpDownBars(Serialisable):
tagname: str
gapWidth: Incomplete
upBars: Incomplete
downBars: Incomplete
extLst: Incomplete
upBars: Typed[ChartLines, Literal[True]]
downBars: Typed[ChartLines, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
gapWidth: int = 150,
upBars: Incomplete | None = None,
downBars: Incomplete | None = None,
extLst: Incomplete | None = None,
self, gapWidth: int = 150, upBars: ChartLines | None = None, downBars: ChartLines | None = None, extLst: Unused = None
) -> None: ...

View File

@@ -1,44 +1,58 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal, TypeAlias
from openpyxl.chartsheet.custom import CustomChartsheetViews
from openpyxl.chartsheet.properties import ChartsheetProperties
from openpyxl.chartsheet.protection import ChartsheetProtection
from openpyxl.chartsheet.publish import WebPublishItems
from openpyxl.chartsheet.relation import DrawingHF, SheetBackgroundPicture
from openpyxl.chartsheet.views import ChartsheetViewList
from openpyxl.descriptors.base import Alias, Set, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.workbook.child import _WorkbookChild
from openpyxl.worksheet.drawing import Drawing
from openpyxl.worksheet.header_footer import HeaderFooter as _HeaderFooter
from openpyxl.worksheet.page import PageMargins, PrintPageSetup
_ChartsheetSheetState: TypeAlias = Literal["visible", "hidden", "veryHidden"]
class Chartsheet(_WorkbookChild, Serialisable):
tagname: str
mime_type: str
sheetPr: Incomplete
sheetViews: Incomplete
sheetProtection: Incomplete
customSheetViews: Incomplete
pageMargins: Incomplete
pageSetup: Incomplete
drawing: Incomplete
drawingHF: Incomplete
picture: Incomplete
webPublishItems: Incomplete
extLst: Incomplete
sheet_state: Incomplete
headerFooter: Incomplete
HeaderFooter: Incomplete
sheetPr: Typed[ChartsheetProperties, Literal[True]]
sheetViews: Typed[ChartsheetViewList, Literal[False]]
sheetProtection: Typed[ChartsheetProtection, Literal[True]]
customSheetViews: Typed[CustomChartsheetViews, Literal[True]]
pageMargins: Typed[PageMargins, Literal[True]]
pageSetup: Typed[PrintPageSetup, Literal[True]]
drawing: Typed[Drawing, Literal[True]]
drawingHF: Typed[DrawingHF, Literal[True]]
picture: Typed[SheetBackgroundPicture, Literal[True]]
webPublishItems: Typed[WebPublishItems, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
sheet_state: Set[_ChartsheetSheetState]
headerFooter: Typed[_HeaderFooter, Literal[False]]
HeaderFooter: Alias
__elements__: Incomplete
__attrs__: Incomplete
def __init__(
self,
sheetPr: Incomplete | None = None,
sheetViews: Incomplete | None = None,
sheetProtection: Incomplete | None = None,
customSheetViews: Incomplete | None = None,
pageMargins: Incomplete | None = None,
pageSetup: Incomplete | None = None,
headerFooter: Incomplete | None = None,
drawing: Incomplete | None = None,
drawingHF: Incomplete | None = None,
picture: Incomplete | None = None,
webPublishItems: Incomplete | None = None,
extLst: Incomplete | None = None,
sheetPr: ChartsheetProperties | None = None,
sheetViews: ChartsheetViewList | None = None,
sheetProtection: ChartsheetProtection | None = None,
customSheetViews: CustomChartsheetViews | None = None,
pageMargins: PageMargins | None = None,
pageSetup: PrintPageSetup | None = None,
headerFooter: _HeaderFooter | None = None,
drawing: Unused = None,
drawingHF: DrawingHF | None = None,
picture: SheetBackgroundPicture | None = None,
webPublishItems: WebPublishItems | None = None,
extLst: Unused = None,
parent: Incomplete | None = None,
title: str = "",
sheet_state: str = "visible",
sheet_state: _ChartsheetSheetState = "visible",
) -> None: ...
def add_chart(self, chart) -> None: ...
def to_tree(self): ...

View File

@@ -1,26 +1,46 @@
from _typeshed import Incomplete
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Bool, Integer, Set, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.worksheet.header_footer import HeaderFooter
from openpyxl.worksheet.page import PageMargins, PrintPageSetup
_CustomChartsheetViewState: TypeAlias = Literal["visible", "hidden", "veryHidden"]
class CustomChartsheetView(Serialisable):
tagname: str
guid: Incomplete
scale: Incomplete
state: Incomplete
zoomToFit: Incomplete
pageMargins: Incomplete
pageSetup: Incomplete
headerFooter: Incomplete
scale: Integer[Literal[False]]
state: Set[_CustomChartsheetViewState]
zoomToFit: Bool[Literal[True]]
pageMargins: Typed[PageMargins, Literal[True]]
pageSetup: Typed[PrintPageSetup, Literal[True]]
headerFooter: Typed[HeaderFooter, Literal[True]]
__elements__: Incomplete
@overload
def __init__(
self,
guid: Incomplete | None = None,
scale: Incomplete | None = None,
state: str = "visible",
zoomToFit: Incomplete | None = None,
pageMargins: Incomplete | None = None,
pageSetup: Incomplete | None = None,
headerFooter: Incomplete | None = None,
*,
scale: _ConvertibleToInt,
state: _CustomChartsheetViewState = "visible",
zoomToFit: _ConvertibleToBool | None = None,
pageMargins: PageMargins | None = None,
pageSetup: PrintPageSetup | None = None,
headerFooter: HeaderFooter | None = None,
) -> None: ...
@overload
def __init__(
self,
guid: Incomplete | None,
scale: _ConvertibleToInt,
state: _CustomChartsheetViewState = "visible",
zoomToFit: _ConvertibleToBool | None = None,
pageMargins: PageMargins | None = None,
pageSetup: PrintPageSetup | None = None,
headerFooter: HeaderFooter | None = None,
) -> None: ...
class CustomChartsheetViews(Serialisable):

View File

@@ -1,13 +1,16 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Bool, String, Typed, _ConvertibleToBool
from openpyxl.descriptors.serialisable import Serialisable as Serialisable
from openpyxl.styles.colors import Color
class ChartsheetProperties(Serialisable):
tagname: str
published: Incomplete
codeName: Incomplete
tabColor: Incomplete
published: Bool[Literal[True]]
codeName: String[Literal[True]]
tabColor: Typed[Color, Literal[True]]
__elements__: Incomplete
def __init__(
self, published: Incomplete | None = None, codeName: Incomplete | None = None, tabColor: Incomplete | None = None
self, published: _ConvertibleToBool | None = None, codeName: str | None = None, tabColor: Color | None = None
) -> None: ...

View File

@@ -1,25 +1,27 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Bool, Integer, String, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.worksheet.protection import _Protected
class ChartsheetProtection(Serialisable, _Protected):
tagname: str
algorithmName: Incomplete
algorithmName: String[Literal[True]]
hashValue: Incomplete
saltValue: Incomplete
spinCount: Incomplete
content: Incomplete
objects: Incomplete
spinCount: Integer[Literal[True]]
content: Bool[Literal[True]]
objects: Bool[Literal[True]]
__attrs__: Incomplete
password: Incomplete
def __init__(
self,
content: Incomplete | None = None,
objects: Incomplete | None = None,
content: _ConvertibleToBool | None = None,
objects: _ConvertibleToBool | None = None,
hashValue: Incomplete | None = None,
spinCount: Incomplete | None = None,
spinCount: _ConvertibleToInt | None = None,
saltValue: Incomplete | None = None,
algorithmName: Incomplete | None = None,
algorithmName: str | None = None,
password: Incomplete | None = None,
) -> None: ...

View File

@@ -1,32 +1,53 @@
from _typeshed import Incomplete
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Bool, Integer, Set, String, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
_WebPublishItemSourceType: TypeAlias = Literal[
"sheet", "printArea", "autoFilter", "range", "chart", "pivotTable", "query", "label"
]
class WebPublishItem(Serialisable):
tagname: str
id: Incomplete
divId: Incomplete
sourceType: Incomplete
sourceRef: Incomplete
sourceObject: Incomplete
destinationFile: Incomplete
title: Incomplete
autoRepublish: Incomplete
id: Integer[Literal[False]]
divId: String[Literal[False]]
sourceType: Set[_WebPublishItemSourceType]
sourceRef: String[Literal[False]]
sourceObject: String[Literal[True]]
destinationFile: String[Literal[False]]
title: String[Literal[True]]
autoRepublish: Bool[Literal[True]]
@overload
def __init__(
self,
id: Incomplete | None = None,
divId: Incomplete | None = None,
sourceType: Incomplete | None = None,
sourceRef: Incomplete | None = None,
sourceObject: Incomplete | None = None,
destinationFile: Incomplete | None = None,
title: Incomplete | None = None,
autoRepublish: Incomplete | None = None,
id: _ConvertibleToInt,
divId: str,
sourceType: _WebPublishItemSourceType,
sourceRef: str,
sourceObject: str | None = None,
*,
destinationFile: str,
title: str | None = None,
autoRepublish: _ConvertibleToBool | None = None,
) -> None: ...
@overload
def __init__(
self,
id: _ConvertibleToInt,
divId: str,
sourceType: _WebPublishItemSourceType,
sourceRef: str,
sourceObject: str | None,
destinationFile: str,
title: str | None = None,
autoRepublish: _ConvertibleToBool | None = None,
) -> None: ...
class WebPublishItems(Serialisable):
tagname: str
count: Incomplete
count: Integer[Literal[True]]
webPublishItem: Incomplete
__elements__: Incomplete
def __init__(self, count: Incomplete | None = None, webPublishItem: Incomplete | None = None) -> None: ...
def __init__(self, count: _ConvertibleToInt | None = None, webPublishItem: Incomplete | None = None) -> None: ...

View File

@@ -1,5 +1,7 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Alias, Integer, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
class SheetBackgroundPicture(Serialisable):
@@ -9,61 +11,61 @@ class SheetBackgroundPicture(Serialisable):
class DrawingHF(Serialisable):
id: Incomplete
lho: Incomplete
leftHeaderOddPages: Incomplete
lhe: Incomplete
leftHeaderEvenPages: Incomplete
lhf: Incomplete
leftHeaderFirstPage: Incomplete
cho: Incomplete
centerHeaderOddPages: Incomplete
che: Incomplete
centerHeaderEvenPages: Incomplete
chf: Incomplete
centerHeaderFirstPage: Incomplete
rho: Incomplete
rightHeaderOddPages: Incomplete
rhe: Incomplete
rightHeaderEvenPages: Incomplete
rhf: Incomplete
rightHeaderFirstPage: Incomplete
lfo: Incomplete
leftFooterOddPages: Incomplete
lfe: Incomplete
leftFooterEvenPages: Incomplete
lff: Incomplete
leftFooterFirstPage: Incomplete
cfo: Incomplete
centerFooterOddPages: Incomplete
cfe: Incomplete
centerFooterEvenPages: Incomplete
cff: Incomplete
centerFooterFirstPage: Incomplete
rfo: Incomplete
rightFooterOddPages: Incomplete
rfe: Incomplete
rightFooterEvenPages: Incomplete
rff: Incomplete
rightFooterFirstPage: Incomplete
lho: Integer[Literal[True]]
leftHeaderOddPages: Alias
lhe: Integer[Literal[True]]
leftHeaderEvenPages: Alias
lhf: Integer[Literal[True]]
leftHeaderFirstPage: Alias
cho: Integer[Literal[True]]
centerHeaderOddPages: Alias
che: Integer[Literal[True]]
centerHeaderEvenPages: Alias
chf: Integer[Literal[True]]
centerHeaderFirstPage: Alias
rho: Integer[Literal[True]]
rightHeaderOddPages: Alias
rhe: Integer[Literal[True]]
rightHeaderEvenPages: Alias
rhf: Integer[Literal[True]]
rightHeaderFirstPage: Alias
lfo: Integer[Literal[True]]
leftFooterOddPages: Alias
lfe: Integer[Literal[True]]
leftFooterEvenPages: Alias
lff: Integer[Literal[True]]
leftFooterFirstPage: Alias
cfo: Integer[Literal[True]]
centerFooterOddPages: Alias
cfe: Integer[Literal[True]]
centerFooterEvenPages: Alias
cff: Integer[Literal[True]]
centerFooterFirstPage: Alias
rfo: Integer[Literal[True]]
rightFooterOddPages: Alias
rfe: Integer[Literal[True]]
rightFooterEvenPages: Alias
rff: Integer[Literal[True]]
rightFooterFirstPage: Alias
def __init__(
self,
id: Incomplete | None = None,
lho: Incomplete | None = None,
lhe: Incomplete | None = None,
lhf: Incomplete | None = None,
cho: Incomplete | None = None,
che: Incomplete | None = None,
chf: Incomplete | None = None,
rho: Incomplete | None = None,
rhe: Incomplete | None = None,
rhf: Incomplete | None = None,
lfo: Incomplete | None = None,
lfe: Incomplete | None = None,
lff: Incomplete | None = None,
cfo: Incomplete | None = None,
cfe: Incomplete | None = None,
cff: Incomplete | None = None,
rfo: Incomplete | None = None,
rfe: Incomplete | None = None,
rff: Incomplete | None = None,
lho: _ConvertibleToInt | None = None,
lhe: _ConvertibleToInt | None = None,
lhf: _ConvertibleToInt | None = None,
cho: _ConvertibleToInt | None = None,
che: _ConvertibleToInt | None = None,
chf: _ConvertibleToInt | None = None,
rho: _ConvertibleToInt | None = None,
rhe: _ConvertibleToInt | None = None,
rhf: _ConvertibleToInt | None = None,
lfo: _ConvertibleToInt | None = None,
lfe: _ConvertibleToInt | None = None,
lff: _ConvertibleToInt | None = None,
cfo: _ConvertibleToInt | None = None,
cfe: _ConvertibleToInt | None = None,
cff: _ConvertibleToInt | None = None,
rfo: _ConvertibleToInt | None = None,
rfe: _ConvertibleToInt | None = None,
rff: _ConvertibleToInt | None = None,
) -> None: ...

View File

@@ -1,27 +1,30 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors.base import Bool, Integer, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class ChartsheetView(Serialisable):
tagname: str
tabSelected: Incomplete
zoomScale: Incomplete
workbookViewId: Incomplete
zoomToFit: Incomplete
extLst: Incomplete
tabSelected: Bool[Literal[True]]
zoomScale: Integer[Literal[True]]
workbookViewId: Integer[Literal[False]]
zoomToFit: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
tabSelected: Incomplete | None = None,
zoomScale: Incomplete | None = None,
workbookViewId: int = 0,
zoomToFit: Incomplete | None = True,
extLst: Incomplete | None = None,
tabSelected: _ConvertibleToBool | None = None,
zoomScale: _ConvertibleToInt | None = None,
workbookViewId: _ConvertibleToInt = 0,
zoomToFit: _ConvertibleToBool | None = True,
extLst: Unused = None,
) -> None: ...
class ChartsheetViewList(Serialisable):
tagname: str
sheetView: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, sheetView: Incomplete | None = None, extLst: Incomplete | None = None) -> None: ...
def __init__(self, sheetView: Incomplete | None = None, extLst: Unused = None) -> None: ...

View File

@@ -1,9 +1,10 @@
from _typeshed import Incomplete
from openpyxl.descriptors.base import Alias
from openpyxl.descriptors.serialisable import Serialisable
class AuthorList(Serialisable):
tagname: str
author: Incomplete
authors: Incomplete
authors: Alias
def __init__(self, author=()) -> None: ...

View File

@@ -1,54 +1,87 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from collections.abc import Generator
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.cell.text import Text
from openpyxl.comments.author import AuthorList
from openpyxl.descriptors.base import Bool, Integer, Set, String, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.worksheet.ole import ObjectAnchor
_PropertiesTextHAlign: TypeAlias = Literal["left", "center", "right", "justify", "distributed"]
_PropertiesTextVAlign: TypeAlias = Literal["top", "center", "bottom", "justify", "distributed"]
class Properties(Serialisable):
locked: Incomplete
defaultSize: Incomplete
disabled: Incomplete
uiObject: Incomplete
autoFill: Incomplete
autoLine: Incomplete
altText: Incomplete
textHAlign: Incomplete
textVAlign: Incomplete
lockText: Incomplete
justLastX: Incomplete
autoScale: Incomplete
rowHidden: Incomplete
colHidden: Incomplete
locked: Bool[Literal[True]]
defaultSize: Bool[Literal[True]]
_print: Bool[Literal[True]] # Not private. Avoids name clash
disabled: Bool[Literal[True]]
uiObject: Bool[Literal[True]]
autoFill: Bool[Literal[True]]
autoLine: Bool[Literal[True]]
altText: String[Literal[True]]
textHAlign: Set[_PropertiesTextHAlign]
textVAlign: Set[_PropertiesTextVAlign]
lockText: Bool[Literal[True]]
justLastX: Bool[Literal[True]]
autoScale: Bool[Literal[True]]
rowHidden: Bool[Literal[True]]
colHidden: Bool[Literal[True]]
__elements__: Incomplete
anchor: Incomplete
anchor: ObjectAnchor | None
@overload
def __init__(
self,
locked: Incomplete | None = None,
defaultSize: Incomplete | None = None,
_print: Incomplete | None = None,
disabled: Incomplete | None = None,
uiObject: Incomplete | None = None,
autoFill: Incomplete | None = None,
autoLine: Incomplete | None = None,
altText: Incomplete | None = None,
textHAlign: Incomplete | None = None,
textVAlign: Incomplete | None = None,
lockText: Incomplete | None = None,
justLastX: Incomplete | None = None,
autoScale: Incomplete | None = None,
rowHidden: Incomplete | None = None,
colHidden: Incomplete | None = None,
anchor: Incomplete | None = None,
locked: _ConvertibleToBool | None = None,
defaultSize: _ConvertibleToBool | None = None,
_print: _ConvertibleToBool | None = None,
disabled: _ConvertibleToBool | None = None,
uiObject: _ConvertibleToBool | None = None,
autoFill: _ConvertibleToBool | None = None,
autoLine: _ConvertibleToBool | None = None,
altText: str | None = None,
*,
textHAlign: _PropertiesTextHAlign,
textVAlign: _PropertiesTextVAlign,
lockText: _ConvertibleToBool | None = None,
justLastX: _ConvertibleToBool | None = None,
autoScale: _ConvertibleToBool | None = None,
rowHidden: _ConvertibleToBool | None = None,
colHidden: _ConvertibleToBool | None = None,
anchor: ObjectAnchor | None = None,
) -> None: ...
@overload
def __init__(
self,
locked: _ConvertibleToBool | None,
defaultSize: _ConvertibleToBool | None,
_print: _ConvertibleToBool | None,
disabled: _ConvertibleToBool | None,
uiObject: _ConvertibleToBool | None,
autoFill: _ConvertibleToBool | None,
autoLine: _ConvertibleToBool | None,
altText: str | None,
textHAlign: _PropertiesTextHAlign,
textVAlign: _PropertiesTextVAlign,
lockText: _ConvertibleToBool | None = None,
justLastX: _ConvertibleToBool | None = None,
autoScale: _ConvertibleToBool | None = None,
rowHidden: _ConvertibleToBool | None = None,
colHidden: _ConvertibleToBool | None = None,
anchor: ObjectAnchor | None = None,
) -> None: ...
class CommentRecord(Serialisable):
tagname: str
ref: Incomplete
authorId: Incomplete
ref: String[Literal[False]]
authorId: Integer[Literal[False]]
guid: Incomplete
shapeId: Incomplete
text: Incomplete
commentPr: Incomplete
author: Incomplete
shapeId: Integer[Literal[True]]
text: Typed[Text, Literal[False]]
commentPr: Typed[Properties, Literal[True]]
author: String[Literal[True]]
__elements__: Incomplete
__attrs__: Incomplete
height: Incomplete
@@ -56,12 +89,12 @@ class CommentRecord(Serialisable):
def __init__(
self,
ref: str = "",
authorId: int = 0,
authorId: _ConvertibleToInt = 0,
guid: Incomplete | None = None,
shapeId: int = 0,
text: Incomplete | None = None,
commentPr: Incomplete | None = None,
author: Incomplete | None = None,
shapeId: _ConvertibleToInt | None = 0,
text: Text | None = None,
commentPr: Properties | None = None,
author: str | None = None,
height: int = 79,
width: int = 144,
) -> None: ...
@@ -72,14 +105,12 @@ class CommentRecord(Serialisable):
class CommentSheet(Serialisable):
tagname: str
authors: Incomplete
authors: Typed[AuthorList, Literal[False]]
commentList: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
mime_type: str
__elements__: Incomplete
def __init__(
self, authors: Incomplete | None = None, commentList: Incomplete | None = None, extLst: Incomplete | None = None
) -> None: ...
def __init__(self, authors: AuthorList, commentList: Incomplete | None = None, extLst: Unused = None) -> None: ...
def to_tree(self): ...
@property
def comments(self) -> Generator[Incomplete, None, None]: ...

View File

@@ -8,4 +8,3 @@ class MetaSerialisable(type):
def __new__(cls, clsname, bases, methods): ...
class Strict(metaclass=MetaStrict): ...
class _Serialiasable(metaclass=MetaSerialisable): ...

View File

@@ -1,85 +1,359 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, ReadableBuffer, SupportsTrunc, Unused
from collections.abc import Iterable, Sized
from datetime import datetime
from re import Pattern
from typing import Any, Generic, SupportsFloat, SupportsInt, TypeVar, overload
from typing_extensions import Literal, SupportsIndex, TypeAlias
class Descriptor:
name: Incomplete
def __init__(self, name: Incomplete | None = None, **kw) -> None: ...
def __set__(self, instance, value) -> None: ...
from openpyxl.descriptors import Strict
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.fill import Blip
from openpyxl.worksheet.cell_range import CellRange, MultiCellRange
class Typed(Descriptor):
expected_type: Incomplete
allow_none: bool
_T = TypeVar("_T")
_P = TypeVar("_P", str, ReadableBuffer)
_N = TypeVar("_N", bound=bool)
_L = TypeVar("_L", bound=Sized)
_M = TypeVar("_M", int, float)
_ExpectedTypeParam: TypeAlias = type[_T] | tuple[type[_T], ...]
_ConvertibleToMultiCellRange: TypeAlias = MultiCellRange | str | Iterable[CellRange]
_ConvertibleToInt: TypeAlias = int | str | ReadableBuffer | SupportsInt | SupportsIndex | SupportsTrunc
_ConvertibleToFloat: TypeAlias = float | SupportsFloat | SupportsIndex | str | ReadableBuffer
# Since everything is convertible to a bool, this restricts to only intended expected types
_ConvertibleToBool: TypeAlias = bool | str | int | None # True | False | "true" | "t" | "false" | "f" | 1 | 0 | None
class Descriptor(Generic[_T]):
name: str | None
def __init__(self, name: str | None = None, **kw: object) -> None: ...
def __get__(self, instance: Serialisable | Strict, cls: type | None) -> _T: ...
def __set__(self, instance: Serialisable | Strict, value: _T) -> None: ...
class Typed(Descriptor[_T], Generic[_T, _N]):
expected_type: type[_T]
allow_none: _N
nested: bool
__doc__: Incomplete
def __init__(self, *args, **kw) -> None: ...
def __set__(self, instance, value) -> None: ...
class Convertible(Typed):
def __set__(self, instance, value) -> None: ...
@overload
def __init__(
self: Typed[_T, Literal[True]],
name: str | None = None,
*,
expected_type: _ExpectedTypeParam[_T],
allow_none: Literal[True],
nested: bool = False,
) -> None: ...
@overload
def __init__(
self: Typed[_T, Literal[False]],
name: str | None = None,
*,
expected_type: _ExpectedTypeParam[_T],
allow_none: Literal[False] = False,
nested: bool = False,
) -> None: ...
@overload
def __get__(self: Typed[_T, Literal[True]], instance: Serialisable | Strict, cls: type | None = None) -> _T | None: ...
@overload
def __get__(self: Typed[_T, Literal[False]], instance: Serialisable | Strict, cls: type | None = None) -> _T: ...
@overload
def __set__(self: Typed[_T, Literal[True]], instance: Serialisable | Strict, value: _T | None) -> None: ...
@overload
def __set__(self: Typed[_T, Literal[False]], instance: Serialisable | Strict, value: _T) -> None: ...
class Max(Convertible):
expected_type: Incomplete
allow_none: bool
def __init__(self, **kw) -> None: ...
def __set__(self, instance, value) -> None: ...
class Convertible(Typed[_T, _N]):
@overload
def __init__(
self: Convertible[_T, Literal[True]],
name: str | None = None,
*,
expected_type: _ExpectedTypeParam[_T],
allow_none: Literal[True],
) -> None: ...
@overload
def __init__(
self: Convertible[_T, Literal[False]],
name: str | None = None,
*,
expected_type: _ExpectedTypeParam[_T],
allow_none: Literal[False] = False,
) -> None: ...
# NOTE: It is currently impossible to make a generic based on the parameter type of another generic
# So we implement explicitely the types used internally
# MultiCellRange
@overload
def __set__(
self: Convertible[MultiCellRange, Literal[True]],
instance: Serialisable | Strict,
value: _ConvertibleToMultiCellRange | None,
) -> None: ...
@overload
def __set__(
self: Convertible[MultiCellRange, Literal[False]], instance: Serialisable | Strict, value: _ConvertibleToMultiCellRange
) -> None: ...
# str | Blip
@overload
def __set__(
self: Convertible[str, bool] | Convertible[Blip, bool],
instance: Serialisable | Strict,
value: object, # Not[None] when _N = False
) -> None: ...
# bool
@overload
def __set__(self: Convertible[bool, bool], instance: Serialisable | Strict, value: _ConvertibleToBool) -> None: ...
# int
@overload
def __set__(
self: Convertible[int, Literal[True]], instance: Serialisable | Strict, value: _ConvertibleToInt | None
) -> None: ...
@overload
def __set__(self: Convertible[int, Literal[False]], instance: Serialisable | Strict, value: _ConvertibleToInt) -> None: ...
# float
@overload
def __set__(
self: Convertible[float, Literal[True]], instance: Serialisable | Strict, value: _ConvertibleToFloat | None
) -> None: ...
@overload
def __set__(
self: Convertible[float, Literal[False]], instance: Serialisable | Strict, value: _ConvertibleToFloat
) -> None: ...
# Anything else
@overload
def __set__(self: Convertible[_T, Literal[True]], instance: Serialisable | Strict, value: _T | int | Any | None) -> None: ...
class Min(Convertible):
expected_type: Incomplete
allow_none: bool
def __init__(self, **kw) -> None: ...
def __set__(self, instance, value) -> None: ...
class Max(Convertible[_M, _N]):
expected_type: type[_M]
allow_none: _N
max: float
@overload
def __init__(
self: Max[int, Literal[True]], *, expected_type: _ExpectedTypeParam[int], allow_none: Literal[True], max: float
) -> None: ...
@overload
def __init__(
self: Max[int, Literal[False]], *, expected_type: _ExpectedTypeParam[int], allow_none: Literal[False] = False, max: float
) -> None: ...
# mypy can't infer type from `expected_type = float` (pyright can), so we have to add extra overloads
@overload
def __init__(
self: Max[float, Literal[True]], *, expected_type: _ExpectedTypeParam[float] = ..., allow_none: Literal[True], max: float
) -> None: ...
@overload
def __init__(
self: Max[float, Literal[False]],
*,
expected_type: _ExpectedTypeParam[float] = ...,
allow_none: Literal[False] = False,
max: float,
) -> None: ...
@overload # type:ignore[override] # Different restrictions
def __set__(self: Max[int, Literal[True]], instance: Serialisable | Strict, value: _ConvertibleToInt | None) -> None: ...
@overload
def __set__(self: Max[int, Literal[False]], instance: Serialisable | Strict, value: _ConvertibleToInt) -> None: ...
@overload
def __set__(self: Max[float, Literal[True]], instance: Serialisable | Strict, value: _ConvertibleToFloat | None) -> None: ...
@overload
def __set__(self: Max[float, Literal[False]], instance: Serialisable | Strict, value: _ConvertibleToFloat) -> None: ...
class MinMax(Min, Max): ...
class Min(Convertible[_M, _N]):
expected_type: type[_M]
allow_none: _N
min: float
@overload
def __init__(
self: Min[int, Literal[True]], *, expected_type: _ExpectedTypeParam[int], allow_none: Literal[True], min: float
) -> None: ...
@overload
def __init__(
self: Min[int, Literal[False]], *, expected_type: _ExpectedTypeParam[int], allow_none: Literal[False] = False, min: float
) -> None: ...
# mypy can't infer type from `expected_type = float` (pyright can), so we have to add extra overloads
@overload
def __init__(
self: Min[float, Literal[True]], *, expected_type: _ExpectedTypeParam[float] = ..., allow_none: Literal[True], min: float
) -> None: ...
@overload
def __init__(
self: Min[float, Literal[False]],
*,
expected_type: _ExpectedTypeParam[float] = ...,
allow_none: Literal[False] = False,
min: float,
) -> None: ...
@overload # type:ignore[override] # Different restrictions
def __set__(self: Min[int, Literal[True]], instance: Serialisable | Strict, value: _ConvertibleToInt | None) -> None: ...
@overload
def __set__(self: Min[int, Literal[False]], instance: Serialisable | Strict, value: _ConvertibleToInt) -> None: ...
@overload
def __set__(self: Min[float, Literal[True]], instance: Serialisable | Strict, value: _ConvertibleToFloat | None) -> None: ...
@overload
def __set__(self: Min[float, Literal[False]], instance: Serialisable | Strict, value: _ConvertibleToFloat) -> None: ...
class Set(Descriptor):
__doc__: Incomplete
def __init__(self, name: Incomplete | None = None, **kw) -> None: ...
def __set__(self, instance, value) -> None: ...
class MinMax(Min[_M, _N], Max[_M, _N]):
expected_type: type[_M]
allow_none: _N
@overload
def __init__(
self: MinMax[int, Literal[True]],
*,
expected_type: _ExpectedTypeParam[int],
allow_none: Literal[True],
min: float,
max: float,
) -> None: ...
@overload
def __init__(
self: MinMax[int, Literal[False]],
*,
expected_type: _ExpectedTypeParam[int],
allow_none: Literal[False] = False,
min: float,
max: float,
) -> None: ...
# mypy can't infer type from `expected_type = float` (pyright can), so we have to add extra overloads
@overload
def __init__(
self: MinMax[float, Literal[True]],
*,
expected_type: _ExpectedTypeParam[float] = ...,
allow_none: Literal[True],
min: float,
max: float,
) -> None: ...
@overload
def __init__(
self: MinMax[float, Literal[False]],
*,
expected_type: _ExpectedTypeParam[float] = ...,
allow_none: Literal[False] = False,
min: float,
max: float,
) -> None: ...
class NoneSet(Set):
def __init__(self, name: Incomplete | None = None, **kw) -> None: ...
def __set__(self, instance, value) -> None: ...
class Set(Descriptor[_T]):
__doc__: str
values: Iterable[_T]
def __init__(self, name: str | None = None, *, values: Iterable[_T]) -> None: ...
def __set__(self, instance: Serialisable | Strict, value: _T) -> None: ...
class Integer(Convertible):
expected_type: Incomplete
class NoneSet(Set[_T | None]):
def __init__(self, name: str | None = None, *, values: Iterable[_T | None]) -> None: ...
def __set__(self, instance: Serialisable | Strict, value: _T | Literal["none"] | None) -> None: ...
class Float(Convertible):
expected_type: Incomplete
class Integer(Convertible[int, _N]):
allow_none: _N
expected_type: type[int]
@overload
def __init__(self: Integer[Literal[True]], name: str | None = None, *, allow_none: Literal[True]) -> None: ...
@overload
def __init__(self: Integer[Literal[False]], name: str | None = None, *, allow_none: Literal[False] = False) -> None: ...
class Bool(Convertible):
expected_type: Incomplete
def __set__(self, instance, value) -> None: ...
class Float(Convertible[float, _N]):
allow_none: _N
expected_type: type[float]
@overload
def __init__(self: Float[Literal[True]], name: str | None = None, *, allow_none: Literal[True]) -> None: ...
@overload
def __init__(self: Float[Literal[False]], name: str | None = None, *, allow_none: Literal[False] = False) -> None: ...
class String(Typed):
expected_type: Incomplete
class Bool(Convertible[bool, _N]):
expected_type: type[bool]
allow_none: _N
@overload
def __init__(self: Bool[Literal[True]], name: str | None = None, *, allow_none: Literal[True]) -> None: ...
@overload
def __init__(self: Bool[Literal[False]], name: str | None = None, *, allow_none: Literal[False] = False) -> None: ...
def __set__( # type:ignore[override] # Different restrictions
self: Bool[Literal[True]], instance: Serialisable | Strict, value: _ConvertibleToBool | None
) -> None: ...
class Text(String, Convertible): ...
class String(Typed[str, _N]):
allow_none: _N
expected_type: type[str]
@overload
def __init__(self: String[Literal[True]], name: str | None = None, *, allow_none: Literal[True]) -> None: ...
@overload
def __init__(self: String[Literal[False]], name: str | None = None, *, allow_none: Literal[False] = False) -> None: ...
class ASCII(Typed):
expected_type: Incomplete
class Text(String[_N], Convertible[str, _N]): ... # unused
class Tuple(Typed):
expected_type: Incomplete
class ASCII(Typed[bytes, _N]): # unused
expected_type: type[bytes]
def __init__(self, name: str | None = None, *, allow_none: bool = False) -> None: ...
class Length(Descriptor):
def __init__(self, name: Incomplete | None = None, **kw) -> None: ...
def __set__(self, instance, value) -> None: ...
class Tuple(Typed[tuple[Any, ...], _N]): # unused
expected_type: type[tuple[Any, ...]]
def __init__(self, name: str | None = None, *, allow_none: bool = False) -> None: ...
class Default(Typed):
def __init__(self, name: Incomplete | None = None, **kw) -> None: ...
def __call__(self): ...
class Length(Descriptor[_L]):
def __init__(self, name: Unused = None, *, length: int) -> None: ...
def __set__(self, instance: Serialisable | Strict, value: _L) -> None: ...
class Alias(Descriptor):
alias: Incomplete
def __init__(self, alias) -> None: ...
def __set__(self, instance, value) -> None: ...
def __get__(self, instance, cls): ...
class Default(Typed[_T, _N]): # unused
def __init__(
self, name: Unused = None, *, expected_type: _ExpectedTypeParam[_T], allow_none: bool = False, defaults: Unused = {}
) -> None: ...
def __call__(self) -> _T: ...
class MatchPattern(Descriptor):
allow_none: bool
test_pattern: Incomplete
def __init__(self, name: Incomplete | None = None, **kw) -> None: ...
def __set__(self, instance, value) -> None: ...
# Note: Aliases types can't be infered. Anyway an alias means there's another option
# incomplete: Make it generic with explicit getter/setter type arguments ?
class Alias(Descriptor[Incomplete]):
alias: str
def __init__(self, alias: str) -> None: ...
def __set__(self, instance: Serialisable | Strict, value: Incomplete) -> None: ...
def __get__(self, instance: Serialisable | Strict, cls: Unused): ...
class DateTime(Typed):
expected_type: Incomplete
def __set__(self, instance, value) -> None: ...
class MatchPattern(Descriptor[_P], Generic[_P, _N]):
allow_none: _N
test_pattern: Pattern[bytes] | Pattern[str]
pattern: str | Pattern[str] | bytes | Pattern[bytes]
@overload # str
def __init__(
self: MatchPattern[str, Literal[True]], name: str | None = None, *, pattern: str | Pattern[str], allow_none: Literal[True]
) -> None: ...
@overload # str | None
def __init__(
self: MatchPattern[str, Literal[False]],
name: str | None = None,
*,
pattern: str | Pattern[str],
allow_none: Literal[False] = False,
) -> None: ...
@overload # bytes
def __init__(
self: MatchPattern[ReadableBuffer, Literal[True]],
name: str | None = None,
*,
pattern: bytes | Pattern[bytes],
allow_none: Literal[True],
) -> None: ...
@overload # bytes | None
def __init__(
self: MatchPattern[ReadableBuffer, Literal[False]],
name: str | None = None,
*,
pattern: bytes | Pattern[bytes],
allow_none: Literal[False] = False,
) -> None: ...
@overload
def __get__(self: MatchPattern[_P, Literal[True]], instance: Serialisable | Strict, cls: type | None = None) -> _P | None: ...
@overload
def __get__(self: MatchPattern[_P, Literal[False]], instance: Serialisable | Strict, cls: type | None = None) -> _P: ...
@overload
def __set__(self: MatchPattern[_P, Literal[True]], instance: Serialisable | Strict, value: _P | None) -> None: ...
@overload
def __set__(self: MatchPattern[_P, Literal[False]], instance: Serialisable | Strict, value: _P) -> None: ...
class DateTime(Typed[datetime, _N]):
allow_none: _N
expected_type: type[datetime]
@overload
def __init__(self: DateTime[Literal[True]], name: str | None = None, *, allow_none: Literal[True]) -> None: ...
@overload
def __init__(self: DateTime[Literal[False]], name: str | None = None, *, allow_none: Literal[False] = False) -> None: ...
@overload
def __set__(self: DateTime[Literal[True]], instance: Serialisable | Strict, value: datetime | str | None) -> None: ...
@overload
def __set__(self: DateTime[Literal[False]], instance: Serialisable | Strict, value: datetime | str) -> None: ...

View File

@@ -1,46 +1,51 @@
from _typeshed import Incomplete
from typing import TypeVar
from typing_extensions import Literal
from . import Integer, MatchPattern, MinMax, String
from . import Integer, MatchPattern, MinMax, Strict, String
from .serialisable import Serialisable
class HexBinary(MatchPattern):
_N = TypeVar("_N", bound=bool)
_M = TypeVar("_M", int, float)
class HexBinary(MatchPattern[str, Incomplete]):
pattern: str
class UniversalMeasure(MatchPattern):
class UniversalMeasure(MatchPattern[str, Incomplete]):
pattern: str
class TextPoint(MinMax):
expected_type: Incomplete
min: int
max: int
class TextPoint(MinMax[_M, _N]):
expected_type: type[_M]
min: float
max: float
Coordinate = Integer
class Percentage(MinMax):
class Percentage(MinMax[float, Incomplete]):
pattern: str
min: int
max: int
def __set__(self, instance, value) -> None: ...
min: float
max: float
def __set__(self, instance: Serialisable | Strict, value: Incomplete) -> None: ...
class Extension(Serialisable):
uri: Incomplete
def __init__(self, uri: Incomplete | None = None) -> None: ...
uri: String[Literal[False]]
def __init__(self, uri: str) -> None: ...
class ExtensionList(Serialisable):
ext: Incomplete
def __init__(self, ext=()) -> None: ...
class Relation(String):
class Relation(String[Incomplete]):
namespace: Incomplete
allow_none: bool
class Base64Binary(MatchPattern):
class Base64Binary(MatchPattern[str, Incomplete]):
pattern: str
class Guid(MatchPattern):
class Guid(MatchPattern[str, Incomplete]):
pattern: str
class CellRange(MatchPattern):
class CellRange(MatchPattern[str, Incomplete]):
pattern: str
allow_none: bool
def __set__(self, instance, value) -> None: ...
def __set__(self, instance: Serialisable | Strict, value) -> None: ...

View File

@@ -1,17 +1,21 @@
from _typeshed import Incomplete
from .base import Bool, Convertible, Descriptor, Float, Integer, MinMax, NoneSet, Set, String
from openpyxl.descriptors import Strict
from openpyxl.descriptors.base import Bool, Convertible, Descriptor, Float, Integer, MinMax, NoneSet, Set, String
from openpyxl.descriptors.serialisable import Serialisable
class Nested(Descriptor):
# NOTE: # type: ignore[misc]: Class does not reimplement the relevant methods, so runtime also has incompatible supertypes
class Nested(Descriptor[Incomplete]):
nested: bool
attribute: str
def __set__(self, instance, value) -> None: ...
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
def from_tree(self, node): ...
def to_tree(
self, tagname: Incomplete | None = None, value: Incomplete | None = None, namespace: Incomplete | None = None
): ...
class NestedValue(Nested, Convertible): ...
class NestedValue(Nested, Convertible[Incomplete, Incomplete]): ... # type: ignore[misc]
class NestedText(NestedValue):
def from_tree(self, node): ...
@@ -19,18 +23,18 @@ class NestedText(NestedValue):
self, tagname: Incomplete | None = None, value: Incomplete | None = None, namespace: Incomplete | None = None
): ...
class NestedFloat(NestedValue, Float): ...
class NestedInteger(NestedValue, Integer): ...
class NestedString(NestedValue, String): ...
class NestedFloat(NestedValue, Float[Incomplete]): ... # type: ignore[misc]
class NestedInteger(NestedValue, Integer[Incomplete]): ... # type: ignore[misc]
class NestedString(NestedValue, String[Incomplete]): ... # type: ignore[misc]
class NestedBool(NestedValue, Bool):
class NestedBool(NestedValue, Bool[Incomplete]): # type: ignore[misc]
def from_tree(self, node): ...
class NestedNoneSet(Nested, NoneSet): ...
class NestedSet(Nested, Set): ...
class NestedMinMax(Nested, MinMax): ...
class NestedNoneSet(Nested, NoneSet[Incomplete]): ...
class NestedSet(Nested, Set[Incomplete]): ...
class NestedMinMax(Nested, MinMax[Incomplete, Incomplete]): ... # type: ignore[misc]
class EmptyTag(Nested, Bool):
class EmptyTag(Nested, Bool[Incomplete]): # type: ignore[misc]
def from_tree(self, node): ...
def to_tree(
self, tagname: Incomplete | None = None, value: Incomplete | None = None, namespace: Incomplete | None = None

View File

@@ -1,14 +1,18 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from collections.abc import Generator
from typing_extensions import Self
from openpyxl.descriptors import Strict
from openpyxl.descriptors.serialisable import Serialisable
from .base import Alias, Descriptor
class Sequence(Descriptor):
expected_type: Incomplete
class Sequence(Descriptor[Incomplete]):
expected_type: type[Incomplete]
seq_types: Incomplete
idx_base: int
unique: bool
def __set__(self, instance, seq) -> None: ...
def __set__(self, instance: Serialisable | Strict, seq) -> None: ...
def to_tree(self, tagname, obj, namespace: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...
class ValueSequence(Sequence):
@@ -22,12 +26,12 @@ class NestedSequence(Sequence):
def from_tree(self, node): ...
class MultiSequence(Sequence):
def __set__(self, instance, seq) -> None: ...
def __set__(self, instance: Serialisable | Strict, seq) -> None: ...
def to_tree(self, tagname, obj, namespace: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...
class MultiSequencePart(Alias):
expected_type: Incomplete
expected_type: type[Incomplete]
store: Incomplete
def __init__(self, expected_type, store) -> None: ...
def __set__(self, instance, value) -> None: ...
def __get__(self, instance, cls): ...
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
def __get__(self, instance: Unused, cls: Unused) -> Self: ...

View File

@@ -1,11 +1,11 @@
from _typeshed import Incomplete
from . import _Serialiasable
from openpyxl.descriptors import MetaSerialisable
KEYWORDS: Incomplete
seq_types: Incomplete
class Serialisable(_Serialiasable):
class Serialisable(metaclass=MetaSerialisable):
__attrs__: Incomplete
__nested__: Incomplete
__elements__: Incomplete

View File

@@ -1,8 +1,67 @@
from _typeshed import Incomplete
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors import Typed
from openpyxl.descriptors import Strict, Typed
from openpyxl.descriptors.base import Alias, Integer, MinMax, Set, _ConvertibleToFloat, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
_ColorSetType: TypeAlias = Literal[
"dk1", "lt1", "dk2", "lt2", "accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "hlink", "folHlink"
]
_SystemColorVal: TypeAlias = Literal[
"scrollBar",
"background",
"activeCaption",
"inactiveCaption",
"menu",
"window",
"windowFrame",
"menuText",
"windowText",
"captionText",
"activeBorder",
"inactiveBorder",
"appWorkspace",
"highlight",
"highlightText",
"btnFace",
"btnShadow",
"grayText",
"btnText",
"inactiveCaptionText",
"btnHighlight",
"3dDkShadow",
"3dLight",
"infoText",
"infoBk",
"hotLight",
"gradientActiveCaption",
"gradientInactiveCaption",
"menuHighlight",
"menuBar",
]
_SchemeColorVal: TypeAlias = Literal[
"bg1",
"tx1",
"bg2",
"tx2",
"accent1",
"accent2",
"accent3",
"accent4",
"accent5",
"accent6",
"hlink",
"folHlink",
"phClr",
"dk1",
"lt1",
"dk2",
"lt2",
]
PRESET_COLORS: Incomplete
SCHEME_COLORS: Incomplete
@@ -13,9 +72,9 @@ class SystemColor(Serialisable):
namespace: Incomplete
tint: Incomplete
shade: Incomplete
comp: Incomplete
inv: Incomplete
gray: Incomplete
comp: Typed[Transform, Literal[True]]
inv: Typed[Transform, Literal[True]]
gray: Typed[Transform, Literal[True]]
alpha: Incomplete
alphaOff: Incomplete
alphaMod: Incomplete
@@ -37,20 +96,20 @@ class SystemColor(Serialisable):
blue: Incomplete
blueOff: Incomplete
blueMod: Incomplete
gamma: Incomplete
invGamma: Incomplete
val: Incomplete
gamma: Typed[Transform, Literal[True]]
invGamma: Typed[Transform, Literal[True]]
val: Set[_SystemColorVal]
lastClr: Incomplete
__elements__: Incomplete
def __init__(
self,
val: str = "windowText",
val: _SystemColorVal = "windowText",
lastClr: Incomplete | None = None,
tint: Incomplete | None = None,
shade: Incomplete | None = None,
comp: Incomplete | None = None,
inv: Incomplete | None = None,
gray: Incomplete | None = None,
comp: Transform | None = None,
inv: Transform | None = None,
gray: Transform | None = None,
alpha: Incomplete | None = None,
alphaOff: Incomplete | None = None,
alphaMod: Incomplete | None = None,
@@ -72,23 +131,25 @@ class SystemColor(Serialisable):
blue: Incomplete | None = None,
blueOff: Incomplete | None = None,
blueMod: Incomplete | None = None,
gamma: Incomplete | None = None,
invGamma: Incomplete | None = None,
gamma: Transform | None = None,
invGamma: Transform | None = None,
) -> None: ...
class HSLColor(Serialisable):
tagname: str
hue: Incomplete
sat: Incomplete
lum: Incomplete
def __init__(self, hue: Incomplete | None = None, sat: Incomplete | None = None, lum: Incomplete | None = None) -> None: ...
hue: Integer[Literal[False]]
sat: MinMax[float, Literal[False]]
lum: MinMax[float, Literal[False]]
def __init__(self, hue: _ConvertibleToInt, sat: _ConvertibleToFloat, lum: _ConvertibleToFloat) -> None: ...
class RGBPercent(Serialisable):
tagname: str
r: Incomplete
g: Incomplete
b: Incomplete
def __init__(self, r: Incomplete | None = None, g: Incomplete | None = None, b: Incomplete | None = None) -> None: ...
r: MinMax[float, Literal[False]]
g: MinMax[float, Literal[False]]
b: MinMax[float, Literal[False]]
def __init__(self, r: _ConvertibleToFloat, g: _ConvertibleToFloat, b: _ConvertibleToFloat) -> None: ...
_RGBPercent: TypeAlias = RGBPercent
class SchemeColor(Serialisable):
tagname: str
@@ -121,8 +182,9 @@ class SchemeColor(Serialisable):
blueMod: Incomplete
gamma: Incomplete
invGamma: Incomplete
val: Incomplete
val: Set[_SchemeColorVal]
__elements__: Incomplete
@overload
def __init__(
self,
tint: Incomplete | None = None,
@@ -153,46 +215,82 @@ class SchemeColor(Serialisable):
blueMod: Incomplete | None = None,
gamma: Incomplete | None = None,
invGamma: Incomplete | None = None,
val: Incomplete | None = None,
*,
val: _SchemeColorVal,
) -> None: ...
@overload
def __init__(
self,
tint: Incomplete | None,
shade: Incomplete | None,
comp: Incomplete | None,
inv: Incomplete | None,
gray: Incomplete | None,
alpha: Incomplete | None,
alphaOff: Incomplete | None,
alphaMod: Incomplete | None,
hue: Incomplete | None,
hueOff: Incomplete | None,
hueMod: Incomplete | None,
sat: Incomplete | None,
satOff: Incomplete | None,
satMod: Incomplete | None,
lum: Incomplete | None,
lumOff: Incomplete | None,
lumMod: Incomplete | None,
red: Incomplete | None,
redOff: Incomplete | None,
redMod: Incomplete | None,
green: Incomplete | None,
greenOff: Incomplete | None,
greenMod: Incomplete | None,
blue: Incomplete | None,
blueOff: Incomplete | None,
blueMod: Incomplete | None,
gamma: Incomplete | None,
invGamma: Incomplete | None,
val: _SchemeColorVal,
) -> None: ...
class ColorChoice(Serialisable):
tagname: str
namespace: Incomplete
scrgbClr: Incomplete
RGBPercent: Incomplete
scrgbClr: Typed[_RGBPercent, Literal[True]]
RGBPercent: Alias
srgbClr: Incomplete
RGB: Incomplete
hslClr: Incomplete
sysClr: Incomplete
schemeClr: Incomplete
RGB: Alias
hslClr: Typed[HSLColor, Literal[True]]
sysClr: Typed[SystemColor, Literal[True]]
schemeClr: Typed[SystemColor, Literal[True]]
prstClr: Incomplete
__elements__: Incomplete
def __init__(
self,
scrgbClr: Incomplete | None = None,
scrgbClr: _RGBPercent | None = None,
srgbClr: Incomplete | None = None,
hslClr: Incomplete | None = None,
sysClr: Incomplete | None = None,
schemeClr: Incomplete | None = None,
hslClr: HSLColor | None = None,
sysClr: SystemColor | None = None,
schemeClr: SystemColor | None = None,
prstClr: Incomplete | None = None,
) -> None: ...
_COLOR_SET: tuple[_ColorSetType, ...]
class ColorMapping(Serialisable):
tagname: str
bg1: Incomplete
tx1: Incomplete
bg2: Incomplete
tx2: Incomplete
accent1: Incomplete
accent2: Incomplete
accent3: Incomplete
accent4: Incomplete
accent5: Incomplete
accent6: Incomplete
hlink: Incomplete
folHlink: Incomplete
extLst: Incomplete
bg1: Set[_ColorSetType]
tx1: Set[_ColorSetType]
bg2: Set[_ColorSetType]
tx2: Set[_ColorSetType]
accent1: Set[_ColorSetType]
accent2: Set[_ColorSetType]
accent3: Set[_ColorSetType]
accent4: Set[_ColorSetType]
accent5: Set[_ColorSetType]
accent6: Set[_ColorSetType]
hlink: Set[_ColorSetType]
folHlink: Set[_ColorSetType]
extLst: Typed[ExtensionList, Literal[True]]
def __init__(
self,
bg1: str = "lt1",
@@ -207,10 +305,10 @@ class ColorMapping(Serialisable):
accent6: str = "accent6",
hlink: str = "hlink",
folHlink: str = "folHlink",
extLst: Incomplete | None = None,
extLst: ExtensionList | None = None,
) -> None: ...
class ColorChoiceDescriptor(Typed):
expected_type: Incomplete
allow_none: bool
def __set__(self, instance, value) -> None: ...
class ColorChoiceDescriptor(Typed[ColorChoice, Incomplete]):
expected_type: type[ColorChoice]
allow_none: Literal[True]
def __set__(self, instance: Serialisable | Strict, value) -> None: ...

View File

@@ -1,76 +1,99 @@
from _typeshed import Incomplete
from typing import overload
from typing_extensions import Literal
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.chart.text import RichText
from openpyxl.descriptors import Typed
from openpyxl.descriptors.base import Alias, Bool, Integer, String, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.geometry import ShapeStyle
from openpyxl.drawing.properties import NonVisualDrawingProps, NonVisualDrawingShapeProps
class Connection(Serialisable):
id: Incomplete
idx: Incomplete
def __init__(self, id: Incomplete | None = None, idx: Incomplete | None = None) -> None: ...
id: Integer[Literal[False]]
idx: Integer[Literal[False]]
def __init__(self, id: _ConvertibleToInt, idx: _ConvertibleToInt) -> None: ...
class ConnectorLocking(Serialisable):
extLst: Incomplete
def __init__(self, extLst: Incomplete | None = None) -> None: ...
extLst: Typed[ExtensionList, Literal[True]]
def __init__(self, extLst: ExtensionList | None = None) -> None: ...
class NonVisualConnectorProperties(Serialisable):
cxnSpLocks: Incomplete
stCxn: Incomplete
endCxn: Incomplete
extLst: Incomplete
cxnSpLocks: Typed[ConnectorLocking, Literal[True]]
stCxn: Typed[Connection, Literal[True]]
endCxn: Typed[Connection, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
def __init__(
self,
cxnSpLocks: Incomplete | None = None,
stCxn: Incomplete | None = None,
endCxn: Incomplete | None = None,
extLst: Incomplete | None = None,
cxnSpLocks: ConnectorLocking | None = None,
stCxn: Connection | None = None,
endCxn: Connection | None = None,
extLst: ExtensionList | None = None,
) -> None: ...
class ConnectorNonVisual(Serialisable):
cNvPr: Incomplete
cNvCxnSpPr: Incomplete
cNvPr: Typed[NonVisualDrawingProps, Literal[False]]
cNvCxnSpPr: Typed[NonVisualConnectorProperties, Literal[False]]
__elements__: Incomplete
def __init__(self, cNvPr: Incomplete | None = None, cNvCxnSpPr: Incomplete | None = None) -> None: ...
def __init__(self, cNvPr: NonVisualDrawingProps, cNvCxnSpPr: NonVisualConnectorProperties) -> None: ...
class ConnectorShape(Serialisable):
tagname: str
nvCxnSpPr: Incomplete
spPr: Incomplete
style: Incomplete
macro: Incomplete
fPublished: Incomplete
nvCxnSpPr: Typed[ConnectorNonVisual, Literal[False]]
spPr: Typed[GraphicalProperties, Literal[False]]
style: Typed[ShapeStyle, Literal[True]]
macro: String[Literal[True]]
fPublished: Bool[Literal[True]]
def __init__(
self,
nvCxnSpPr: Incomplete | None = None,
spPr: Incomplete | None = None,
style: Incomplete | None = None,
macro: Incomplete | None = None,
fPublished: Incomplete | None = None,
nvCxnSpPr: ConnectorNonVisual,
spPr: GraphicalProperties,
style: ShapeStyle | None = None,
macro: str | None = None,
fPublished: _ConvertibleToBool | None = None,
) -> None: ...
class ShapeMeta(Serialisable):
tagname: str
cNvPr: Incomplete
cNvSpPr: Incomplete
def __init__(self, cNvPr: Incomplete | None = None, cNvSpPr: Incomplete | None = None) -> None: ...
cNvPr: Typed[NonVisualDrawingProps, Literal[False]]
cNvSpPr: Typed[NonVisualDrawingShapeProps, Literal[False]]
def __init__(self, cNvPr: NonVisualDrawingProps, cNvSpPr: NonVisualDrawingShapeProps) -> None: ...
class Shape(Serialisable):
macro: Incomplete
textlink: Incomplete
fPublished: Incomplete
fLocksText: Incomplete
nvSpPr: Incomplete
meta: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
style: Incomplete
txBody: Incomplete
macro: String[Literal[True]]
textlink: String[Literal[True]]
fPublished: Bool[Literal[True]]
fLocksText: Bool[Literal[True]]
nvSpPr: Typed[ShapeMeta, Literal[True]]
meta: Alias
spPr: Typed[GraphicalProperties, Literal[False]]
graphicalProperties: Alias
style: Typed[ShapeStyle, Literal[True]]
txBody: Typed[RichText, Literal[True]]
@overload
def __init__(
self,
macro: Incomplete | None = None,
textlink: Incomplete | None = None,
fPublished: Incomplete | None = None,
fLocksText: Incomplete | None = None,
nvSpPr: Incomplete | None = None,
spPr: Incomplete | None = None,
style: Incomplete | None = None,
txBody: Incomplete | None = None,
macro: str | None = None,
textlink: str | None = None,
fPublished: _ConvertibleToBool | None = None,
fLocksText: _ConvertibleToBool | None = None,
nvSpPr: ShapeMeta | None = None,
*,
spPr: GraphicalProperties,
style: ShapeStyle | None = None,
txBody: RichText | None = None,
) -> None: ...
@overload
def __init__(
self,
macro: str | None,
textlink: str | None,
fPublished: _ConvertibleToBool | None,
fLocksText: _ConvertibleToBool | None,
nvSpPr: ShapeMeta | None,
spPr: GraphicalProperties,
style: ShapeStyle | None = None,
txBody: RichText | None = None,
) -> None: ...

View File

@@ -1,82 +1,122 @@
from _typeshed import Incomplete
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import (
Bool,
Float,
Integer,
Set,
String,
Typed,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.serialisable import Serialisable
from .colors import ColorChoice
_FillOverlayEffectBlend: TypeAlias = Literal["over", "mult", "screen", "darken", "lighten"]
_EffectContainerType: TypeAlias = Literal["sib", "tree"]
_Algn: TypeAlias = Literal["tl", "t", "tr", "l", "ctr", "r", "bl", "b", "br"]
_PresetShadowEffectPrst: TypeAlias = Literal[
"shdw1",
"shdw2",
"shdw3",
"shdw4",
"shdw5",
"shdw6",
"shdw7",
"shdw8",
"shdw9",
"shdw10",
"shdw11",
"shdw12",
"shdw13",
"shdw14",
"shdw15",
"shdw16",
"shdw17",
"shdw18",
"shdw19",
"shdw20",
]
class TintEffect(Serialisable):
tagname: str
hue: Incomplete
amt: Incomplete
def __init__(self, hue: int = 0, amt: int = 0) -> None: ...
hue: Integer[Literal[False]]
amt: Integer[Literal[False]]
def __init__(self, hue: _ConvertibleToInt = 0, amt: _ConvertibleToInt = 0) -> None: ...
class LuminanceEffect(Serialisable):
tagname: str
bright: Incomplete
contrast: Incomplete
def __init__(self, bright: int = 0, contrast: int = 0) -> None: ...
bright: Integer[Literal[False]]
contrast: Integer[Literal[False]]
def __init__(self, bright: _ConvertibleToInt = 0, contrast: _ConvertibleToInt = 0) -> None: ...
class HSLEffect(Serialisable):
hue: Incomplete
sat: Incomplete
lum: Incomplete
def __init__(self, hue: Incomplete | None = None, sat: Incomplete | None = None, lum: Incomplete | None = None) -> None: ...
hue: Integer[Literal[False]]
sat: Integer[Literal[False]]
lum: Integer[Literal[False]]
def __init__(self, hue: _ConvertibleToInt, sat: _ConvertibleToInt, lum: _ConvertibleToInt) -> None: ...
class GrayscaleEffect(Serialisable):
tagname: str
class FillOverlayEffect(Serialisable):
blend: Incomplete
def __init__(self, blend: Incomplete | None = None) -> None: ...
blend: Set[_FillOverlayEffectBlend]
def __init__(self, blend: _FillOverlayEffectBlend) -> None: ...
class DuotoneEffect(Serialisable): ...
class ColorReplaceEffect(Serialisable): ...
class Color(Serialisable): ...
class ColorChangeEffect(Serialisable):
useA: Incomplete
clrFrom: Incomplete
clrTo: Incomplete
def __init__(
self, useA: Incomplete | None = None, clrFrom: Incomplete | None = None, clrTo: Incomplete | None = None
) -> None: ...
useA: Bool[Literal[True]]
clrFrom: Typed[Color, Literal[False]]
clrTo: Typed[Color, Literal[False]]
@overload
def __init__(self, useA: _ConvertibleToBool | None = None, *, clrFrom: Color, clrTo: Color) -> None: ...
@overload
def __init__(self, useA: _ConvertibleToBool | None, clrFrom: Color, clrTo: Color) -> None: ...
class BlurEffect(Serialisable):
rad: Incomplete
grow: Incomplete
def __init__(self, rad: Incomplete | None = None, grow: Incomplete | None = None) -> None: ...
rad: Float[Literal[False]]
grow: Bool[Literal[True]]
def __init__(self, rad: _ConvertibleToFloat, grow: _ConvertibleToBool | None = None) -> None: ...
class BiLevelEffect(Serialisable):
thresh: Incomplete
def __init__(self, thresh: Incomplete | None = None) -> None: ...
thresh: Integer[Literal[False]]
def __init__(self, thresh: _ConvertibleToInt) -> None: ...
class AlphaReplaceEffect(Serialisable):
a: Incomplete
def __init__(self, a: Incomplete | None = None) -> None: ...
a: Integer[Literal[False]]
def __init__(self, a: _ConvertibleToInt) -> None: ...
class AlphaModulateFixedEffect(Serialisable):
amt: Incomplete
def __init__(self, amt: Incomplete | None = None) -> None: ...
amt: Integer[Literal[False]]
def __init__(self, amt: _ConvertibleToInt) -> None: ...
class EffectContainer(Serialisable):
type: Incomplete
name: Incomplete
def __init__(self, type: Incomplete | None = None, name: Incomplete | None = None) -> None: ...
type: Set[_EffectContainerType]
name: String[Literal[True]]
def __init__(self, type: _EffectContainerType, name: str | None = None) -> None: ...
class AlphaModulateEffect(Serialisable):
cont: Incomplete
def __init__(self, cont: Incomplete | None = None) -> None: ...
cont: Typed[EffectContainer, Literal[False]]
def __init__(self, cont: EffectContainer) -> None: ...
class AlphaInverseEffect(Serialisable): ...
class AlphaFloorEffect(Serialisable): ...
class AlphaCeilingEffect(Serialisable): ...
class AlphaBiLevelEffect(Serialisable):
thresh: Incomplete
def __init__(self, thresh: Incomplete | None = None) -> None: ...
thresh: Integer[Literal[False]]
def __init__(self, thresh: _ConvertibleToInt) -> None: ...
class GlowEffect(ColorChoice):
rad: Incomplete
rad: Float[Literal[False]]
scrgbClr: Incomplete
srgbClr: Incomplete
hslClr: Incomplete
@@ -84,12 +124,12 @@ class GlowEffect(ColorChoice):
schemeClr: Incomplete
prstClr: Incomplete
__elements__: Incomplete
def __init__(self, rad: Incomplete | None = None, **kw) -> None: ...
def __init__(self, rad: _ConvertibleToFloat, **kw) -> None: ...
class InnerShadowEffect(ColorChoice):
blurRad: Incomplete
dist: Incomplete
dir: Incomplete
blurRad: Float[Literal[False]]
dist: Float[Literal[False]]
dir: Integer[Literal[False]]
scrgbClr: Incomplete
srgbClr: Incomplete
hslClr: Incomplete
@@ -97,21 +137,19 @@ class InnerShadowEffect(ColorChoice):
schemeClr: Incomplete
prstClr: Incomplete
__elements__: Incomplete
def __init__(
self, blurRad: Incomplete | None = None, dist: Incomplete | None = None, dir: Incomplete | None = None, **kw
) -> None: ...
def __init__(self, blurRad: _ConvertibleToFloat, dist: _ConvertibleToFloat, dir: _ConvertibleToInt, **kw) -> None: ...
class OuterShadow(ColorChoice):
tagname: str
blurRad: Incomplete
dist: Incomplete
dir: Incomplete
sx: Incomplete
sy: Incomplete
kx: Incomplete
ky: Incomplete
algn: Incomplete
rotWithShape: Incomplete
blurRad: Float[Literal[True]]
dist: Float[Literal[True]]
dir: Integer[Literal[True]]
sx: Integer[Literal[True]]
sy: Integer[Literal[True]]
kx: Integer[Literal[True]]
ky: Integer[Literal[True]]
algn: Set[_Algn]
rotWithShape: Bool[Literal[True]]
scrgbClr: Incomplete
srgbClr: Incomplete
hslClr: Incomplete
@@ -119,24 +157,40 @@ class OuterShadow(ColorChoice):
schemeClr: Incomplete
prstClr: Incomplete
__elements__: Incomplete
@overload
def __init__(
self,
blurRad: Incomplete | None = None,
dist: Incomplete | None = None,
dir: Incomplete | None = None,
sx: Incomplete | None = None,
sy: Incomplete | None = None,
kx: Incomplete | None = None,
ky: Incomplete | None = None,
algn: Incomplete | None = None,
rotWithShape: Incomplete | None = None,
blurRad: _ConvertibleToFloat | None = None,
dist: _ConvertibleToFloat | None = None,
dir: _ConvertibleToInt | None = None,
sx: _ConvertibleToInt | None = None,
sy: _ConvertibleToInt | None = None,
kx: _ConvertibleToInt | None = None,
ky: _ConvertibleToInt | None = None,
*,
algn: _Algn,
rotWithShape: _ConvertibleToBool | None = None,
**kw,
) -> None: ...
@overload
def __init__(
self,
blurRad: _ConvertibleToFloat | None,
dist: _ConvertibleToFloat | None,
dir: _ConvertibleToInt | None,
sx: _ConvertibleToInt | None,
sy: _ConvertibleToInt | None,
kx: _ConvertibleToInt | None,
ky: _ConvertibleToInt | None,
algn: _Algn,
rotWithShape: _ConvertibleToBool | None = None,
**kw,
) -> None: ...
class PresetShadowEffect(ColorChoice):
prst: Incomplete
dist: Incomplete
dir: Incomplete
prst: Set[_PresetShadowEffectPrst]
dist: Float[Literal[False]]
dir: Integer[Literal[False]]
scrgbClr: Incomplete
srgbClr: Incomplete
hslClr: Incomplete
@@ -144,65 +198,63 @@ class PresetShadowEffect(ColorChoice):
schemeClr: Incomplete
prstClr: Incomplete
__elements__: Incomplete
def __init__(
self, prst: Incomplete | None = None, dist: Incomplete | None = None, dir: Incomplete | None = None, **kw
) -> None: ...
def __init__(self, prst: _PresetShadowEffectPrst, dist: _ConvertibleToFloat, dir: _ConvertibleToInt, **kw) -> None: ...
class ReflectionEffect(Serialisable):
blurRad: Incomplete
stA: Incomplete
stPos: Incomplete
endA: Incomplete
endPos: Incomplete
dist: Incomplete
dir: Incomplete
fadeDir: Incomplete
sx: Incomplete
sy: Incomplete
kx: Incomplete
ky: Incomplete
algn: Incomplete
rotWithShape: Incomplete
blurRad: Float[Literal[False]]
stA: Integer[Literal[False]]
stPos: Integer[Literal[False]]
endA: Integer[Literal[False]]
endPos: Integer[Literal[False]]
dist: Float[Literal[False]]
dir: Integer[Literal[False]]
fadeDir: Integer[Literal[False]]
sx: Integer[Literal[False]]
sy: Integer[Literal[False]]
kx: Integer[Literal[False]]
ky: Integer[Literal[False]]
algn: Set[_Algn]
rotWithShape: Bool[Literal[True]]
def __init__(
self,
blurRad: Incomplete | None = None,
stA: Incomplete | None = None,
stPos: Incomplete | None = None,
endA: Incomplete | None = None,
endPos: Incomplete | None = None,
dist: Incomplete | None = None,
dir: Incomplete | None = None,
fadeDir: Incomplete | None = None,
sx: Incomplete | None = None,
sy: Incomplete | None = None,
kx: Incomplete | None = None,
ky: Incomplete | None = None,
algn: Incomplete | None = None,
rotWithShape: Incomplete | None = None,
blurRad: _ConvertibleToFloat,
stA: _ConvertibleToInt,
stPos: _ConvertibleToInt,
endA: _ConvertibleToInt,
endPos: _ConvertibleToInt,
dist: _ConvertibleToFloat,
dir: _ConvertibleToInt,
fadeDir: _ConvertibleToInt,
sx: _ConvertibleToInt,
sy: _ConvertibleToInt,
kx: _ConvertibleToInt,
ky: _ConvertibleToInt,
algn: _Algn,
rotWithShape: _ConvertibleToBool | None = None,
) -> None: ...
class SoftEdgesEffect(Serialisable):
rad: Incomplete
def __init__(self, rad: Incomplete | None = None) -> None: ...
rad: Float[Literal[False]]
def __init__(self, rad: _ConvertibleToFloat) -> None: ...
class EffectList(Serialisable):
blur: Incomplete
fillOverlay: Incomplete
glow: Incomplete
innerShdw: Incomplete
outerShdw: Incomplete
prstShdw: Incomplete
reflection: Incomplete
softEdge: Incomplete
blur: Typed[BlurEffect, Literal[True]]
fillOverlay: Typed[FillOverlayEffect, Literal[True]]
glow: Typed[GlowEffect, Literal[True]]
innerShdw: Typed[InnerShadowEffect, Literal[True]]
outerShdw: Typed[OuterShadow, Literal[True]]
prstShdw: Typed[PresetShadowEffect, Literal[True]]
reflection: Typed[ReflectionEffect, Literal[True]]
softEdge: Typed[SoftEdgesEffect, Literal[True]]
__elements__: Incomplete
def __init__(
self,
blur: Incomplete | None = None,
fillOverlay: Incomplete | None = None,
glow: Incomplete | None = None,
innerShdw: Incomplete | None = None,
outerShdw: Incomplete | None = None,
prstShdw: Incomplete | None = None,
reflection: Incomplete | None = None,
softEdge: Incomplete | None = None,
blur: BlurEffect | None = None,
fillOverlay: FillOverlayEffect | None = None,
glow: GlowEffect | None = None,
innerShdw: InnerShadowEffect | None = None,
outerShdw: OuterShadow | None = None,
prstShdw: PresetShadowEffect | None = None,
reflection: ReflectionEffect | None = None,
softEdge: SoftEdgesEffect | None = None,
) -> None: ...

View File

@@ -1,32 +1,130 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import (
Alias,
Bool,
Integer,
MinMax,
NoneSet,
Set,
Typed,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.colors import ColorChoice, HSLColor, RGBPercent as _RGBPercent, SchemeColor, SystemColor
from openpyxl.drawing.effect import (
AlphaBiLevelEffect,
AlphaCeilingEffect,
AlphaFloorEffect,
AlphaInverseEffect,
AlphaModulateEffect,
AlphaModulateFixedEffect,
AlphaReplaceEffect,
BiLevelEffect,
BlurEffect,
ColorChangeEffect,
ColorReplaceEffect,
DuotoneEffect,
FillOverlayEffect,
GrayscaleEffect,
HSLEffect,
LuminanceEffect,
TintEffect,
)
_PatternFillPropertiesPrst: TypeAlias = Literal[
"pct5",
"pct10",
"pct20",
"pct25",
"pct30",
"pct40",
"pct50",
"pct60",
"pct70",
"pct75",
"pct80",
"pct90",
"horz",
"vert",
"ltHorz",
"ltVert",
"dkHorz",
"dkVert",
"narHorz",
"narVert",
"dashHorz",
"dashVert",
"cross",
"dnDiag",
"upDiag",
"ltDnDiag",
"ltUpDiag",
"dkDnDiag",
"dkUpDiag",
"wdDnDiag",
"wdUpDiag",
"dashDnDiag",
"dashUpDiag",
"diagCross",
"smCheck",
"lgCheck",
"smGrid",
"lgGrid",
"dotGrid",
"smConfetti",
"lgConfetti",
"horzBrick",
"diagBrick",
"solidDmnd",
"openDmnd",
"dotDmnd",
"plaid",
"sphere",
"weave",
"divot",
"shingle",
"wave",
"trellis",
"zigZag",
]
_PropertiesFlip: TypeAlias = Literal["x", "y", "xy"]
_TileInfoPropertiesAlgn: TypeAlias = Literal["tl", "t", "tr", "l", "ctr", "r", "bl", "b", "br"]
_BlipCstate: TypeAlias = Literal["email", "screen", "print", "hqprint"]
_PathShadePropertiesPath: TypeAlias = Literal["shape", "circle", "rect"]
class PatternFillProperties(Serialisable):
tagname: str
namespace: Incomplete
prst: Incomplete
preset: Incomplete
fgClr: Incomplete
foreground: Incomplete
bgClr: Incomplete
background: Incomplete
prst: NoneSet[_PatternFillPropertiesPrst]
preset: Alias
fgClr: Typed[ColorChoice, Literal[True]]
foreground: Alias
bgClr: Typed[ColorChoice, Literal[True]]
background: Alias
__elements__: Incomplete
def __init__(
self, prst: Incomplete | None = None, fgClr: Incomplete | None = None, bgClr: Incomplete | None = None
self,
prst: _PatternFillPropertiesPrst | Literal["none"] | None = None,
fgClr: ColorChoice | None = None,
bgClr: ColorChoice | None = None,
) -> None: ...
class RelativeRect(Serialisable):
tagname: str
namespace: Incomplete
l: Incomplete
left: Incomplete
left: Alias
t: Incomplete
top: Incomplete
top: Alias
r: Incomplete
right: Incomplete
right: Alias
b: Incomplete
bottom: Incomplete
bottom: Alias
def __init__(
self, l: Incomplete | None = None, t: Incomplete | None = None, r: Incomplete | None = None, b: Incomplete | None = None
) -> None: ...
@@ -34,192 +132,193 @@ class RelativeRect(Serialisable):
class StretchInfoProperties(Serialisable):
tagname: str
namespace: Incomplete
fillRect: Incomplete
def __init__(self, fillRect=...) -> None: ...
fillRect: Typed[RelativeRect, Literal[True]]
def __init__(self, fillRect: RelativeRect = ...) -> None: ...
class GradientStop(Serialisable):
tagname: str
namespace: Incomplete
pos: Incomplete
scrgbClr: Incomplete
RGBPercent: Incomplete
pos: MinMax[float, Literal[True]]
scrgbClr: Typed[_RGBPercent, Literal[True]]
RGBPercent: Alias
srgbClr: Incomplete
RGB: Incomplete
hslClr: Incomplete
sysClr: Incomplete
schemeClr: Incomplete
RGB: Alias
hslClr: Typed[HSLColor, Literal[True]]
sysClr: Typed[SystemColor, Literal[True]]
schemeClr: Typed[SchemeColor, Literal[True]]
prstClr: Incomplete
__elements__: Incomplete
def __init__(
self,
pos: Incomplete | None = None,
scrgbClr: Incomplete | None = None,
pos: _ConvertibleToFloat | None = None,
scrgbClr: _RGBPercent | None = None,
srgbClr: Incomplete | None = None,
hslClr: Incomplete | None = None,
sysClr: Incomplete | None = None,
schemeClr: Incomplete | None = None,
hslClr: HSLColor | None = None,
sysClr: SystemColor | None = None,
schemeClr: SchemeColor | None = None,
prstClr: Incomplete | None = None,
) -> None: ...
class LinearShadeProperties(Serialisable):
tagname: str
namespace: Incomplete
ang: Incomplete
scaled: Incomplete
def __init__(self, ang: Incomplete | None = None, scaled: Incomplete | None = None) -> None: ...
ang: Integer[Literal[False]]
scaled: Bool[Literal[True]]
def __init__(self, ang: _ConvertibleToInt, scaled: _ConvertibleToBool | None = None) -> None: ...
class PathShadeProperties(Serialisable):
tagname: str
namespace: Incomplete
path: Incomplete
fillToRect: Incomplete
def __init__(self, path: Incomplete | None = None, fillToRect: Incomplete | None = None) -> None: ...
path: Set[_PathShadePropertiesPath]
fillToRect: Typed[RelativeRect, Literal[True]]
def __init__(self, path: _PathShadePropertiesPath, fillToRect: RelativeRect | None = None) -> None: ...
class GradientFillProperties(Serialisable):
tagname: str
namespace: Incomplete
flip: Incomplete
rotWithShape: Incomplete
flip: NoneSet[_PropertiesFlip]
rotWithShape: Bool[Literal[True]]
gsLst: Incomplete
stop_list: Incomplete
lin: Incomplete
linear: Incomplete
path: Incomplete
tileRect: Incomplete
stop_list: Alias
lin: Typed[LinearShadeProperties, Literal[True]]
linear: Alias
path: Typed[PathShadeProperties, Literal[True]]
tileRect: Typed[RelativeRect, Literal[True]]
__elements__: Incomplete
def __init__(
self,
flip: Incomplete | None = None,
rotWithShape: Incomplete | None = None,
flip: _PropertiesFlip | Literal["none"] | None = None,
rotWithShape: _ConvertibleToBool | None = None,
gsLst=(),
lin: Incomplete | None = None,
path: Incomplete | None = None,
tileRect: Incomplete | None = None,
lin: LinearShadeProperties | None = None,
path: PathShadeProperties | None = None,
tileRect: RelativeRect | None = None,
) -> None: ...
class SolidColorFillProperties(Serialisable):
tagname: str
scrgbClr: Incomplete
RGBPercent: Incomplete
scrgbClr: Typed[_RGBPercent, Literal[True]]
RGBPercent: Alias
srgbClr: Incomplete
RGB: Incomplete
hslClr: Incomplete
sysClr: Incomplete
schemeClr: Incomplete
RGB: Alias
hslClr: Typed[HSLColor, Literal[True]]
sysClr: Typed[SystemColor, Literal[True]]
schemeClr: Typed[SchemeColor, Literal[True]]
prstClr: Incomplete
__elements__: Incomplete
def __init__(
self,
scrgbClr: Incomplete | None = None,
scrgbClr: _RGBPercent | None = None,
srgbClr: Incomplete | None = None,
hslClr: Incomplete | None = None,
sysClr: Incomplete | None = None,
schemeClr: Incomplete | None = None,
hslClr: HSLColor | None = None,
sysClr: SystemColor | None = None,
schemeClr: SchemeColor | None = None,
prstClr: Incomplete | None = None,
) -> None: ...
class Blip(Serialisable):
tagname: str
namespace: Incomplete
cstate: Incomplete
cstate: NoneSet[_BlipCstate]
embed: Incomplete
link: Incomplete
noGrp: Incomplete
noSelect: Incomplete
noRot: Incomplete
noChangeAspect: Incomplete
noMove: Incomplete
noResize: Incomplete
noEditPoints: Incomplete
noAdjustHandles: Incomplete
noChangeArrowheads: Incomplete
noChangeShapeType: Incomplete
extLst: Incomplete
alphaBiLevel: Incomplete
alphaCeiling: Incomplete
alphaFloor: Incomplete
alphaInv: Incomplete
alphaMod: Incomplete
alphaModFix: Incomplete
alphaRepl: Incomplete
biLevel: Incomplete
blur: Incomplete
clrChange: Incomplete
clrRepl: Incomplete
duotone: Incomplete
fillOverlay: Incomplete
grayscl: Incomplete
hsl: Incomplete
lum: Incomplete
tint: Incomplete
noGrp: Bool[Literal[True]]
noSelect: Bool[Literal[True]]
noRot: Bool[Literal[True]]
noChangeAspect: Bool[Literal[True]]
noMove: Bool[Literal[True]]
noResize: Bool[Literal[True]]
noEditPoints: Bool[Literal[True]]
noAdjustHandles: Bool[Literal[True]]
noChangeArrowheads: Bool[Literal[True]]
noChangeShapeType: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
alphaBiLevel: Typed[AlphaBiLevelEffect, Literal[True]]
alphaCeiling: Typed[AlphaCeilingEffect, Literal[True]]
alphaFloor: Typed[AlphaFloorEffect, Literal[True]]
alphaInv: Typed[AlphaInverseEffect, Literal[True]]
alphaMod: Typed[AlphaModulateEffect, Literal[True]]
alphaModFix: Typed[AlphaModulateFixedEffect, Literal[True]]
alphaRepl: Typed[AlphaReplaceEffect, Literal[True]]
biLevel: Typed[BiLevelEffect, Literal[True]]
blur: Typed[BlurEffect, Literal[True]]
clrChange: Typed[ColorChangeEffect, Literal[True]]
clrRepl: Typed[ColorReplaceEffect, Literal[True]]
duotone: Typed[DuotoneEffect, Literal[True]]
fillOverlay: Typed[FillOverlayEffect, Literal[True]]
grayscl: Typed[GrayscaleEffect, Literal[True]]
hsl: Typed[HSLEffect, Literal[True]]
lum: Typed[LuminanceEffect, Literal[True]]
tint: Typed[TintEffect, Literal[True]]
__elements__: Incomplete
def __init__(
self,
cstate: Incomplete | None = None,
cstate: _BlipCstate | Literal["none"] | None = None,
embed: Incomplete | None = None,
link: Incomplete | None = None,
noGrp: Incomplete | None = None,
noSelect: Incomplete | None = None,
noRot: Incomplete | None = None,
noChangeAspect: Incomplete | None = None,
noMove: Incomplete | None = None,
noResize: Incomplete | None = None,
noEditPoints: Incomplete | None = None,
noAdjustHandles: Incomplete | None = None,
noChangeArrowheads: Incomplete | None = None,
noChangeShapeType: Incomplete | None = None,
extLst: Incomplete | None = None,
alphaBiLevel: Incomplete | None = None,
alphaCeiling: Incomplete | None = None,
alphaFloor: Incomplete | None = None,
alphaInv: Incomplete | None = None,
alphaMod: Incomplete | None = None,
alphaModFix: Incomplete | None = None,
alphaRepl: Incomplete | None = None,
biLevel: Incomplete | None = None,
blur: Incomplete | None = None,
clrChange: Incomplete | None = None,
clrRepl: Incomplete | None = None,
duotone: Incomplete | None = None,
fillOverlay: Incomplete | None = None,
grayscl: Incomplete | None = None,
hsl: Incomplete | None = None,
lum: Incomplete | None = None,
tint: Incomplete | None = None,
noGrp: _ConvertibleToBool | None = None,
noSelect: _ConvertibleToBool | None = None,
noRot: _ConvertibleToBool | None = None,
noChangeAspect: _ConvertibleToBool | None = None,
noMove: _ConvertibleToBool | None = None,
noResize: _ConvertibleToBool | None = None,
noEditPoints: _ConvertibleToBool | None = None,
noAdjustHandles: _ConvertibleToBool | None = None,
noChangeArrowheads: _ConvertibleToBool | None = None,
noChangeShapeType: _ConvertibleToBool | None = None,
extLst: ExtensionList | None = None,
alphaBiLevel: AlphaBiLevelEffect | None = None,
alphaCeiling: AlphaCeilingEffect | None = None,
alphaFloor: AlphaFloorEffect | None = None,
alphaInv: AlphaInverseEffect | None = None,
alphaMod: AlphaModulateEffect | None = None,
alphaModFix: AlphaModulateFixedEffect | None = None,
alphaRepl: AlphaReplaceEffect | None = None,
biLevel: BiLevelEffect | None = None,
blur: BlurEffect | None = None,
clrChange: ColorChangeEffect | None = None,
clrRepl: ColorReplaceEffect | None = None,
duotone: DuotoneEffect | None = None,
fillOverlay: FillOverlayEffect | None = None,
grayscl: GrayscaleEffect | None = None,
hsl: HSLEffect | None = None,
lum: LuminanceEffect | None = None,
tint: TintEffect | None = None,
) -> None: ...
class TileInfoProperties(Serialisable):
tx: Incomplete
ty: Incomplete
sx: Incomplete
sy: Incomplete
flip: Incomplete
algn: Incomplete
tx: Integer[Literal[True]]
ty: Integer[Literal[True]]
sx: Integer[Literal[True]]
sy: Integer[Literal[True]]
flip: NoneSet[_PropertiesFlip]
algn: Set[_TileInfoPropertiesAlgn]
def __init__(
self,
tx: Incomplete | None = None,
ty: Incomplete | None = None,
sx: Incomplete | None = None,
sy: Incomplete | None = None,
flip: Incomplete | None = None,
algn: Incomplete | None = None,
tx: _ConvertibleToInt | None = None,
ty: _ConvertibleToInt | None = None,
sx: _ConvertibleToInt | None = None,
sy: _ConvertibleToInt | None = None,
flip: _PropertiesFlip | Literal["none"] | None = None,
*,
algn: _TileInfoPropertiesAlgn,
) -> None: ...
class BlipFillProperties(Serialisable):
tagname: str
dpi: Incomplete
rotWithShape: Incomplete
blip: Incomplete
srcRect: Incomplete
tile: Incomplete
stretch: Incomplete
dpi: Integer[Literal[True]]
rotWithShape: Bool[Literal[True]]
blip: Typed[Blip, Literal[True]]
srcRect: Typed[RelativeRect, Literal[True]]
tile: Typed[TileInfoProperties, Literal[True]]
stretch: Typed[StretchInfoProperties, Literal[True]]
__elements__: Incomplete
def __init__(
self,
dpi: Incomplete | None = None,
rotWithShape: Incomplete | None = None,
blip: Incomplete | None = None,
tile: Incomplete | None = None,
stretch=...,
srcRect: Incomplete | None = None,
dpi: _ConvertibleToInt | None = None,
rotWithShape: _ConvertibleToBool | None = None,
blip: Blip | None = None,
tile: TileInfoProperties | None = None,
stretch: StretchInfoProperties = ...,
srcRect: RelativeRect | None = None,
) -> None: ...

View File

@@ -1,6 +1,341 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import (
Alias,
Bool,
Float,
Integer,
MinMax,
NoneSet,
Set,
String,
Typed,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.excel import Coordinate, ExtensionList, Percentage
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.styles.colors import Color
_BevelPrst: TypeAlias = Literal[
"relaxedInset",
"circle",
"slope",
"cross",
"angle",
"softRound",
"convex",
"coolSlant",
"divot",
"riblet",
"hardEdge",
"artDeco",
]
_Shape3DPrstMaterial: TypeAlias = Literal[
"legacyMatte",
"legacyPlastic",
"legacyMetal",
"legacyWireframe",
"matte",
"plastic",
"metal",
"warmMatte",
"translucentPowder",
"powder",
"dkEdge",
"softEdge",
"clear",
"flat",
"softmetal",
]
_Path2DFill: TypeAlias = Literal["norm", "lighten", "lightenLess", "darken", "darkenLess"]
_FontReferenceIdx: TypeAlias = Literal["major", "minor"]
_CameraPrst: TypeAlias = Literal[
"legacyObliqueTopLeft",
"legacyObliqueTop",
"legacyObliqueTopRight",
"legacyObliqueLeft",
"legacyObliqueFront",
"legacyObliqueRight",
"legacyObliqueBottomLeft",
"legacyObliqueBottom",
"legacyObliqueBottomRight",
"legacyPerspectiveTopLeft",
"legacyPerspectiveTop",
"legacyPerspectiveTopRight",
"legacyPerspectiveLeft",
"legacyPerspectiveFront",
"legacyPerspectiveRight",
"legacyPerspectiveBottomLeft",
"legacyPerspectiveBottom",
"legacyPerspectiveBottomRight",
"orthographicFront",
"isometricTopUp",
"isometricTopDown",
"isometricBottomUp",
"isometricBottomDown",
"isometricLeftUp",
"isometricLeftDown",
"isometricRightUp",
"isometricRightDown",
"isometricOffAxis1Left",
"isometricOffAxis1Right",
"isometricOffAxis1Top",
"isometricOffAxis2Left",
"isometricOffAxis2Right",
"isometricOffAxis2Top",
"isometricOffAxis3Left",
"isometricOffAxis3Right",
"isometricOffAxis3Bottom",
"isometricOffAxis4Left",
"isometricOffAxis4Right",
"isometricOffAxis4Bottom",
"obliqueTopLeft",
"obliqueTop",
"obliqueTopRight",
"obliqueLeft",
"obliqueRight",
"obliqueBottomLeft",
"obliqueBottom",
"obliqueBottomRight",
"perspectiveFront",
"perspectiveLeft",
"perspectiveRight",
"perspectiveAbove",
"perspectiveBelow",
"perspectiveAboveLeftFacing",
"perspectiveAboveRightFacing",
"perspectiveContrastingLeftFacing",
"perspectiveContrastingRightFacing",
"perspectiveHeroicLeftFacing",
"perspectiveHeroicRightFacing",
"perspectiveHeroicExtremeLeftFacing",
"perspectiveHeroicExtremeRightFacing",
"perspectiveRelaxed",
"perspectiveRelaxedModerately",
]
_LightRigRig: TypeAlias = Literal[
"legacyFlat1",
"legacyFlat2",
"legacyFlat3",
"legacyFlat4",
"legacyNormal1",
"legacyNormal2",
"legacyNormal3",
"legacyNormal4",
"legacyHarsh1",
"legacyHarsh2",
"legacyHarsh3",
"legacyHarsh4",
"threePt",
"balanced",
"soft",
"harsh",
"flood",
"contrasting",
"morning",
"sunrise",
"sunset",
"chilly",
"freezing",
"flat",
"twoPt",
"glow",
"brightRoom",
]
_LightRigDir: TypeAlias = Literal["tl", "t", "tr", "l", "r", "bl", "b", "br"]
_PresetGeometry2DPrst: TypeAlias = Literal[
"line",
"lineInv",
"triangle",
"rtTriangle",
"rect",
"diamond",
"parallelogram",
"trapezoid",
"nonIsoscelesTrapezoid",
"pentagon",
"hexagon",
"heptagon",
"octagon",
"decagon",
"dodecagon",
"star4",
"star5",
"star6",
"star7",
"star8",
"star10",
"star12",
"star16",
"star24",
"star32",
"roundRect",
"round1Rect",
"round2SameRect",
"round2DiagRect",
"snipRoundRect",
"snip1Rect",
"snip2SameRect",
"snip2DiagRect",
"plaque",
"ellipse",
"teardrop",
"homePlate",
"chevron",
"pieWedge",
"pie",
"blockArc",
"donut",
"noSmoking",
"rightArrow",
"leftArrow",
"upArrow",
"downArrow",
"stripedRightArrow",
"notchedRightArrow",
"bentUpArrow",
"leftRightArrow",
"upDownArrow",
"leftUpArrow",
"leftRightUpArrow",
"quadArrow",
"leftArrowCallout",
"rightArrowCallout",
"upArrowCallout",
"downArrowCallout",
"leftRightArrowCallout",
"upDownArrowCallout",
"quadArrowCallout",
"bentArrow",
"uturnArrow",
"circularArrow",
"leftCircularArrow",
"leftRightCircularArrow",
"curvedRightArrow",
"curvedLeftArrow",
"curvedUpArrow",
"curvedDownArrow",
"swooshArrow",
"cube",
"can",
"lightningBolt",
"heart",
"sun",
"moon",
"smileyFace",
"irregularSeal1",
"irregularSeal2",
"foldedCorner",
"bevel",
"frame",
"halfFrame",
"corner",
"diagStripe",
"chord",
"arc",
"leftBracket",
"rightBracket",
"leftBrace",
"rightBrace",
"bracketPair",
"bracePair",
"straightConnector1",
"bentConnector2",
"bentConnector3",
"bentConnector4",
"bentConnector5",
"curvedConnector2",
"curvedConnector3",
"curvedConnector4",
"curvedConnector5",
"callout1",
"callout2",
"callout3",
"accentCallout1",
"accentCallout2",
"accentCallout3",
"borderCallout1",
"borderCallout2",
"borderCallout3",
"accentBorderCallout1",
"accentBorderCallout2",
"accentBorderCallout3",
"wedgeRectCallout",
"wedgeRoundRectCallout",
"wedgeEllipseCallout",
"cloudCallout",
"cloud",
"ribbon",
"ribbon2",
"ellipseRibbon",
"ellipseRibbon2",
"leftRightRibbon",
"verticalScroll",
"horizontalScroll",
"wave",
"doubleWave",
"plus",
"flowChartProcess",
"flowChartDecision",
"flowChartInputOutput",
"flowChartPredefinedProcess",
"flowChartInternalStorage",
"flowChartDocument",
"flowChartMultidocument",
"flowChartTerminator",
"flowChartPreparation",
"flowChartManualInput",
"flowChartManualOperation",
"flowChartConnector",
"flowChartPunchedCard",
"flowChartPunchedTape",
"flowChartSummingJunction",
"flowChartOr",
"flowChartCollate",
"flowChartSort",
"flowChartExtract",
"flowChartMerge",
"flowChartOfflineStorage",
"flowChartOnlineStorage",
"flowChartMagneticTape",
"flowChartMagneticDisk",
"flowChartMagneticDrum",
"flowChartDisplay",
"flowChartDelay",
"flowChartAlternateProcess",
"flowChartOffpageConnector",
"actionButtonBlank",
"actionButtonHome",
"actionButtonHelp",
"actionButtonInformation",
"actionButtonForwardNext",
"actionButtonBackPrevious",
"actionButtonEnd",
"actionButtonBeginning",
"actionButtonReturn",
"actionButtonDocument",
"actionButtonSound",
"actionButtonMovie",
"gear6",
"gear9",
"funnel",
"mathPlus",
"mathMinus",
"mathMultiply",
"mathDivide",
"mathEqual",
"mathNotEqual",
"cornerTabs",
"squareTabs",
"plaqueTabs",
"chartX",
"chartStar",
"chartPlus",
]
class Point2D(Serialisable):
tagname: str
@@ -12,173 +347,163 @@ class Point2D(Serialisable):
class PositiveSize2D(Serialisable):
tagname: str
namespace: Incomplete
cx: Incomplete
width: Incomplete
cy: Incomplete
height: Incomplete
def __init__(self, cx: Incomplete | None = None, cy: Incomplete | None = None) -> None: ...
cx: Integer[Literal[False]]
width: Alias
cy: Integer[Literal[False]]
height: Alias
def __init__(self, cx: _ConvertibleToInt, cy: _ConvertibleToInt) -> None: ...
class Transform2D(Serialisable):
tagname: str
namespace: Incomplete
rot: Incomplete
flipH: Incomplete
flipV: Incomplete
off: Incomplete
ext: Incomplete
chOff: Incomplete
chExt: Incomplete
rot: Integer[Literal[True]]
flipH: Bool[Literal[True]]
flipV: Bool[Literal[True]]
off: Typed[Point2D, Literal[True]]
ext: Typed[PositiveSize2D, Literal[True]]
chOff: Typed[Point2D, Literal[True]]
chExt: Typed[PositiveSize2D, Literal[True]]
__elements__: Incomplete
def __init__(
self,
rot: Incomplete | None = None,
flipH: Incomplete | None = None,
flipV: Incomplete | None = None,
off: Incomplete | None = None,
ext: Incomplete | None = None,
chOff: Incomplete | None = None,
chExt: Incomplete | None = None,
rot: _ConvertibleToInt | None = None,
flipH: _ConvertibleToBool | None = None,
flipV: _ConvertibleToBool | None = None,
off: Point2D | None = None,
ext: PositiveSize2D | None = None,
chOff: Point2D | None = None,
chExt: PositiveSize2D | None = None,
) -> None: ...
class GroupTransform2D(Serialisable):
tagname: str
namespace: Incomplete
rot: Incomplete
flipH: Incomplete
flipV: Incomplete
off: Incomplete
ext: Incomplete
chOff: Incomplete
chExt: Incomplete
rot: Integer[Literal[True]]
flipH: Bool[Literal[True]]
flipV: Bool[Literal[True]]
off = Typed(expected_type=Point2D, allow_none=True)
ext = Typed(expected_type=PositiveSize2D, allow_none=True)
chOff = Typed(expected_type=Point2D, allow_none=True)
chExt = Typed(expected_type=PositiveSize2D, allow_none=True)
__elements__: Incomplete
def __init__(
self,
rot: int = 0,
flipH: Incomplete | None = None,
flipV: Incomplete | None = None,
off: Incomplete | None = None,
ext: Incomplete | None = None,
chOff: Incomplete | None = None,
chExt: Incomplete | None = None,
rot: _ConvertibleToInt | None = 0,
flipH: _ConvertibleToBool | None = None,
flipV: _ConvertibleToBool | None = None,
off: Point2D | None = None,
ext: PositiveSize2D | None = None,
chOff: Point2D | None = None,
chExt: PositiveSize2D | None = None,
) -> None: ...
class SphereCoords(Serialisable):
tagname: str
lat: Incomplete
lon: Incomplete
rev: Incomplete
def __init__(self, lat: Incomplete | None = None, lon: Incomplete | None = None, rev: Incomplete | None = None) -> None: ...
lat: Integer[Literal[False]]
lon: Integer[Literal[False]]
rev: Integer[Literal[False]]
def __init__(self, lat: _ConvertibleToInt, lon: _ConvertibleToInt, rev: _ConvertibleToInt) -> None: ...
class Camera(Serialisable):
tagname: str
prst: Incomplete
fov: Incomplete
zoom: Incomplete
rot: Incomplete
prst: Set[_CameraPrst]
fov: Integer[Literal[True]]
zoom: Typed[Percentage, Literal[True]]
rot: Typed[SphereCoords, Literal[True]]
def __init__(
self,
prst: Incomplete | None = None,
fov: Incomplete | None = None,
zoom: Incomplete | None = None,
rot: Incomplete | None = None,
prst: _CameraPrst,
fov: _ConvertibleToInt | None = None,
zoom: Percentage | None = None,
rot: SphereCoords | None = None,
) -> None: ...
class LightRig(Serialisable):
tagname: str
rig: Incomplete
dir: Incomplete
rot: Incomplete
def __init__(self, rig: Incomplete | None = None, dir: Incomplete | None = None, rot: Incomplete | None = None) -> None: ...
rig: Set[_LightRigRig]
dir: Set[_LightRigDir]
rot: Typed[SphereCoords, Literal[True]]
def __init__(self, rig: _LightRigRig, dir: _LightRigDir, rot: SphereCoords | None = None) -> None: ...
class Vector3D(Serialisable):
tagname: str
dx: Incomplete
dy: Incomplete
dz: Incomplete
def __init__(self, dx: Incomplete | None = None, dy: Incomplete | None = None, dz: Incomplete | None = None) -> None: ...
dx: Integer[Literal[False]]
dy: Integer[Literal[False]]
dz: Integer[Literal[False]]
def __init__(self, dx: _ConvertibleToInt, dy: _ConvertibleToInt, dz: _ConvertibleToInt) -> None: ...
class Point3D(Serialisable):
tagname: str
x: Incomplete
y: Incomplete
z: Incomplete
def __init__(self, x: Incomplete | None = None, y: Incomplete | None = None, z: Incomplete | None = None) -> None: ...
x: Integer[Literal[False]]
y: Integer[Literal[False]]
z: Integer[Literal[False]]
def __init__(self, x: _ConvertibleToInt, y: _ConvertibleToInt, z: _ConvertibleToInt) -> None: ...
class Backdrop(Serialisable):
anchor: Incomplete
norm: Incomplete
up: Incomplete
extLst: Incomplete
def __init__(
self,
anchor: Incomplete | None = None,
norm: Incomplete | None = None,
up: Incomplete | None = None,
extLst: Incomplete | None = None,
) -> None: ...
anchor: Typed[Point3D, Literal[False]]
norm: Typed[Vector3D, Literal[False]]
up: Typed[Vector3D, Literal[False]]
extLst: Typed[ExtensionList, Literal[True]]
def __init__(self, anchor: Point3D, norm: Vector3D, up: Vector3D, extLst: ExtensionList | None = None) -> None: ...
class Scene3D(Serialisable):
camera: Incomplete
lightRig: Incomplete
backdrop: Incomplete
extLst: Incomplete
camera: Typed[Camera, Literal[False]]
lightRig: Typed[LightRig, Literal[False]]
backdrop: Typed[Backdrop, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
def __init__(
self,
camera: Incomplete | None = None,
lightRig: Incomplete | None = None,
backdrop: Incomplete | None = None,
extLst: Incomplete | None = None,
self, camera: Camera, lightRig: LightRig, backdrop: Backdrop | None = None, extLst: ExtensionList | None = None
) -> None: ...
class Bevel(Serialisable):
tagname: str
w: Incomplete
h: Incomplete
prst: Incomplete
def __init__(self, w: Incomplete | None = None, h: Incomplete | None = None, prst: Incomplete | None = None) -> None: ...
w: Integer[Literal[False]]
h: Integer[Literal[False]]
prst: NoneSet[_BevelPrst]
def __init__(self, w: _ConvertibleToInt, h: _ConvertibleToInt, prst: _BevelPrst | Literal["none"] | None = None) -> None: ...
class Shape3D(Serialisable):
namespace: Incomplete
z: Incomplete
extrusionH: Incomplete
contourW: Incomplete
prstMaterial: Incomplete
bevelT: Incomplete
bevelB: Incomplete
extrusionClr: Incomplete
contourClr: Incomplete
extLst: Incomplete
z: Typed[Coordinate[bool], Literal[True]]
extrusionH: Integer[Literal[True]]
contourW: Integer[Literal[True]]
prstMaterial: NoneSet[_Shape3DPrstMaterial]
bevelT: Typed[Bevel, Literal[True]]
bevelB: Typed[Bevel, Literal[True]]
extrusionClr: Typed[Color, Literal[True]]
contourClr: Typed[Color, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
def __init__(
self,
z: Incomplete | None = None,
extrusionH: Incomplete | None = None,
contourW: Incomplete | None = None,
prstMaterial: Incomplete | None = None,
bevelT: Incomplete | None = None,
bevelB: Incomplete | None = None,
extrusionClr: Incomplete | None = None,
contourClr: Incomplete | None = None,
extLst: Incomplete | None = None,
z: Coordinate[bool] | None = None,
extrusionH: _ConvertibleToInt | None = None,
contourW: _ConvertibleToInt | None = None,
prstMaterial: _Shape3DPrstMaterial | Literal["none"] | None = None,
bevelT: Bevel | None = None,
bevelB: Bevel | None = None,
extrusionClr: Color | None = None,
contourClr: Color | None = None,
extLst: ExtensionList | None = None,
) -> None: ...
class Path2D(Serialisable):
w: Incomplete
h: Incomplete
fill: Incomplete
stroke: Incomplete
extrusionOk: Incomplete
w: Float[Literal[False]]
h: Float[Literal[False]]
fill: NoneSet[_Path2DFill]
stroke: Bool[Literal[True]]
extrusionOk: Bool[Literal[True]]
def __init__(
self,
w: Incomplete | None = None,
h: Incomplete | None = None,
fill: Incomplete | None = None,
stroke: Incomplete | None = None,
extrusionOk: Incomplete | None = None,
w: _ConvertibleToFloat,
h: _ConvertibleToFloat,
fill: _Path2DFill | Literal["none"] | None = None,
stroke: _ConvertibleToBool | None = None,
extrusionOk: _ConvertibleToBool | None = None,
) -> None: ...
class Path2DList(Serialisable):
path: Incomplete
def __init__(self, path: Incomplete | None = None) -> None: ...
path: Typed[Path2D, Literal[True]]
def __init__(self, path: Path2D | None = None) -> None: ...
class GeomRect(Serialisable):
l: Incomplete
@@ -195,65 +520,73 @@ class AdjPoint2D(Serialisable):
def __init__(self, x: Incomplete | None = None, y: Incomplete | None = None) -> None: ...
class ConnectionSite(Serialisable):
ang: Incomplete
pos: Incomplete
def __init__(self, ang: Incomplete | None = None, pos: Incomplete | None = None) -> None: ...
ang: MinMax[float, Literal[False]]
pos: Typed[AdjPoint2D, Literal[False]]
def __init__(self, ang: _ConvertibleToFloat, pos: AdjPoint2D) -> None: ...
class ConnectionSiteList(Serialisable):
cxn: Incomplete
def __init__(self, cxn: Incomplete | None = None) -> None: ...
cxn: Typed[ConnectionSite, Literal[True]]
def __init__(self, cxn: ConnectionSite | None = None) -> None: ...
class AdjustHandleList(Serialisable): ...
class GeomGuide(Serialisable):
name: Incomplete
fmla: Incomplete
def __init__(self, name: Incomplete | None = None, fmla: Incomplete | None = None) -> None: ...
name: String[Literal[False]]
fmla: String[Literal[False]]
def __init__(self, name: str, fmla: str) -> None: ...
class GeomGuideList(Serialisable):
gd: Incomplete
def __init__(self, gd: Incomplete | None = None) -> None: ...
gd: Typed[GeomGuide, Literal[True]]
def __init__(self, gd: GeomGuide | None = None) -> None: ...
class CustomGeometry2D(Serialisable):
avLst: Incomplete
gdLst: Incomplete
ahLst: Incomplete
cxnLst: Incomplete
pathLst: Incomplete
rect: Incomplete
avLst: Typed[GeomGuideList, Literal[True]]
gdLst: Typed[GeomGuideList, Literal[True]]
ahLst: Typed[AdjustHandleList, Literal[True]]
cxnLst: Typed[ConnectionSiteList, Literal[True]]
pathLst: Typed[Path2DList, Literal[False]]
rect: GeomRect | None
@overload
def __init__(
self,
avLst: Incomplete | None = None,
gdLst: Incomplete | None = None,
ahLst: Incomplete | None = None,
cxnLst: Incomplete | None = None,
rect: Incomplete | None = None,
pathLst: Incomplete | None = None,
avLst: GeomGuideList | None = None,
gdLst: GeomGuideList | None = None,
ahLst: AdjustHandleList | None = None,
cxnLst: ConnectionSiteList | None = None,
rect: Unused = None,
*,
pathLst: Path2DList,
) -> None: ...
@overload
def __init__(
self,
avLst: GeomGuideList | None,
gdLst: GeomGuideList | None,
ahLst: AdjustHandleList | None,
cxnLst: ConnectionSiteList | None,
rect: Unused,
pathLst: Path2DList,
) -> None: ...
class PresetGeometry2D(Serialisable):
namespace: Incomplete
prst: Incomplete
avLst: Incomplete
def __init__(self, prst: Incomplete | None = None, avLst: Incomplete | None = None) -> None: ...
prst: Set[_PresetGeometry2DPrst]
avLst: Typed[GeomGuideList, Literal[True]]
def __init__(self, prst: _PresetGeometry2DPrst, avLst: GeomGuideList | None = None) -> None: ...
class FontReference(Serialisable):
idx: Incomplete
def __init__(self, idx: Incomplete | None = None) -> None: ...
idx: NoneSet[_FontReferenceIdx]
def __init__(self, idx: _FontReferenceIdx | Literal["none"] | None = None) -> None: ...
class StyleMatrixReference(Serialisable):
idx: Incomplete
def __init__(self, idx: Incomplete | None = None) -> None: ...
idx: Integer[Literal[False]]
def __init__(self, idx: _ConvertibleToInt) -> None: ...
class ShapeStyle(Serialisable):
lnRef: Incomplete
fillRef: Incomplete
effectRef: Incomplete
fontRef: Incomplete
lnRef: Typed[StyleMatrixReference, Literal[False]]
fillRef: Typed[StyleMatrixReference, Literal[False]]
effectRef: Typed[StyleMatrixReference, Literal[False]]
fontRef: Typed[FontReference, Literal[False]]
def __init__(
self,
lnRef: Incomplete | None = None,
fillRef: Incomplete | None = None,
effectRef: Incomplete | None = None,
fontRef: Incomplete | None = None,
self, lnRef: StyleMatrixReference, fillRef: StyleMatrixReference, effectRef: StyleMatrixReference, fontRef: FontReference
) -> None: ...

View File

@@ -1,76 +1,83 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Alias, Bool, String, Typed, _ConvertibleToBool
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.picture import PictureFrame
from openpyxl.drawing.properties import GroupShapeProperties, NonVisualGroupShape
from openpyxl.drawing.relation import ChartRelation
from openpyxl.drawing.xdr import XDRTransform2D
class GraphicFrameLocking(Serialisable):
noGrp: Incomplete
noDrilldown: Incomplete
noSelect: Incomplete
noChangeAspect: Incomplete
noMove: Incomplete
noResize: Incomplete
extLst: Incomplete
noGrp: Bool[Literal[True]]
noDrilldown: Bool[Literal[True]]
noSelect: Bool[Literal[True]]
noChangeAspect: Bool[Literal[True]]
noMove: Bool[Literal[True]]
noResize: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
def __init__(
self,
noGrp: Incomplete | None = None,
noDrilldown: Incomplete | None = None,
noSelect: Incomplete | None = None,
noChangeAspect: Incomplete | None = None,
noMove: Incomplete | None = None,
noResize: Incomplete | None = None,
extLst: Incomplete | None = None,
noGrp: _ConvertibleToBool | None = None,
noDrilldown: _ConvertibleToBool | None = None,
noSelect: _ConvertibleToBool | None = None,
noChangeAspect: _ConvertibleToBool | None = None,
noMove: _ConvertibleToBool | None = None,
noResize: _ConvertibleToBool | None = None,
extLst: ExtensionList | None = None,
) -> None: ...
class NonVisualGraphicFrameProperties(Serialisable):
tagname: str
graphicFrameLocks: Incomplete
extLst: Incomplete
def __init__(self, graphicFrameLocks: Incomplete | None = None, extLst: Incomplete | None = None) -> None: ...
graphicFrameLocks: Typed[GraphicFrameLocking, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
def __init__(self, graphicFrameLocks: GraphicFrameLocking | None = None, extLst: ExtensionList | None = None) -> None: ...
class NonVisualGraphicFrame(Serialisable):
tagname: str
cNvPr: Incomplete
cNvGraphicFramePr: Incomplete
cNvPr: Typed[ExtensionList, Literal[False]]
cNvGraphicFramePr: Typed[ExtensionList, Literal[False]]
__elements__: Incomplete
def __init__(self, cNvPr: Incomplete | None = None, cNvGraphicFramePr: Incomplete | None = None) -> None: ...
class GraphicData(Serialisable):
tagname: str
namespace: Incomplete
uri: Incomplete
chart: Incomplete
def __init__(self, uri: str = ..., chart: Incomplete | None = None) -> None: ...
uri: String[Literal[False]]
chart: Typed[ChartRelation, Literal[True]]
def __init__(self, uri: str = ..., chart: ChartRelation | None = None) -> None: ...
class GraphicObject(Serialisable):
tagname: str
namespace: Incomplete
graphicData: Incomplete
def __init__(self, graphicData: Incomplete | None = None) -> None: ...
graphicData: Typed[GraphicData, Literal[False]]
def __init__(self, graphicData: GraphicData | None = None) -> None: ...
class GraphicFrame(Serialisable):
tagname: str
nvGraphicFramePr: Incomplete
xfrm: Incomplete
graphic: Incomplete
macro: Incomplete
fPublished: Incomplete
nvGraphicFramePr: Typed[NonVisualGraphicFrame, Literal[False]]
xfrm: Typed[XDRTransform2D, Literal[False]]
graphic: Typed[GraphicObject, Literal[False]]
macro: String[Literal[True]]
fPublished: Bool[Literal[True]]
__elements__: Incomplete
def __init__(
self,
nvGraphicFramePr: Incomplete | None = None,
xfrm: Incomplete | None = None,
graphic: Incomplete | None = None,
macro: Incomplete | None = None,
fPublished: Incomplete | None = None,
nvGraphicFramePr: NonVisualGraphicFrame | None = None,
xfrm: XDRTransform2D | None = None,
graphic: GraphicObject | None = None,
macro: str | None = None,
fPublished: _ConvertibleToBool | None = None,
) -> None: ...
class GroupShape(Serialisable):
nvGrpSpPr: Incomplete
nonVisualProperties: Incomplete
grpSpPr: Incomplete
visualProperties: Incomplete
pic: Incomplete
nvGrpSpPr: Typed[NonVisualGroupShape, Literal[False]]
nonVisualProperties: Alias
grpSpPr: Typed[GroupShapeProperties, Literal[False]]
visualProperties: Alias
pic: Typed[PictureFrame, Literal[True]]
__elements__: Incomplete
def __init__(
self, nvGrpSpPr: Incomplete | None = None, grpSpPr: Incomplete | None = None, pic: Incomplete | None = None
self, nvGrpSpPr: NonVisualGroupShape, grpSpPr: GroupShapeProperties, pic: PictureFrame | None = None
) -> None: ...

View File

@@ -1,23 +1,38 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Alias, Integer, MinMax, NoneSet, Typed, _ConvertibleToFloat, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.fill import GradientFillProperties, PatternFillProperties
_LineEndPropertiesType: TypeAlias = Literal["none", "triangle", "stealth", "diamond", "oval", "arrow"]
_LineEndPropertiesWLen: TypeAlias = Literal["sm", "med", "lg"]
_LinePropertiesCap: TypeAlias = Literal["rnd", "sq", "flat"]
_LinePropertiesCmpd: TypeAlias = Literal["sng", "dbl", "thickThin", "thinThick", "tri"]
_LinePropertiesAlgn: TypeAlias = Literal["ctr", "in"]
class LineEndProperties(Serialisable):
tagname: str
namespace: Incomplete
type: Incomplete
w: Incomplete
len: Incomplete
def __init__(self, type: Incomplete | None = None, w: Incomplete | None = None, len: Incomplete | None = None) -> None: ...
type: NoneSet[_LineEndPropertiesType]
w: NoneSet[_LineEndPropertiesWLen]
len: NoneSet[_LineEndPropertiesWLen]
def __init__(
self,
type: _LineEndPropertiesType | Literal["none"] | None = None,
w: _LineEndPropertiesWLen | Literal["none"] | None = None,
len: _LineEndPropertiesWLen | Literal["none"] | None = None,
) -> None: ...
class DashStop(Serialisable):
tagname: str
namespace: Incomplete
d: Incomplete
length: Incomplete
sp: Incomplete
space: Incomplete
def __init__(self, d: int = 0, sp: int = 0) -> None: ...
d: Integer[Literal[False]]
length: Alias
sp: Integer[Literal[False]]
space: Alias
def __init__(self, d: _ConvertibleToInt = 0, sp: _ConvertibleToInt = 0) -> None: ...
class DashStopList(Serialisable):
ds: Incomplete
@@ -26,41 +41,41 @@ class DashStopList(Serialisable):
class LineProperties(Serialisable):
tagname: str
namespace: Incomplete
w: Incomplete
width: Incomplete
cap: Incomplete
cmpd: Incomplete
algn: Incomplete
w: MinMax[float, Literal[True]]
width: Alias
cap: NoneSet[_LinePropertiesCap]
cmpd: NoneSet[_LinePropertiesCmpd]
algn: NoneSet[_LinePropertiesAlgn]
noFill: Incomplete
solidFill: Incomplete
gradFill: Incomplete
pattFill: Incomplete
gradFill: Typed[GradientFillProperties, Literal[True]]
pattFill: Typed[PatternFillProperties, Literal[True]]
prstDash: Incomplete
dashStyle: Incomplete
custDash: Incomplete
dashStyle: Alias
custDash: Typed[DashStop, Literal[True]]
round: Incomplete
bevel: Incomplete
miter: Incomplete
headEnd: Incomplete
tailEnd: Incomplete
extLst: Incomplete
headEnd: Typed[LineEndProperties, Literal[True]]
tailEnd: Typed[LineEndProperties, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
w: Incomplete | None = None,
cap: Incomplete | None = None,
cmpd: Incomplete | None = None,
algn: Incomplete | None = None,
w: _ConvertibleToFloat | None = None,
cap: _LinePropertiesCap | Literal["none"] | None = None,
cmpd: _LinePropertiesCmpd | Literal["none"] | None = None,
algn: _LinePropertiesAlgn | Literal["none"] | None = None,
noFill: Incomplete | None = None,
solidFill: Incomplete | None = None,
gradFill: Incomplete | None = None,
pattFill: Incomplete | None = None,
gradFill: GradientFillProperties | None = None,
pattFill: PatternFillProperties | None = None,
prstDash: Incomplete | None = None,
custDash: Incomplete | None = None,
custDash: DashStop | None = None,
round: Incomplete | None = None,
bevel: Incomplete | None = None,
miter: Incomplete | None = None,
headEnd: Incomplete | None = None,
tailEnd: Incomplete | None = None,
extLst: Incomplete | None = None,
headEnd: LineEndProperties | None = None,
tailEnd: LineEndProperties | None = None,
extLst: Unused = None,
) -> None: ...

View File

@@ -1,72 +1,81 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.chart.shapes import GraphicalProperties
from openpyxl.descriptors.base import Alias, Bool, String, Typed, _ConvertibleToBool
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.fill import BlipFillProperties
from openpyxl.drawing.geometry import ShapeStyle
from openpyxl.drawing.properties import NonVisualDrawingProps
class PictureLocking(Serialisable):
tagname: str
namespace: Incomplete
noCrop: Incomplete
noGrp: Incomplete
noSelect: Incomplete
noRot: Incomplete
noChangeAspect: Incomplete
noMove: Incomplete
noResize: Incomplete
noEditPoints: Incomplete
noAdjustHandles: Incomplete
noChangeArrowheads: Incomplete
noChangeShapeType: Incomplete
extLst: Incomplete
noCrop: Bool[Literal[True]]
noGrp: Bool[Literal[True]]
noSelect: Bool[Literal[True]]
noRot: Bool[Literal[True]]
noChangeAspect: Bool[Literal[True]]
noMove: Bool[Literal[True]]
noResize: Bool[Literal[True]]
noEditPoints: Bool[Literal[True]]
noAdjustHandles: Bool[Literal[True]]
noChangeArrowheads: Bool[Literal[True]]
noChangeShapeType: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
noCrop: Incomplete | None = None,
noGrp: Incomplete | None = None,
noSelect: Incomplete | None = None,
noRot: Incomplete | None = None,
noChangeAspect: Incomplete | None = None,
noMove: Incomplete | None = None,
noResize: Incomplete | None = None,
noEditPoints: Incomplete | None = None,
noAdjustHandles: Incomplete | None = None,
noChangeArrowheads: Incomplete | None = None,
noChangeShapeType: Incomplete | None = None,
extLst: Incomplete | None = None,
noCrop: _ConvertibleToBool | None = None,
noGrp: _ConvertibleToBool | None = None,
noSelect: _ConvertibleToBool | None = None,
noRot: _ConvertibleToBool | None = None,
noChangeAspect: _ConvertibleToBool | None = None,
noMove: _ConvertibleToBool | None = None,
noResize: _ConvertibleToBool | None = None,
noEditPoints: _ConvertibleToBool | None = None,
noAdjustHandles: _ConvertibleToBool | None = None,
noChangeArrowheads: _ConvertibleToBool | None = None,
noChangeShapeType: _ConvertibleToBool | None = None,
extLst: Unused = None,
) -> None: ...
class NonVisualPictureProperties(Serialisable):
tagname: str
preferRelativeResize: Incomplete
picLocks: Incomplete
extLst: Incomplete
preferRelativeResize: Bool[Literal[True]]
picLocks: Typed[PictureLocking, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self, preferRelativeResize: Incomplete | None = None, picLocks: Incomplete | None = None, extLst: Incomplete | None = None
self, preferRelativeResize: _ConvertibleToBool | None = None, picLocks: Incomplete | None = None, extLst: Unused = None
) -> None: ...
class PictureNonVisual(Serialisable):
tagname: str
cNvPr: Incomplete
cNvPicPr: Incomplete
cNvPr: Typed[NonVisualDrawingProps, Literal[False]]
cNvPicPr: Typed[NonVisualPictureProperties, Literal[False]]
__elements__: Incomplete
def __init__(self, cNvPr: Incomplete | None = None, cNvPicPr: Incomplete | None = None) -> None: ...
def __init__(
self, cNvPr: NonVisualDrawingProps | None = None, cNvPicPr: NonVisualPictureProperties | None = None
) -> None: ...
class PictureFrame(Serialisable):
tagname: str
macro: Incomplete
fPublished: Incomplete
nvPicPr: Incomplete
blipFill: Incomplete
spPr: Incomplete
graphicalProperties: Incomplete
style: Incomplete
macro: String[Literal[True]]
fPublished: Bool[Literal[True]]
nvPicPr: Typed[PictureNonVisual, Literal[False]]
blipFill: Typed[BlipFillProperties, Literal[False]]
spPr: Typed[GraphicalProperties, Literal[False]]
graphicalProperties: Alias
style: Typed[ShapeStyle, Literal[True]]
__elements__: Incomplete
def __init__(
self,
macro: Incomplete | None = None,
fPublished: Incomplete | None = None,
nvPicPr: Incomplete | None = None,
blipFill: Incomplete | None = None,
spPr: Incomplete | None = None,
style: Incomplete | None = None,
macro: str | None = None,
fPublished: _ConvertibleToBool | None = None,
nvPicPr: PictureNonVisual | None = None,
blipFill: BlipFillProperties | None = None,
spPr: GraphicalProperties | None = None,
style: ShapeStyle | None = None,
) -> None: ...

View File

@@ -1,97 +1,121 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Bool, NoneSet, String, Typed, _ConvertibleToBool
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.geometry import GroupTransform2D, Scene3D
from openpyxl.drawing.text import Hyperlink
_GroupShapePropertiesBwMode: TypeAlias = Literal[
"clr", "auto", "gray", "ltGray", "invGray", "grayWhite", "blackGray", "blackWhite", "black", "white", "hidden"
]
class GroupShapeProperties(Serialisable):
tagname: str
bwMode: Incomplete
xfrm: Incomplete
scene3d: Incomplete
extLst: Incomplete
bwMode: NoneSet[_GroupShapePropertiesBwMode]
xfrm: Typed[GroupTransform2D, Literal[True]]
scene3d: Typed[Scene3D, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
def __init__(
self,
bwMode: Incomplete | None = None,
xfrm: Incomplete | None = None,
scene3d: Incomplete | None = None,
extLst: Incomplete | None = None,
bwMode: _GroupShapePropertiesBwMode | Literal["none"] | None = None,
xfrm: GroupTransform2D | None = None,
scene3d: Scene3D | None = None,
extLst: ExtensionList | None = None,
) -> None: ...
class GroupLocking(Serialisable):
tagname: str
namespace: Incomplete
noGrp: Incomplete
noUngrp: Incomplete
noSelect: Incomplete
noRot: Incomplete
noChangeAspect: Incomplete
noMove: Incomplete
noResize: Incomplete
noChangeArrowheads: Incomplete
noEditPoints: Incomplete
noAdjustHandles: Incomplete
noChangeShapeType: Incomplete
extLst: Incomplete
noGrp: Bool[Literal[True]]
noUngrp: Bool[Literal[True]]
noSelect: Bool[Literal[True]]
noRot: Bool[Literal[True]]
noChangeAspect: Bool[Literal[True]]
noMove: Bool[Literal[True]]
noResize: Bool[Literal[True]]
noChangeArrowheads: Bool[Literal[True]]
noEditPoints: Bool[Literal[True]]
noAdjustHandles: Bool[Literal[True]]
noChangeShapeType: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
noGrp: Incomplete | None = None,
noUngrp: Incomplete | None = None,
noSelect: Incomplete | None = None,
noRot: Incomplete | None = None,
noChangeAspect: Incomplete | None = None,
noChangeArrowheads: Incomplete | None = None,
noMove: Incomplete | None = None,
noResize: Incomplete | None = None,
noEditPoints: Incomplete | None = None,
noAdjustHandles: Incomplete | None = None,
noChangeShapeType: Incomplete | None = None,
extLst: Incomplete | None = None,
noGrp: _ConvertibleToBool | None = None,
noUngrp: _ConvertibleToBool | None = None,
noSelect: _ConvertibleToBool | None = None,
noRot: _ConvertibleToBool | None = None,
noChangeAspect: _ConvertibleToBool | None = None,
noChangeArrowheads: _ConvertibleToBool | None = None,
noMove: _ConvertibleToBool | None = None,
noResize: _ConvertibleToBool | None = None,
noEditPoints: _ConvertibleToBool | None = None,
noAdjustHandles: _ConvertibleToBool | None = None,
noChangeShapeType: _ConvertibleToBool | None = None,
extLst: Unused = None,
) -> None: ...
class NonVisualGroupDrawingShapeProps(Serialisable):
tagname: str
grpSpLocks: Incomplete
extLst: Incomplete
grpSpLocks: Typed[GroupLocking, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, grpSpLocks: Incomplete | None = None, extLst: Incomplete | None = None) -> None: ...
def __init__(self, grpSpLocks: Incomplete | None = None, extLst: Unused = None) -> None: ...
class NonVisualDrawingShapeProps(Serialisable):
tagname: str
spLocks: Incomplete
txBax: Incomplete
extLst: Incomplete
spLocks: Typed[GroupLocking, Literal[True]]
txBax: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
txBox: Incomplete
def __init__(
self, spLocks: Incomplete | None = None, txBox: Incomplete | None = None, extLst: Incomplete | None = None
self, spLocks: Incomplete | None = None, txBox: _ConvertibleToBool | None = None, extLst: Unused = None
) -> None: ...
class NonVisualDrawingProps(Serialisable):
tagname: str
id: Incomplete
name: Incomplete
descr: Incomplete
hidden: Incomplete
title: Incomplete
hlinkClick: Incomplete
hlinkHover: Incomplete
extLst: Incomplete
name: String[Literal[False]]
descr: String[Literal[True]]
hidden: Bool[Literal[True]]
title: String[Literal[True]]
hlinkClick: Typed[Hyperlink, Literal[True]]
hlinkHover: Typed[Hyperlink, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
@overload
def __init__(
self,
id: Incomplete | None = None,
name: Incomplete | None = None,
descr: Incomplete | None = None,
hidden: Incomplete | None = None,
title: Incomplete | None = None,
hlinkClick: Incomplete | None = None,
hlinkHover: Incomplete | None = None,
extLst: Incomplete | None = None,
*,
name: str,
descr: str | None = None,
hidden: _ConvertibleToBool | None = None,
title: str | None = None,
hlinkClick: Hyperlink | None = None,
hlinkHover: Hyperlink | None = None,
extLst: ExtensionList | None = None,
) -> None: ...
@overload
def __init__(
self,
id: Incomplete | None,
name: str,
descr: str | None = None,
hidden: _ConvertibleToBool | None = None,
title: str | None = None,
hlinkClick: Hyperlink | None = None,
hlinkHover: Hyperlink | None = None,
extLst: ExtensionList | None = None,
) -> None: ...
class NonVisualGroupShape(Serialisable):
tagname: str
cNvPr: Incomplete
cNvGrpSpPr: Incomplete
cNvPr: Typed[NonVisualDrawingProps, Literal[False]]
cNvGrpSpPr: Typed[NonVisualGroupDrawingShapeProps, Literal[False]]
__elements__: Incomplete
def __init__(self, cNvPr: Incomplete | None = None, cNvGrpSpPr: Incomplete | None = None) -> None: ...
def __init__(self, cNvPr: NonVisualDrawingProps, cNvGrpSpPr: NonVisualGroupDrawingShapeProps) -> None: ...

View File

@@ -1,11 +1,21 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Alias, Bool, NoneSet, Typed, _ConvertibleToBool
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.connector import Shape
from openpyxl.drawing.graphic import GraphicFrame, GroupShape
from openpyxl.drawing.picture import PictureFrame
from openpyxl.drawing.xdr import XDRPoint2D, XDRPositiveSize2D
_TwoCellAnchorEditAs: TypeAlias = Literal["twoCell", "oneCell", "absolute"]
class AnchorClientData(Serialisable):
fLocksWithSheet: Incomplete
fPrintsWithSheet: Incomplete
def __init__(self, fLocksWithSheet: Incomplete | None = None, fPrintsWithSheet: Incomplete | None = None) -> None: ...
fLocksWithSheet: Bool[Literal[True]]
fPrintsWithSheet: Bool[Literal[True]]
def __init__(
self, fLocksWithSheet: _ConvertibleToBool | None = None, fPrintsWithSheet: _ConvertibleToBool | None = None
) -> None: ...
class AnchorMarker(Serialisable):
tagname: str
@@ -16,69 +26,75 @@ class AnchorMarker(Serialisable):
def __init__(self, col: int = 0, colOff: int = 0, row: int = 0, rowOff: int = 0) -> None: ...
class _AnchorBase(Serialisable):
sp: Typed[Shape, Literal[True]]
shape: Alias
grpSp: Typed[GroupShape, Literal[True]]
groupShape: Alias
graphicFrame: Typed[GraphicFrame, Literal[True]]
cxnSp: Typed[Shape, Literal[True]]
connectionShape: Alias
pic: Typed[PictureFrame, Literal[True]]
contentPart: Incomplete
clientData: Typed[AnchorClientData, Literal[False]]
__elements__: Incomplete
def __init__(
self,
clientData: AnchorClientData | None = None,
sp: Shape | None = None,
grpSp: GroupShape | None = None,
graphicFrame: GraphicFrame | None = None,
cxnSp: Shape | None = None,
pic: PictureFrame | None = None,
contentPart: Incomplete | None = None,
) -> None: ...
class AbsoluteAnchor(_AnchorBase):
tagname: str
pos: Typed[XDRPoint2D, Literal[False]]
ext: Typed[XDRPositiveSize2D, Literal[False]]
sp: Incomplete
grpSp: Incomplete
graphicFrame: Incomplete
cxnSp: Incomplete
pic: Incomplete
contentPart: Incomplete
clientData: Incomplete
__elements__: Incomplete
def __init__(self, pos: XDRPoint2D | None = None, ext: XDRPositiveSize2D | None = None, **kw) -> None: ...
class OneCellAnchor(_AnchorBase):
tagname: str
_from: Typed[AnchorMarker, Literal[False]] # Not private. Avoids name clash
ext: Typed[XDRPositiveSize2D, Literal[False]]
sp: Incomplete
grpSp: Incomplete
graphicFrame: Incomplete
cxnSp: Incomplete
pic: Incomplete
contentPart: Incomplete
clientData: Incomplete
__elements__: Incomplete
def __init__(self, _from: AnchorMarker | None = None, ext: XDRPositiveSize2D | None = None, **kw) -> None: ...
class TwoCellAnchor(_AnchorBase):
tagname: str
editAs: NoneSet[_TwoCellAnchorEditAs]
_from: Typed[AnchorMarker, Literal[False]] # Not private. Avoids name clash
to: Typed[AnchorMarker, Literal[False]]
sp: Incomplete
shape: Incomplete
grpSp: Incomplete
groupShape: Incomplete
graphicFrame: Incomplete
cxnSp: Incomplete
connectionShape: Incomplete
pic: Incomplete
contentPart: Incomplete
clientData: Incomplete
__elements__: Incomplete
def __init__(
self,
clientData: Incomplete | None = None,
sp: Incomplete | None = None,
grpSp: Incomplete | None = None,
graphicFrame: Incomplete | None = None,
cxnSp: Incomplete | None = None,
pic: Incomplete | None = None,
contentPart: Incomplete | None = None,
) -> None: ...
class AbsoluteAnchor(_AnchorBase):
tagname: str
pos: Incomplete
ext: Incomplete
sp: Incomplete
grpSp: Incomplete
graphicFrame: Incomplete
cxnSp: Incomplete
pic: Incomplete
contentPart: Incomplete
clientData: Incomplete
__elements__: Incomplete
def __init__(self, pos: Incomplete | None = None, ext: Incomplete | None = None, **kw) -> None: ...
class OneCellAnchor(_AnchorBase):
tagname: str
ext: Incomplete
sp: Incomplete
grpSp: Incomplete
graphicFrame: Incomplete
cxnSp: Incomplete
pic: Incomplete
contentPart: Incomplete
clientData: Incomplete
__elements__: Incomplete
def __init__(self, _from: Incomplete | None = None, ext: Incomplete | None = None, **kw) -> None: ...
class TwoCellAnchor(_AnchorBase):
tagname: str
editAs: Incomplete
to: Incomplete
sp: Incomplete
grpSp: Incomplete
graphicFrame: Incomplete
cxnSp: Incomplete
pic: Incomplete
contentPart: Incomplete
clientData: Incomplete
__elements__: Incomplete
def __init__(
self, editAs: Incomplete | None = None, _from: Incomplete | None = None, to: Incomplete | None = None, **kw
editAs: _TwoCellAnchorEditAs | Literal["none"] | None = None,
_from: AnchorMarker | None = None,
to: AnchorMarker | None = None,
**kw,
) -> None: ...
class SpreadsheetDrawing(Serialisable):

View File

@@ -1,151 +1,288 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import (
Alias,
Bool,
Integer,
MinMax,
NoneSet,
Set,
String,
Typed,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.excel import Coordinate, ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.drawing.effect import Color, EffectContainer, EffectList
from openpyxl.drawing.fill import BlipFillProperties, GradientFillProperties, PatternFillProperties
from openpyxl.drawing.geometry import Scene3D
from openpyxl.drawing.line import LineProperties
class EmbeddedWAVAudioFile(Serialisable): # type: ignore[misc]
name: Incomplete
def __init__(self, name: Incomplete | None = None) -> None: ...
_CharacterPropertiesU: TypeAlias = Literal[
"words",
"sng",
"dbl",
"heavy",
"dotted",
"dottedHeavy",
"dash",
"dashHeavy",
"dashLong",
"dashLongHeavy",
"dotDash",
"dotDashHeavy",
"dotDotDash",
"dotDotDashHeavy",
"wavy",
"wavyHeavy",
"wavyDbl",
]
_CharacterPropertiesStrike: TypeAlias = Literal["noStrike", "sngStrike", "dblStrike"]
_CharacterPropertiesCap: TypeAlias = Literal["small", "all"]
_ParagraphPropertiesAlgn: TypeAlias = Literal["l", "ctr", "r", "just", "justLow", "dist", "thaiDist"]
_ParagraphPropertiesFontAlgn: TypeAlias = Literal["auto", "t", "ctr", "base", "b"]
_RichTextPropertiesVertOverflow: TypeAlias = Literal["overflow", "ellipsis", "clip"]
_RichTextPropertiesHorzOverflow: TypeAlias = Literal["overflow", "clip"]
_RichTextPropertiesVert: TypeAlias = Literal[
"horz", "vert", "vert270", "wordArtVert", "eaVert", "mongolianVert", "wordArtVertRtl"
]
_RichTextPropertiesWrap: TypeAlias = Literal["none", "square"]
_RichTextPropertiesAnchor: TypeAlias = Literal["t", "ctr", "b", "just", "dist"]
_AutonumberBulletType: TypeAlias = Literal[
"alphaLcParenBoth",
"alphaUcParenBoth",
"alphaLcParenR",
"alphaUcParenR",
"alphaLcPeriod",
"alphaUcPeriod",
"arabicParenBoth",
"arabicParenR",
"arabicPeriod",
"arabicPlain",
"romanLcParenBoth",
"romanUcParenBoth",
"romanLcParenR",
"romanUcParenR",
"romanLcPeriod",
"romanUcPeriod",
"circleNumDbPlain",
"circleNumWdBlackPlain",
"circleNumWdWhitePlain",
"arabicDbPeriod",
"arabicDbPlain",
"ea1ChsPeriod",
"ea1ChsPlain",
"ea1ChtPeriod",
"ea1ChtPlain",
"ea1JpnChsDbPeriod",
"ea1JpnKorPlain",
"ea1JpnKorPeriod",
"arabic1Minus",
"arabic2Minus",
"hebrew2Minus",
"thaiAlphaPeriod",
"thaiAlphaParenR",
"thaiAlphaParenBoth",
"thaiNumPeriod",
"thaiNumParenR",
"thaiNumParenBoth",
"hindiAlphaPeriod",
"hindiNumPeriod",
"hindiNumParenR",
"hindiAlpha1Period",
]
_TabStopAlgn: TypeAlias = Literal["l", "ctr", "r", "dec"]
_PresetTextShapePrst: TypeAlias = Literal[
"textNoShape",
"textPlain",
"textStop",
"textTriangle",
"textTriangleInverted",
"textChevron",
"textChevronInverted",
"textRingInside",
"textRingOutside",
"textArchUp",
"textArchDown",
"textCircle",
"textButton",
"textArchUpPour",
"textArchDownPour",
"textCirclePour",
"textButtonPour",
"textCurveUp",
"textCurveDown",
"textCanUp",
"textCanDown",
"textWave1",
"textWave2",
"textDoubleWave1",
"textWave4",
"textInflate",
"textDeflate",
"textInflateBottom",
"textDeflateBottom",
"textInflateTop",
"textDeflateTop",
"textDeflateInflate",
"textDeflateInflateDeflate",
"textFadeRight",
"textFadeLeft",
"textFadeUp",
"textFadeDown",
"textSlantUp",
"textSlantDown",
"textCascadeUp",
"textCascadeDown",
]
class EmbeddedWAVAudioFile(Serialisable):
name: String[Literal[True]]
def __init__(self, name: str | None = None) -> None: ...
class Hyperlink(Serialisable):
tagname: str
namespace: Incomplete
invalidUrl: Incomplete
action: Incomplete
tgtFrame: Incomplete
tooltip: Incomplete
history: Incomplete
highlightClick: Incomplete
endSnd: Incomplete
snd: Incomplete
extLst: Incomplete
invalidUrl: String[Literal[True]]
action: String[Literal[True]]
tgtFrame: String[Literal[True]]
tooltip: String[Literal[True]]
history: Bool[Literal[True]]
highlightClick: Bool[Literal[True]]
endSnd: Bool[Literal[True]]
snd: Typed[EmbeddedWAVAudioFile, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
id: Incomplete
__elements__: Incomplete
def __init__(
self,
invalidUrl: Incomplete | None = None,
action: Incomplete | None = None,
tgtFrame: Incomplete | None = None,
tooltip: Incomplete | None = None,
history: Incomplete | None = None,
highlightClick: Incomplete | None = None,
endSnd: Incomplete | None = None,
snd: Incomplete | None = None,
extLst: Incomplete | None = None,
invalidUrl: str | None = None,
action: str | None = None,
tgtFrame: str | None = None,
tooltip: str | None = None,
history: _ConvertibleToBool | None = None,
highlightClick: _ConvertibleToBool | None = None,
endSnd: _ConvertibleToBool | None = None,
snd: EmbeddedWAVAudioFile | None = None,
extLst: ExtensionList | None = None,
id: Incomplete | None = None,
) -> None: ...
class Font(Serialisable):
tagname: str
namespace: Incomplete
typeface: Incomplete
typeface: String[Literal[False]]
panose: Incomplete
pitchFamily: Incomplete
charset: Incomplete
pitchFamily: MinMax[float, Literal[True]]
charset: Integer[Literal[True]]
def __init__(
self,
typeface: Incomplete | None = None,
typeface: str,
panose: Incomplete | None = None,
pitchFamily: Incomplete | None = None,
charset: Incomplete | None = None,
pitchFamily: _ConvertibleToFloat | None = None,
charset: _ConvertibleToInt | None = None,
) -> None: ...
class CharacterProperties(Serialisable):
tagname: str
namespace: Incomplete
kumimoji: Incomplete
lang: Incomplete
altLang: Incomplete
sz: Incomplete
b: Incomplete
i: Incomplete
u: Incomplete
strike: Incomplete
kern: Incomplete
cap: Incomplete
spc: Incomplete
normalizeH: Incomplete
baseline: Incomplete
noProof: Incomplete
dirty: Incomplete
err: Incomplete
smtClean: Incomplete
smtId: Incomplete
bmk: Incomplete
ln: Incomplete
highlight: Incomplete
latin: Incomplete
ea: Incomplete
cs: Incomplete
sym: Incomplete
hlinkClick: Incomplete
hlinkMouseOver: Incomplete
kumimoji: Bool[Literal[True]]
lang: String[Literal[True]]
altLang: String[Literal[True]]
sz: MinMax[float, Literal[True]]
b: Bool[Literal[True]]
i: Bool[Literal[True]]
u: NoneSet[_CharacterPropertiesU]
strike: NoneSet[_CharacterPropertiesStrike]
kern: Integer[Literal[True]]
cap: NoneSet[_CharacterPropertiesCap]
spc: Integer[Literal[True]]
normalizeH: Bool[Literal[True]]
baseline: Integer[Literal[True]]
noProof: Bool[Literal[True]]
dirty: Bool[Literal[True]]
err: Bool[Literal[True]]
smtClean: Bool[Literal[True]]
smtId: Integer[Literal[True]]
bmk: String[Literal[True]]
ln: Typed[LineProperties, Literal[True]]
highlight: Typed[Color, Literal[True]]
latin: Typed[Font, Literal[True]]
ea: Typed[Font, Literal[True]]
cs: Typed[Font, Literal[True]]
sym: Typed[Font, Literal[True]]
hlinkClick: Typed[Hyperlink, Literal[True]]
hlinkMouseOver: Typed[Hyperlink, Literal[True]]
rtl: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
noFill: Incomplete
solidFill: Incomplete
gradFill: Incomplete
blipFill: Incomplete
pattFill: Incomplete
gradFill: Typed[GradientFillProperties, Literal[True]]
blipFill: Typed[BlipFillProperties, Literal[True]]
pattFill: Typed[PatternFillProperties, Literal[True]]
grpFill: Incomplete
effectLst: Incomplete
effectDag: Incomplete
effectLst: Typed[EffectList, Literal[True]]
effectDag: Typed[EffectContainer, Literal[True]]
uLnTx: Incomplete
uLn: Incomplete
uLn: Typed[LineProperties, Literal[True]]
uFillTx: Incomplete
uFill: Incomplete
__elements__: Incomplete
def __init__(
self,
kumimoji: Incomplete | None = None,
lang: Incomplete | None = None,
altLang: Incomplete | None = None,
sz: Incomplete | None = None,
b: Incomplete | None = None,
i: Incomplete | None = None,
u: Incomplete | None = None,
strike: Incomplete | None = None,
kern: Incomplete | None = None,
cap: Incomplete | None = None,
spc: Incomplete | None = None,
normalizeH: Incomplete | None = None,
baseline: Incomplete | None = None,
noProof: Incomplete | None = None,
dirty: Incomplete | None = None,
err: Incomplete | None = None,
smtClean: Incomplete | None = None,
smtId: Incomplete | None = None,
bmk: Incomplete | None = None,
ln: Incomplete | None = None,
highlight: Incomplete | None = None,
latin: Incomplete | None = None,
ea: Incomplete | None = None,
cs: Incomplete | None = None,
sym: Incomplete | None = None,
hlinkClick: Incomplete | None = None,
hlinkMouseOver: Incomplete | None = None,
kumimoji: _ConvertibleToBool | None = None,
lang: str | None = None,
altLang: str | None = None,
sz: _ConvertibleToFloat | None = None,
b: _ConvertibleToBool | None = None,
i: _ConvertibleToBool | None = None,
u: _CharacterPropertiesU | Literal["none"] | None = None,
strike: _CharacterPropertiesStrike | Literal["none"] | None = None,
kern: _ConvertibleToInt | None = None,
cap: _CharacterPropertiesCap | Literal["none"] | None = None,
spc: _ConvertibleToInt | None = None,
normalizeH: _ConvertibleToBool | None = None,
baseline: _ConvertibleToInt | None = None,
noProof: _ConvertibleToBool | None = None,
dirty: _ConvertibleToBool | None = None,
err: _ConvertibleToBool | None = None,
smtClean: _ConvertibleToBool | None = None,
smtId: _ConvertibleToInt | None = None,
bmk: str | None = None,
ln: LineProperties | None = None,
highlight: Color | None = None,
latin: Font | None = None,
ea: Font | None = None,
cs: Font | None = None,
sym: Font | None = None,
hlinkClick: Hyperlink | None = None,
hlinkMouseOver: Hyperlink | None = None,
rtl: Incomplete | None = None,
extLst: Incomplete | None = None,
extLst: ExtensionList | None = None,
noFill: Incomplete | None = None,
solidFill: Incomplete | None = None,
gradFill: Incomplete | None = None,
blipFill: Incomplete | None = None,
pattFill: Incomplete | None = None,
gradFill: GradientFillProperties | None = None,
blipFill: BlipFillProperties | None = None,
pattFill: PatternFillProperties | None = None,
grpFill: Incomplete | None = None,
effectLst: Incomplete | None = None,
effectDag: Incomplete | None = None,
effectLst: EffectList | None = None,
effectDag: EffectContainer | None = None,
uLnTx: Incomplete | None = None,
uLn: Incomplete | None = None,
uLn: LineProperties | None = None,
uFillTx: Incomplete | None = None,
uFill: Incomplete | None = None,
) -> None: ...
class TabStop(Serialisable): # type: ignore[misc]
pos: Incomplete
algn: Incomplete
def __init__(self, pos: Incomplete | None = None, algn: Incomplete | None = None) -> None: ...
class TabStop(Serialisable):
pos: Typed[Coordinate[bool], Literal[True]]
algn: Typed[Set[_TabStopAlgn], Literal[False]]
def __init__(self, pos: Coordinate[bool] | None = None, algn: Set[_TabStopAlgn] | None = None) -> None: ...
class TabStopList(Serialisable): # type: ignore[misc]
tab: Incomplete
class TabStopList(Serialisable):
tab: Typed[TabStop, Literal[True]]
def __init__(self, tab: Incomplete | None = None) -> None: ...
class Spacing(Serialisable):
@@ -155,37 +292,37 @@ class Spacing(Serialisable):
def __init__(self, spcPct: Incomplete | None = None, spcPts: Incomplete | None = None) -> None: ...
class AutonumberBullet(Serialisable):
type: Incomplete
startAt: Incomplete
def __init__(self, type: Incomplete | None = None, startAt: Incomplete | None = None) -> None: ...
type: Set[_AutonumberBulletType]
startAt: Integer[Literal[False]]
def __init__(self, type: _AutonumberBulletType, startAt: _ConvertibleToInt) -> None: ...
class ParagraphProperties(Serialisable):
tagname: str
namespace: Incomplete
marL: Incomplete
marR: Incomplete
lvl: Incomplete
indent: Incomplete
algn: Incomplete
defTabSz: Incomplete
rtl: Incomplete
eaLnBrk: Incomplete
fontAlgn: Incomplete
latinLnBrk: Incomplete
hangingPunct: Incomplete
lnSpc: Incomplete
spcBef: Incomplete
spcAft: Incomplete
tabLst: Incomplete
defRPr: Incomplete
extLst: Incomplete
marL: Integer[Literal[True]]
marR: Integer[Literal[True]]
lvl: Integer[Literal[True]]
indent: Integer[Literal[True]]
algn: NoneSet[_ParagraphPropertiesAlgn]
defTabSz: Integer[Literal[True]]
rtl: Bool[Literal[True]]
eaLnBrk: Bool[Literal[True]]
fontAlgn: NoneSet[_ParagraphPropertiesFontAlgn]
latinLnBrk: Bool[Literal[True]]
hangingPunct: Bool[Literal[True]]
lnSpc: Typed[Spacing, Literal[True]]
spcBef: Typed[Spacing, Literal[True]]
spcAft: Typed[Spacing, Literal[True]]
tabLst: Typed[TabStopList, Literal[True]]
defRPr: Typed[CharacterProperties, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
buClrTx: Incomplete
buClr: Incomplete
buClr: Typed[Color, Literal[True]]
buSzTx: Incomplete
buSzPct: Incomplete
buSzPts: Incomplete
buFontTx: Incomplete
buFont: Incomplete
buFont: Typed[Font, Literal[True]]
buNone: Incomplete
buAutoNum: Incomplete
buChar: Incomplete
@@ -193,30 +330,30 @@ class ParagraphProperties(Serialisable):
__elements__: Incomplete
def __init__(
self,
marL: Incomplete | None = None,
marR: Incomplete | None = None,
lvl: Incomplete | None = None,
indent: Incomplete | None = None,
algn: Incomplete | None = None,
defTabSz: Incomplete | None = None,
rtl: Incomplete | None = None,
eaLnBrk: Incomplete | None = None,
fontAlgn: Incomplete | None = None,
latinLnBrk: Incomplete | None = None,
hangingPunct: Incomplete | None = None,
lnSpc: Incomplete | None = None,
spcBef: Incomplete | None = None,
spcAft: Incomplete | None = None,
tabLst: Incomplete | None = None,
defRPr: Incomplete | None = None,
extLst: Incomplete | None = None,
marL: _ConvertibleToInt | None = None,
marR: _ConvertibleToInt | None = None,
lvl: _ConvertibleToInt | None = None,
indent: _ConvertibleToInt | None = None,
algn: _ParagraphPropertiesAlgn | Literal["none"] | None = None,
defTabSz: _ConvertibleToInt | None = None,
rtl: _ConvertibleToBool | None = None,
eaLnBrk: _ConvertibleToBool | None = None,
fontAlgn: _ParagraphPropertiesFontAlgn | Literal["none"] | None = None,
latinLnBrk: _ConvertibleToBool | None = None,
hangingPunct: _ConvertibleToBool | None = None,
lnSpc: Spacing | None = None,
spcBef: Spacing | None = None,
spcAft: Spacing | None = None,
tabLst: TabStopList | None = None,
defRPr: CharacterProperties | None = None,
extLst: ExtensionList | None = None,
buClrTx: Incomplete | None = None,
buClr: Incomplete | None = None,
buClr: Color | None = None,
buSzTx: Incomplete | None = None,
buSzPct: Incomplete | None = None,
buSzPts: Incomplete | None = None,
buFontTx: Incomplete | None = None,
buFont: Incomplete | None = None,
buFont: Font | None = None,
buNone: Incomplete | None = None,
buAutoNum: Incomplete | None = None,
buChar: Incomplete | None = None,
@@ -226,130 +363,130 @@ class ParagraphProperties(Serialisable):
class ListStyle(Serialisable):
tagname: str
namespace: Incomplete
defPPr: Incomplete
lvl1pPr: Incomplete
lvl2pPr: Incomplete
lvl3pPr: Incomplete
lvl4pPr: Incomplete
lvl5pPr: Incomplete
lvl6pPr: Incomplete
lvl7pPr: Incomplete
lvl8pPr: Incomplete
lvl9pPr: Incomplete
extLst: Incomplete
defPPr: Typed[ParagraphProperties, Literal[True]]
lvl1pPr: Typed[ParagraphProperties, Literal[True]]
lvl2pPr: Typed[ParagraphProperties, Literal[True]]
lvl3pPr: Typed[ParagraphProperties, Literal[True]]
lvl4pPr: Typed[ParagraphProperties, Literal[True]]
lvl5pPr: Typed[ParagraphProperties, Literal[True]]
lvl6pPr: Typed[ParagraphProperties, Literal[True]]
lvl7pPr: Typed[ParagraphProperties, Literal[True]]
lvl8pPr: Typed[ParagraphProperties, Literal[True]]
lvl9pPr: Typed[ParagraphProperties, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
defPPr: Incomplete | None = None,
lvl1pPr: Incomplete | None = None,
lvl2pPr: Incomplete | None = None,
lvl3pPr: Incomplete | None = None,
lvl4pPr: Incomplete | None = None,
lvl5pPr: Incomplete | None = None,
lvl6pPr: Incomplete | None = None,
lvl7pPr: Incomplete | None = None,
lvl8pPr: Incomplete | None = None,
lvl9pPr: Incomplete | None = None,
extLst: Incomplete | None = None,
defPPr: ParagraphProperties | None = None,
lvl1pPr: ParagraphProperties | None = None,
lvl2pPr: ParagraphProperties | None = None,
lvl3pPr: ParagraphProperties | None = None,
lvl4pPr: ParagraphProperties | None = None,
lvl5pPr: ParagraphProperties | None = None,
lvl6pPr: ParagraphProperties | None = None,
lvl7pPr: ParagraphProperties | None = None,
lvl8pPr: ParagraphProperties | None = None,
lvl9pPr: ParagraphProperties | None = None,
extLst: ParagraphProperties | None = None,
) -> None: ...
class RegularTextRun(Serialisable):
tagname: str
namespace: Incomplete
rPr: Incomplete
properties: Incomplete
rPr: Typed[CharacterProperties, Literal[True]]
properties: Alias
t: Incomplete
value: Incomplete
value: Alias
__elements__: Incomplete
def __init__(self, rPr: Incomplete | None = None, t: str = "") -> None: ...
def __init__(self, rPr: CharacterProperties | None = None, t: str = "") -> None: ...
class LineBreak(Serialisable):
tagname: str
namespace: Incomplete
rPr: Incomplete
rPr: Typed[CharacterProperties, Literal[True]]
__elements__: Incomplete
def __init__(self, rPr: Incomplete | None = None) -> None: ...
def __init__(self, rPr: CharacterProperties | None = None) -> None: ...
class TextField(Serialisable):
id: Incomplete
type: Incomplete
rPr: Incomplete
pPr: Incomplete
t: Incomplete
id: String[Literal[False]]
type: String[Literal[True]]
rPr: Typed[CharacterProperties, Literal[True]]
pPr: Typed[CharacterProperties, Literal[True]]
t: String[Literal[True]]
__elements__: Incomplete
def __init__(
self,
id: Incomplete | None = None,
type: Incomplete | None = None,
rPr: Incomplete | None = None,
pPr: Incomplete | None = None,
t: Incomplete | None = None,
id: str,
type: str | None = None,
rPr: CharacterProperties | None = None,
pPr: CharacterProperties | None = None,
t: str | None = None,
) -> None: ...
class Paragraph(Serialisable):
tagname: str
namespace: Incomplete
pPr: Incomplete
properties: Incomplete
endParaRPr: Incomplete
pPr: Typed[ParagraphProperties, Literal[True]]
properties: Alias
endParaRPr: Typed[CharacterProperties, Literal[True]]
r: Incomplete
text: Incomplete
br: Incomplete
fld: Incomplete
text: Alias
br: Typed[LineBreak, Literal[True]]
fld: Typed[TextField, Literal[True]]
__elements__: Incomplete
def __init__(
self,
pPr: Incomplete | None = None,
endParaRPr: Incomplete | None = None,
pPr: ParagraphProperties | None = None,
endParaRPr: CharacterProperties | None = None,
r: Incomplete | None = None,
br: Incomplete | None = None,
fld: Incomplete | None = None,
br: LineBreak | None = None,
fld: TextField | None = None,
) -> None: ...
class GeomGuide(Serialisable):
name: Incomplete
fmla: Incomplete
def __init__(self, name: Incomplete | None = None, fmla: Incomplete | None = None) -> None: ...
name: String[Literal[False]]
fmla: String[Literal[False]]
def __init__(self, name: str, fmla: str) -> None: ...
class GeomGuideList(Serialisable):
gd: Incomplete
def __init__(self, gd: Incomplete | None = None) -> None: ...
class PresetTextShape(Serialisable):
prst: Incomplete
avLst: Incomplete
def __init__(self, prst: Incomplete | None = None, avLst: Incomplete | None = None) -> None: ...
prst: Typed[Set[_PresetTextShapePrst], Literal[False]]
avLst: Typed[GeomGuideList, Literal[True]]
def __init__(self, prst: Set[_PresetTextShapePrst], avLst: GeomGuideList | None = None) -> None: ...
class TextNormalAutofit(Serialisable):
fontScale: Incomplete
lnSpcReduction: Incomplete
def __init__(self, fontScale: Incomplete | None = None, lnSpcReduction: Incomplete | None = None) -> None: ...
fontScale: Integer[Literal[False]]
lnSpcReduction: Integer[Literal[False]]
def __init__(self, fontScale: _ConvertibleToInt, lnSpcReduction: _ConvertibleToInt) -> None: ...
class RichTextProperties(Serialisable):
tagname: str
namespace: Incomplete
rot: Incomplete
spcFirstLastPara: Incomplete
vertOverflow: Incomplete
horzOverflow: Incomplete
vert: Incomplete
wrap: Incomplete
lIns: Incomplete
tIns: Incomplete
rIns: Incomplete
bIns: Incomplete
numCol: Incomplete
spcCol: Incomplete
rtlCol: Incomplete
fromWordArt: Incomplete
anchor: Incomplete
anchorCtr: Incomplete
forceAA: Incomplete
upright: Incomplete
compatLnSpc: Incomplete
prstTxWarp: Incomplete
scene3d: Incomplete
extLst: Incomplete
rot: Integer[Literal[True]]
spcFirstLastPara: Bool[Literal[True]]
vertOverflow: NoneSet[_RichTextPropertiesVertOverflow]
horzOverflow: NoneSet[_RichTextPropertiesHorzOverflow]
vert: NoneSet[_RichTextPropertiesVert]
wrap: NoneSet[_RichTextPropertiesWrap]
lIns: Integer[Literal[True]]
tIns: Integer[Literal[True]]
rIns: Integer[Literal[True]]
bIns: Integer[Literal[True]]
numCol: Integer[Literal[True]]
spcCol: Integer[Literal[True]]
rtlCol: Bool[Literal[True]]
fromWordArt: Bool[Literal[True]]
anchor: NoneSet[_RichTextPropertiesAnchor]
anchorCtr: Bool[Literal[True]]
forceAA: Bool[Literal[True]]
upright: Bool[Literal[True]]
compatLnSpc: Bool[Literal[True]]
prstTxWarp: Typed[PresetTextShape, Literal[True]]
scene3d: Typed[Scene3D, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
noAutofit: Incomplete
normAutofit: Incomplete
spAutoFit: Incomplete
@@ -357,25 +494,25 @@ class RichTextProperties(Serialisable):
__elements__: Incomplete
def __init__(
self,
rot: Incomplete | None = None,
spcFirstLastPara: Incomplete | None = None,
vertOverflow: Incomplete | None = None,
horzOverflow: Incomplete | None = None,
vert: Incomplete | None = None,
wrap: Incomplete | None = None,
lIns: Incomplete | None = None,
tIns: Incomplete | None = None,
rIns: Incomplete | None = None,
bIns: Incomplete | None = None,
numCol: Incomplete | None = None,
spcCol: Incomplete | None = None,
rtlCol: Incomplete | None = None,
fromWordArt: Incomplete | None = None,
anchor: Incomplete | None = None,
anchorCtr: Incomplete | None = None,
forceAA: Incomplete | None = None,
upright: Incomplete | None = None,
compatLnSpc: Incomplete | None = None,
rot: _ConvertibleToInt | None = None,
spcFirstLastPara: _ConvertibleToBool | None = None,
vertOverflow: _RichTextPropertiesVertOverflow | Literal["none"] | None = None,
horzOverflow: _RichTextPropertiesHorzOverflow | Literal["none"] | None = None,
vert: _RichTextPropertiesVert | Literal["none"] | None = None,
wrap: _RichTextPropertiesWrap | Literal["none"] | None = None,
lIns: _ConvertibleToInt | None = None,
tIns: _ConvertibleToInt | None = None,
rIns: _ConvertibleToInt | None = None,
bIns: _ConvertibleToInt | None = None,
numCol: _ConvertibleToInt | None = None,
spcCol: _ConvertibleToInt | None = None,
rtlCol: _ConvertibleToBool | None = None,
fromWordArt: _ConvertibleToBool | None = None,
anchor: _RichTextPropertiesAnchor | Literal["none"] | None = None,
anchorCtr: _ConvertibleToBool | None = None,
forceAA: _ConvertibleToBool | None = None,
upright: _ConvertibleToBool | None = None,
compatLnSpc: _ConvertibleToBool | None = None,
prstTxWarp: Incomplete | None = None,
scene3d: Incomplete | None = None,
extLst: Incomplete | None = None,

View File

@@ -1,15 +1,20 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors.base import Alias, Bool, Convertible, _ConvertibleToBool, _ConvertibleToMultiCellRange
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.worksheet.cell_range import MultiCellRange
class ConditionalFormatting(Serialisable):
tagname: str
sqref: Incomplete
cells: Incomplete
pivot: Incomplete
sqref: Convertible[MultiCellRange, Literal[False]]
cells: Alias
pivot: Bool[Literal[True]]
cfRule: Incomplete
rules: Incomplete
def __init__(self, sqref=(), pivot: Incomplete | None = None, cfRule=(), extLst: Incomplete | None = None) -> None: ...
rules: Alias
def __init__(
self, sqref: _ConvertibleToMultiCellRange = (), pivot: _ConvertibleToBool | None = None, cfRule=(), extLst: Unused = None
) -> None: ...
def __eq__(self, other): ...
def __hash__(self) -> int: ...
def __contains__(self, coord): ...

View File

@@ -1,56 +1,118 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors import Float
from openpyxl.descriptors import Float, Strict
from openpyxl.descriptors.base import Bool, Integer, NoneSet, Set, String, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.styles.differential import DifferentialStyle
class ValueDescriptor(Float):
expected_type: Incomplete
def __set__(self, instance, value) -> None: ...
_IconSetIconSet: TypeAlias = Literal[
"3Arrows",
"3ArrowsGray",
"3Flags",
"3TrafficLights1",
"3TrafficLights2",
"3Signs",
"3Symbols",
"3Symbols2",
"4Arrows",
"4ArrowsGray",
"4RedToBlack",
"4Rating",
"4TrafficLights",
"5Arrows",
"5ArrowsGray",
"5Rating",
"5Quarters",
]
_RuleOperator: TypeAlias = Literal[
"lessThan",
"lessThanOrEqual",
"equal",
"notEqual",
"greaterThanOrEqual",
"greaterThan",
"between",
"notBetween",
"containsText",
"notContains",
"beginsWith",
"endsWith",
]
_RuleTimePeriod: TypeAlias = Literal[
"today", "yesterday", "tomorrow", "last7Days", "thisMonth", "lastMonth", "nextMonth", "thisWeek", "lastWeek", "nextWeek"
]
_FormatObjectType: TypeAlias = Literal["num", "percent", "max", "min", "formula", "percentile"]
_RuleType: TypeAlias = Literal[
"expression",
"cellIs",
"colorScale",
"dataBar",
"iconSet",
"top10",
"uniqueValues",
"duplicateValues",
"containsText",
"notContainsText",
"beginsWith",
"endsWith",
"containsBlanks",
"notContainsBlanks",
"containsErrors",
"notContainsErrors",
"timePeriod",
"aboveAverage",
]
class ValueDescriptor(Float[Incomplete]):
expected_type: type[Incomplete]
def __set__(self, instance: Serialisable | Strict, value) -> None: ... # type: ignore[override]
class FormatObject(Serialisable):
tagname: str
type: Incomplete
type: Set[_FormatObjectType]
val: Incomplete
gte: Incomplete
extLst: Incomplete
gte: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self, type, val: Incomplete | None = None, gte: Incomplete | None = None, extLst: Incomplete | None = None
self, type: _FormatObjectType, val: Incomplete | None = None, gte: _ConvertibleToBool | None = None, extLst: Unused = None
) -> None: ...
class RuleType(Serialisable): # type: ignore[misc]
class RuleType(Serialisable):
cfvo: Incomplete
class IconSet(RuleType):
tagname: str
iconSet: Incomplete
showValue: Incomplete
percent: Incomplete
reverse: Incomplete
iconSet: NoneSet[_IconSetIconSet]
showValue: Bool[Literal[True]]
percent: Bool[Literal[True]]
reverse: Bool[Literal[True]]
__elements__: Incomplete
cfvo: Incomplete
def __init__(
self,
iconSet: Incomplete | None = None,
showValue: Incomplete | None = None,
percent: Incomplete | None = None,
reverse: Incomplete | None = None,
iconSet: _IconSetIconSet | Literal["none"] | None = None,
showValue: _ConvertibleToBool | None = None,
percent: _ConvertibleToBool | None = None,
reverse: _ConvertibleToBool | None = None,
cfvo: Incomplete | None = None,
) -> None: ...
class DataBar(RuleType):
tagname: str
minLength: Incomplete
maxLength: Incomplete
showValue: Incomplete
minLength: Integer[Literal[True]]
maxLength: Integer[Literal[True]]
showValue: Bool[Literal[True]]
color: Incomplete
__elements__: Incomplete
cfvo: Incomplete
def __init__(
self,
minLength: Incomplete | None = None,
maxLength: Incomplete | None = None,
showValue: Incomplete | None = None,
minLength: _ConvertibleToInt | None = None,
maxLength: _ConvertibleToInt | None = None,
showValue: _ConvertibleToBool | None = None,
cfvo: Incomplete | None = None,
color: Incomplete | None = None,
) -> None: ...
@@ -64,48 +126,48 @@ class ColorScale(RuleType):
class Rule(Serialisable):
tagname: str
type: Incomplete
dxfId: Incomplete
priority: Incomplete
stopIfTrue: Incomplete
aboveAverage: Incomplete
percent: Incomplete
bottom: Incomplete
operator: Incomplete
text: Incomplete
timePeriod: Incomplete
rank: Incomplete
stdDev: Incomplete
equalAverage: Incomplete
type: Set[_RuleType]
dxfId: Integer[Literal[True]]
priority: Integer[Literal[False]]
stopIfTrue: Bool[Literal[True]]
aboveAverage: Bool[Literal[True]]
percent: Bool[Literal[True]]
bottom: Bool[Literal[True]]
operator: NoneSet[_RuleOperator]
text: String[Literal[True]]
timePeriod: NoneSet[_RuleTimePeriod]
rank: Integer[Literal[True]]
stdDev: Integer[Literal[True]]
equalAverage: Bool[Literal[True]]
formula: Incomplete
colorScale: Incomplete
dataBar: Incomplete
iconSet: Incomplete
extLst: Incomplete
dxf: Incomplete
colorScale: Typed[ColorScale, Literal[True]]
dataBar: Typed[DataBar, Literal[True]]
iconSet: Typed[IconSet, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
dxf: Typed[DifferentialStyle, Literal[True]]
__elements__: Incomplete
__attrs__: Incomplete
def __init__(
self,
type,
dxfId: Incomplete | None = None,
priority: int = 0,
stopIfTrue: Incomplete | None = None,
aboveAverage: Incomplete | None = None,
percent: Incomplete | None = None,
bottom: Incomplete | None = None,
operator: Incomplete | None = None,
text: Incomplete | None = None,
timePeriod: Incomplete | None = None,
rank: Incomplete | None = None,
stdDev: Incomplete | None = None,
equalAverage: Incomplete | None = None,
type: _RuleType,
dxfId: _ConvertibleToInt | None = None,
priority: _ConvertibleToInt = 0,
stopIfTrue: _ConvertibleToBool | None = None,
aboveAverage: _ConvertibleToBool | None = None,
percent: _ConvertibleToBool | None = None,
bottom: _ConvertibleToBool | None = None,
operator: _RuleOperator | Literal["none"] | None = None,
text: str | None = None,
timePeriod: _RuleTimePeriod | Literal["none"] | None = None,
rank: _ConvertibleToInt | None = None,
stdDev: _ConvertibleToInt | None = None,
equalAverage: _ConvertibleToBool | None = None,
formula=(),
colorScale: Incomplete | None = None,
dataBar: Incomplete | None = None,
iconSet: Incomplete | None = None,
extLst: Incomplete | None = None,
dxf: Incomplete | None = None,
colorScale: ColorScale | None = None,
dataBar: DataBar | None = None,
iconSet: IconSet | None = None,
extLst: Unused = None,
dxf: DifferentialStyle | None = None,
) -> None: ...
def ColorScaleRule(

View File

@@ -1,11 +1,13 @@
from _typeshed import Incomplete
from openpyxl.descriptors import DateTime
from openpyxl.descriptors.base import Alias
from openpyxl.descriptors.nested import NestedText
from openpyxl.descriptors.serialisable import Serialisable
class NestedDateTime(DateTime, NestedText):
expected_type: Incomplete
# Does not reimplement the relevant methods, so runtime also has incompatible supertypes
class NestedDateTime(DateTime[Incomplete], NestedText): # type: ignore[misc]
expected_type: type[Incomplete]
def to_tree(
self, tagname: Incomplete | None = None, value: Incomplete | None = None, namespace: Incomplete | None = None
): ...
@@ -25,7 +27,7 @@ class DocumentProperties(Serialisable):
lastPrinted: Incomplete
revision: Incomplete
version: Incomplete
last_modified_by: Incomplete
last_modified_by: Alias
subject: Incomplete
title: Incomplete
creator: Incomplete

View File

@@ -1,35 +1,53 @@
from _typeshed import Incomplete
from collections.abc import Iterator
from typing_extensions import Self
from datetime import datetime
from typing import Any, Generic, TypeVar
from typing_extensions import Literal, Self
from openpyxl.descriptors import Bool, DateTime, Float, Integer, Sequence, Strict, String
from openpyxl.descriptors import Sequence, Strict
from openpyxl.descriptors.base import (
Bool,
DateTime,
Float,
Integer,
String,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.nested import NestedText
class NestedBoolText(Bool, NestedText): ...
_T = TypeVar("_T")
class _TypedProperty(Strict):
name: String
value: Incomplete
def __init__(self, name: str, value) -> None: ...
def __eq__(self, other: _TypedProperty) -> bool: ... # type: ignore[override]
# Does not reimplement anything, so runtime also has incompatible supertypes
class NestedBoolText(Bool[Incomplete], NestedText): ... # type: ignore[misc]
class IntProperty(_TypedProperty):
value: Integer
class _TypedProperty(Strict, Generic[_T]):
name: String[Literal[False]]
# Since this is internal, just list all possible values
value: Integer[Literal[False]] | Float[Literal[False]] | String[Literal[True]] | DateTime[Literal[False]] | Bool[
Literal[False]
] | String[Literal[False]]
def __init__(self, name: str, value: _T) -> None: ...
def __eq__(self, other: _TypedProperty[Any]) -> bool: ... # type: ignore[override]
class FloatProperty(_TypedProperty):
value: Float
class IntProperty(_TypedProperty[_ConvertibleToInt]):
value: Integer[Literal[False]]
class StringProperty(_TypedProperty):
value: String
class FloatProperty(_TypedProperty[_ConvertibleToFloat]):
value: Float[Literal[False]]
class DateTimeProperty(_TypedProperty):
value: DateTime
class StringProperty(_TypedProperty[str | None]):
value: String[Literal[True]]
class BoolProperty(_TypedProperty):
value: Bool
class DateTimeProperty(_TypedProperty[datetime]):
value: DateTime[Literal[False]]
class LinkProperty(_TypedProperty):
value: String
class BoolProperty(_TypedProperty[_ConvertibleToBool]):
value: Bool[Literal[False]]
class LinkProperty(_TypedProperty[str]):
value: String[Literal[False]]
CLASS_MAPPING: Incomplete
XML_MAPPING: Incomplete

View File

@@ -1,18 +1,20 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors.base import Typed
from openpyxl.descriptors.serialisable import Serialisable
def get_version(): ...
class DigSigBlob(Serialisable): # type: ignore[misc]
class DigSigBlob(Serialisable):
__elements__: Incomplete
__attrs__: Incomplete
class VectorLpstr(Serialisable): # type: ignore[misc]
class VectorLpstr(Serialisable):
__elements__: Incomplete
__attrs__: Incomplete
class VectorVariant(Serialisable): # type: ignore[misc]
class VectorVariant(Serialisable):
__elements__: Incomplete
__attrs__: Incomplete
@@ -33,15 +35,15 @@ class ExtendedProperties(Serialisable):
HiddenSlides: Incomplete
MMClips: Incomplete
ScaleCrop: Incomplete
HeadingPairs: Incomplete
TitlesOfParts: Incomplete
HeadingPairs: Typed[VectorVariant, Literal[True]]
TitlesOfParts: Typed[VectorLpstr, Literal[True]]
LinksUpToDate: Incomplete
CharactersWithSpaces: Incomplete
SharedDoc: Incomplete
HyperlinkBase: Incomplete
HLinks: Incomplete
HLinks: Typed[VectorVariant, Literal[True]]
HyperlinksChanged: Incomplete
DigSig: Incomplete
DigSig: Typed[DigSigBlob, Literal[True]]
Application: Incomplete
AppVersion: Incomplete
DocSecurity: Incomplete
@@ -63,15 +65,15 @@ class ExtendedProperties(Serialisable):
HiddenSlides: Incomplete | None = None,
MMClips: Incomplete | None = None,
ScaleCrop: Incomplete | None = None,
HeadingPairs: Incomplete | None = None,
TitlesOfParts: Incomplete | None = None,
HeadingPairs: Unused = None,
TitlesOfParts: Unused = None,
LinksUpToDate: Incomplete | None = None,
CharactersWithSpaces: Incomplete | None = None,
SharedDoc: Incomplete | None = None,
HyperlinkBase: Incomplete | None = None,
HLinks: Incomplete | None = None,
HLinks: Unused = None,
HyperlinksChanged: Incomplete | None = None,
DigSig: Incomplete | None = None,
DigSig: Unused = None,
Application: str = "Microsoft Excel",
AppVersion: Incomplete | None = None,
DocSecurity: Incomplete | None = None,

View File

@@ -1,21 +1,23 @@
from _typeshed import Incomplete
from collections.abc import Generator
from typing_extensions import Literal
from openpyxl.descriptors.base import String
from openpyxl.descriptors.serialisable import Serialisable
mimetypes: Incomplete
class FileExtension(Serialisable):
tagname: str
Extension: Incomplete
ContentType: Incomplete
def __init__(self, Extension, ContentType) -> None: ...
Extension: String[Literal[False]]
ContentType: String[Literal[False]]
def __init__(self, Extension: str, ContentType: str) -> None: ...
class Override(Serialisable):
tagname: str
PartName: Incomplete
ContentType: Incomplete
def __init__(self, PartName, ContentType) -> None: ...
PartName: String[Literal[False]]
ContentType: String[Literal[False]]
def __init__(self, PartName: str, ContentType: str) -> None: ...
DEFAULT_TYPES: Incomplete
DEFAULT_OVERRIDE: Incomplete

View File

@@ -1,23 +1,28 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from collections.abc import Generator
from typing import overload
from typing_extensions import Literal
from openpyxl.descriptors.base import Alias, String
from openpyxl.descriptors.serialisable import Serialisable
class Relationship(Serialisable):
tagname: str
Type: Incomplete
Target: Incomplete
target: Incomplete
TargetMode: Incomplete
Id: Incomplete
id: Incomplete
Type: String[Literal[False]]
Target: String[Literal[False]]
target: Alias
TargetMode: String[Literal[True]]
Id: String[Literal[True]]
id: Alias
@overload
def __init__(
self,
Id: Incomplete | None = None,
Type: Incomplete | None = None,
type: Incomplete | None = None,
Target: Incomplete | None = None,
TargetMode: Incomplete | None = None,
self, Id: str, Type: Unused = None, *, type: str, Target: str | None = None, TargetMode: str | None = None
) -> None: ...
@overload
def __init__(self, Id: str, Type: Unused, type: str, Target: str | None = None, TargetMode: str | None = None) -> None: ...
@overload
def __init__(
self, Id: str, Type: str, type: None = None, Target: str | None = None, TargetMode: str | None = None
) -> None: ...
class RelationshipList(Serialisable):

View File

@@ -1,89 +1,101 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Alias, Bool, Integer, NoneSet, String, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.workbook.defined_name import DefinedNameList
from openpyxl.workbook.function_group import FunctionGroupList
from openpyxl.workbook.properties import CalcProperties, FileVersion, WorkbookProperties
from openpyxl.workbook.protection import FileSharing, WorkbookProtection
from openpyxl.workbook.smart_tags import SmartTagList, SmartTagProperties
from openpyxl.workbook.web import WebPublishing, WebPublishObjectList
_ChildSheetState: TypeAlias = Literal["visible", "hidden", "veryHidden"]
_WorkbookPackageConformance: TypeAlias = Literal["strict", "transitional"]
class FileRecoveryProperties(Serialisable):
tagname: str
autoRecover: Incomplete
crashSave: Incomplete
dataExtractLoad: Incomplete
repairLoad: Incomplete
autoRecover: Bool[Literal[True]]
crashSave: Bool[Literal[True]]
dataExtractLoad: Bool[Literal[True]]
repairLoad: Bool[Literal[True]]
def __init__(
self,
autoRecover: Incomplete | None = None,
crashSave: Incomplete | None = None,
dataExtractLoad: Incomplete | None = None,
repairLoad: Incomplete | None = None,
autoRecover: _ConvertibleToBool | None = None,
crashSave: _ConvertibleToBool | None = None,
dataExtractLoad: _ConvertibleToBool | None = None,
repairLoad: _ConvertibleToBool | None = None,
) -> None: ...
class ChildSheet(Serialisable):
tagname: str
name: Incomplete
sheetId: Incomplete
state: Incomplete
name: String[Literal[False]]
sheetId: Integer[Literal[False]]
state: NoneSet[_ChildSheetState]
id: Incomplete
def __init__(
self,
name: Incomplete | None = None,
sheetId: Incomplete | None = None,
state: str = "visible",
name: str,
sheetId: _ConvertibleToInt,
state: _ChildSheetState | Literal["none"] | None = "visible",
id: Incomplete | None = None,
) -> None: ...
class PivotCache(Serialisable):
tagname: str
cacheId: Incomplete
cacheId: Integer[Literal[False]]
id: Incomplete
def __init__(self, cacheId: Incomplete | None = None, id: Incomplete | None = None) -> None: ...
def __init__(self, cacheId: _ConvertibleToInt, id: Incomplete | None = None) -> None: ...
class WorkbookPackage(Serialisable):
tagname: str
conformance: Incomplete
fileVersion: Incomplete
fileSharing: Incomplete
workbookPr: Incomplete
properties: Incomplete
workbookProtection: Incomplete
conformance: NoneSet[_WorkbookPackageConformance]
fileVersion: Typed[FileVersion, Literal[True]]
fileSharing: Typed[FileSharing, Literal[True]]
workbookPr: Typed[WorkbookProperties, Literal[True]]
properties: Alias
workbookProtection: Typed[WorkbookProtection, Literal[True]]
bookViews: Incomplete
sheets: Incomplete
functionGroups: Incomplete
functionGroups: Typed[FunctionGroupList, Literal[True]]
externalReferences: Incomplete
definedNames: Incomplete
calcPr: Incomplete
definedNames: Typed[DefinedNameList, Literal[True]]
calcPr: Typed[CalcProperties, Literal[True]]
oleSize: Incomplete
customWorkbookViews: Incomplete
pivotCaches: Incomplete
smartTagPr: Incomplete
smartTagTypes: Incomplete
webPublishing: Incomplete
fileRecoveryPr: Incomplete
webPublishObjects: Incomplete
extLst: Incomplete
smartTagPr: Typed[SmartTagProperties, Literal[True]]
smartTagTypes: Typed[SmartTagList, Literal[True]]
webPublishing: Typed[WebPublishing, Literal[True]]
fileRecoveryPr: Typed[FileRecoveryProperties, Literal[True]]
webPublishObjects: Typed[WebPublishObjectList, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
Ignorable: Incomplete
__elements__: Incomplete
def __init__(
self,
conformance: Incomplete | None = None,
fileVersion: Incomplete | None = None,
fileSharing: Incomplete | None = None,
workbookPr: Incomplete | None = None,
workbookProtection: Incomplete | None = None,
conformance: _WorkbookPackageConformance | Literal["none"] | None = None,
fileVersion: FileVersion | None = None,
fileSharing: FileSharing | None = None,
workbookPr: WorkbookProperties | None = None,
workbookProtection: WorkbookProtection | None = None,
bookViews=(),
sheets=(),
functionGroups: Incomplete | None = None,
functionGroups: FunctionGroupList | None = None,
externalReferences=(),
definedNames: Incomplete | None = None,
calcPr: Incomplete | None = None,
definedNames: DefinedNameList | None = None,
calcPr: CalcProperties | None = None,
oleSize: Incomplete | None = None,
customWorkbookViews=(),
pivotCaches=(),
smartTagPr: Incomplete | None = None,
smartTagTypes: Incomplete | None = None,
webPublishing: Incomplete | None = None,
fileRecoveryPr: Incomplete | None = None,
webPublishObjects: Incomplete | None = None,
extLst: Incomplete | None = None,
Ignorable: Incomplete | None = None,
smartTagPr: SmartTagProperties | None = None,
smartTagTypes: SmartTagList | None = None,
webPublishing: WebPublishing | None = None,
fileRecoveryPr: FileRecoveryProperties | None = None,
webPublishObjects: WebPublishObjectList | None = None,
extLst: Unused = None,
Ignorable: Unused = None,
) -> None: ...
def to_tree(self): ...
@property

File diff suppressed because it is too large Load Diff

View File

@@ -1,192 +1,253 @@
from _typeshed import Incomplete
from datetime import datetime
from typing import overload
from typing_extensions import Literal
from openpyxl.descriptors.base import (
Bool,
DateTime,
Float,
Integer,
String,
Typed,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.serialisable import Serialisable
class Index(Serialisable):
tagname: str
v: Incomplete
def __init__(self, v: int = 0) -> None: ...
v: Integer[Literal[True]]
def __init__(self, v: _ConvertibleToInt | None = 0) -> None: ...
class Tuple(Serialisable): # type: ignore[misc]
fld: Incomplete
hier: Incomplete
item: Incomplete
def __init__(self, fld: Incomplete | None = None, hier: Incomplete | None = None, item: Incomplete | None = None) -> None: ...
class Tuple(Serialisable):
fld: Integer[Literal[False]]
hier: Integer[Literal[False]]
item: Integer[Literal[False]]
def __init__(self, fld: _ConvertibleToInt, hier: _ConvertibleToInt, item: _ConvertibleToInt) -> None: ...
class TupleList(Serialisable): # type: ignore[misc]
c: Incomplete
tpl: Incomplete
class TupleList(Serialisable):
c: Integer[Literal[True]]
tpl: Typed[Tuple, Literal[False]]
__elements__: Incomplete
def __init__(self, c: Incomplete | None = None, tpl: Incomplete | None = None) -> None: ...
@overload
def __init__(self, c: _ConvertibleToInt | None = None, *, tpl: Tuple) -> None: ...
@overload
def __init__(self, c: _ConvertibleToInt | None, tpl: Tuple) -> None: ...
class Missing(Serialisable):
tagname: str
tpls: Incomplete
x: Incomplete
u: Incomplete
f: Incomplete
c: Incomplete
cp: Incomplete
u: Bool[Literal[True]]
f: Bool[Literal[True]]
c: String[Literal[True]]
cp: Integer[Literal[True]]
_in: Integer[Literal[True]] # Not private. Avoids name clash
bc: Incomplete
fc: Incomplete
i: Incomplete
un: Incomplete
st: Incomplete
b: Incomplete
i: Bool[Literal[True]]
un: Bool[Literal[True]]
st: Bool[Literal[True]]
b: Bool[Literal[True]]
__elements__: Incomplete
def __init__(
self,
tpls=(),
x=(),
u: Incomplete | None = None,
f: Incomplete | None = None,
c: Incomplete | None = None,
cp: Incomplete | None = None,
_in: Incomplete | None = None,
u: _ConvertibleToBool | None = None,
f: _ConvertibleToBool | None = None,
c: str | None = None,
cp: _ConvertibleToInt | None = None,
_in: _ConvertibleToInt | None = None,
bc: Incomplete | None = None,
fc: Incomplete | None = None,
i: Incomplete | None = None,
un: Incomplete | None = None,
st: Incomplete | None = None,
b: Incomplete | None = None,
i: _ConvertibleToBool | None = None,
un: _ConvertibleToBool | None = None,
st: _ConvertibleToBool | None = None,
b: _ConvertibleToBool | None = None,
) -> None: ...
class Number(Serialisable):
tagname: str
tpls: Incomplete
x: Incomplete
v: Incomplete
u: Incomplete
f: Incomplete
c: Incomplete
cp: Incomplete
v: Float[Literal[False]]
u: Bool[Literal[True]]
f: Bool[Literal[True]]
c: String[Literal[True]]
cp: Integer[Literal[True]]
_in: Integer[Literal[True]] # Not private. Avoids name clash
bc: Incomplete
fc: Incomplete
i: Incomplete
un: Incomplete
st: Incomplete
b: Incomplete
i: Bool[Literal[True]]
un: Bool[Literal[True]]
st: Bool[Literal[True]]
b: Bool[Literal[True]]
__elements__: Incomplete
@overload
def __init__(
self,
tpls=(),
x=(),
v: Incomplete | None = None,
u: Incomplete | None = None,
f: Incomplete | None = None,
c: Incomplete | None = None,
cp: Incomplete | None = None,
_in: Incomplete | None = None,
*,
v: _ConvertibleToFloat,
u: _ConvertibleToBool | None = None,
f: _ConvertibleToBool | None = None,
c: str | None = None,
cp: _ConvertibleToInt | None = None,
_in: _ConvertibleToInt | None = None,
bc: Incomplete | None = None,
fc: Incomplete | None = None,
i: Incomplete | None = None,
un: Incomplete | None = None,
st: Incomplete | None = None,
b: Incomplete | None = None,
i: _ConvertibleToBool | None = None,
un: _ConvertibleToBool | None = None,
st: _ConvertibleToBool | None = None,
b: _ConvertibleToBool | None = None,
) -> None: ...
@overload
def __init__(
self,
tpls,
x,
v: _ConvertibleToFloat,
u: _ConvertibleToBool | None = None,
f: _ConvertibleToBool | None = None,
c: str | None = None,
cp: _ConvertibleToInt | None = None,
_in: _ConvertibleToInt | None = None,
bc: Incomplete | None = None,
fc: Incomplete | None = None,
i: _ConvertibleToBool | None = None,
un: _ConvertibleToBool | None = None,
st: _ConvertibleToBool | None = None,
b: _ConvertibleToBool | None = None,
) -> None: ...
class Error(Serialisable):
tagname: str
tpls: Incomplete
tpls: Typed[TupleList, Literal[True]]
x: Incomplete
v: Incomplete
u: Incomplete
f: Incomplete
c: Incomplete
cp: Incomplete
v: String[Literal[False]]
u: Bool[Literal[True]]
f: Bool[Literal[True]]
c: String[Literal[True]]
cp: Integer[Literal[True]]
_in: Integer[Literal[True]] # Not private. Avoids name clash
bc: Incomplete
fc: Incomplete
i: Incomplete
un: Incomplete
st: Incomplete
b: Incomplete
i: Bool[Literal[True]]
un: Bool[Literal[True]]
st: Bool[Literal[True]]
b: Bool[Literal[True]]
__elements__: Incomplete
@overload
def __init__(
self,
tpls: Incomplete | None = None,
tpls: TupleList | None = None,
x=(),
v: Incomplete | None = None,
u: Incomplete | None = None,
f: Incomplete | None = None,
c: Incomplete | None = None,
cp: Incomplete | None = None,
_in: Incomplete | None = None,
*,
v: str,
u: _ConvertibleToBool | None = None,
f: _ConvertibleToBool | None = None,
c: str | None = None,
cp: _ConvertibleToInt | None = None,
_in: _ConvertibleToInt | None = None,
bc: Incomplete | None = None,
fc: Incomplete | None = None,
i: Incomplete | None = None,
un: Incomplete | None = None,
st: Incomplete | None = None,
b: Incomplete | None = None,
i: _ConvertibleToBool | None = None,
un: _ConvertibleToBool | None = None,
st: _ConvertibleToBool | None = None,
b: _ConvertibleToBool | None = None,
) -> None: ...
@overload
def __init__(
self,
tpls: TupleList | None,
x,
v: str,
u: _ConvertibleToBool | None = None,
f: _ConvertibleToBool | None = None,
c: str | None = None,
cp: _ConvertibleToInt | None = None,
_in: _ConvertibleToInt | None = None,
bc: Incomplete | None = None,
fc: Incomplete | None = None,
i: _ConvertibleToBool | None = None,
un: _ConvertibleToBool | None = None,
st: _ConvertibleToBool | None = None,
b: _ConvertibleToBool | None = None,
) -> None: ...
class Boolean(Serialisable):
tagname: str
x: Incomplete
v: Incomplete
u: Incomplete
f: Incomplete
c: Incomplete
cp: Incomplete
v: Bool[Literal[False]]
u: Bool[Literal[True]]
f: Bool[Literal[True]]
c: String[Literal[True]]
cp: Integer[Literal[True]]
__elements__: Incomplete
def __init__(
self,
x=(),
v: Incomplete | None = None,
u: Incomplete | None = None,
f: Incomplete | None = None,
c: Incomplete | None = None,
cp: Incomplete | None = None,
v: _ConvertibleToBool = None,
u: _ConvertibleToBool | None = None,
f: _ConvertibleToBool | None = None,
c: str | None = None,
cp: _ConvertibleToInt | None = None,
) -> None: ...
class Text(Serialisable):
tagname: str
tpls: Incomplete
x: Incomplete
v: Incomplete
u: Incomplete
f: Incomplete
c: Incomplete
cp: Incomplete
v: String[Literal[False]]
u: Bool[Literal[True]]
f: Bool[Literal[True]]
c: String[Literal[True]]
cp: Integer[Literal[True]]
_in: Integer[Literal[True]] # Not private. Avoids name clash
bc: Incomplete
fc: Incomplete
i: Incomplete
un: Incomplete
st: Incomplete
b: Incomplete
i: Bool[Literal[True]]
un: Bool[Literal[True]]
st: Bool[Literal[True]]
b: Bool[Literal[True]]
__elements__: Incomplete
def __init__(
self,
tpls=(),
x=(),
v: Incomplete | None = None,
u: Incomplete | None = None,
f: Incomplete | None = None,
u: _ConvertibleToBool | None = None,
f: _ConvertibleToBool | None = None,
c: Incomplete | None = None,
cp: Incomplete | None = None,
_in: Incomplete | None = None,
cp: _ConvertibleToInt | None = None,
_in: _ConvertibleToInt | None = None,
bc: Incomplete | None = None,
fc: Incomplete | None = None,
i: Incomplete | None = None,
un: Incomplete | None = None,
st: Incomplete | None = None,
b: Incomplete | None = None,
i: _ConvertibleToBool | None = None,
un: _ConvertibleToBool | None = None,
st: _ConvertibleToBool | None = None,
b: _ConvertibleToBool | None = None,
) -> None: ...
class DateTimeField(Serialisable):
tagname: str
x: Incomplete
v: Incomplete
u: Incomplete
f: Incomplete
c: Incomplete
cp: Incomplete
v: DateTime[Literal[False]]
u: Bool[Literal[True]]
f: Bool[Literal[True]]
c: String[Literal[True]]
cp: Integer[Literal[True]]
__elements__: Incomplete
def __init__(
self,
x=(),
v: Incomplete | None = None,
u: Incomplete | None = None,
f: Incomplete | None = None,
c: Incomplete | None = None,
cp: Incomplete | None = None,
v: datetime | str | None = None,
u: _ConvertibleToBool | None = None,
f: _ConvertibleToBool | None = None,
c: str | None = None,
cp: _ConvertibleToInt | None = None,
) -> None: ...

View File

@@ -1,5 +1,8 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors.base import Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
class Record(Serialisable):
@@ -28,10 +31,10 @@ class RecordList(Serialisable):
rel_type: str
tagname: str
r: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
__attrs__: Incomplete
def __init__(self, count: Incomplete | None = None, r=(), extLst: Incomplete | None = None) -> None: ...
def __init__(self, count: Unused = None, r=(), extLst: ExtensionList | None = None) -> None: ...
@property
def count(self): ...
def to_tree(self): ...

File diff suppressed because it is too large Load Diff

View File

@@ -1,36 +1,43 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Alias, Bool, Min, MinMax, NoneSet, _ConvertibleToBool, _ConvertibleToFloat
from openpyxl.descriptors.serialisable import Serialisable
horizontal_alignments: Incomplete
vertical_aligments: Incomplete
_HorizontalAlignmentsType: TypeAlias = Literal[
"general", "left", "center", "right", "fill", "justify", "centerContinuous", "distributed"
]
_VerticalAlignmentsType: TypeAlias = Literal["top", "center", "bottom", "justify", "distributed"]
horizontal_alignments: tuple[_HorizontalAlignmentsType, ...]
vertical_aligments: tuple[_VerticalAlignmentsType, ...]
class Alignment(Serialisable):
tagname: str
__fields__: Incomplete
horizontal: Incomplete
vertical: Incomplete
textRotation: Incomplete
text_rotation: Incomplete
wrapText: Incomplete
wrap_text: Incomplete
shrinkToFit: Incomplete
shrink_to_fit: Incomplete
indent: Incomplete
relativeIndent: Incomplete
justifyLastLine: Incomplete
readingOrder: Incomplete
horizontal: NoneSet[_HorizontalAlignmentsType]
vertical: NoneSet[_VerticalAlignmentsType]
textRotation: NoneSet[int]
text_rotation: Alias
wrapText: Bool[Literal[True]]
wrap_text: Alias
shrinkToFit: Bool[Literal[True]]
shrink_to_fit: Alias
indent: MinMax[float, Literal[False]]
relativeIndent: MinMax[float, Literal[False]]
justifyLastLine: Bool[Literal[True]]
readingOrder: Min[float, Literal[False]]
def __init__(
self,
horizontal: Incomplete | None = None,
vertical: Incomplete | None = None,
textRotation: int = 0,
wrapText: Incomplete | None = None,
shrinkToFit: Incomplete | None = None,
indent: int = 0,
relativeIndent: int = 0,
justifyLastLine: Incomplete | None = None,
readingOrder: int = 0,
wrapText: _ConvertibleToBool | None = None,
shrinkToFit: _ConvertibleToBool | None = None,
indent: _ConvertibleToFloat = 0,
relativeIndent: _ConvertibleToFloat = 0,
justifyLastLine: _ConvertibleToBool | None = None,
readingOrder: _ConvertibleToFloat = 0,
text_rotation: Incomplete | None = None,
wrap_text: Incomplete | None = None,
shrink_to_fit: Incomplete | None = None,

View File

@@ -1,7 +1,25 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Alias, Bool, NoneSet, Typed, _ConvertibleToBool
from openpyxl.descriptors.serialisable import Serialisable
_SideStyle: TypeAlias = Literal[
"dashDot",
"dashDotDot",
"dashed",
"dotted",
"double",
"hair",
"medium",
"mediumDashDot",
"mediumDashDotDot",
"mediumDashed",
"slantDashDot",
"thick",
"thin",
]
BORDER_NONE: Incomplete
BORDER_DASHDOT: str
BORDER_DASHDOTDOT: str
@@ -17,47 +35,50 @@ BORDER_SLANTDASHDOT: str
BORDER_THICK: str
BORDER_THIN: str
class Side(Serialisable): # type: ignore[misc]
class Side(Serialisable):
__fields__: Incomplete
color: Incomplete
style: Incomplete
border_style: Incomplete
style: NoneSet[_SideStyle]
border_style: Alias
def __init__(
self, style: Incomplete | None = None, color: Incomplete | None = None, border_style: Incomplete | None = None
self,
style: _SideStyle | Literal["none"] | None = None,
color: Incomplete | None = None,
border_style: Incomplete | None = None,
) -> None: ...
class Border(Serialisable):
tagname: str
__fields__: Incomplete
__elements__: Incomplete
start: Incomplete
end: Incomplete
left: Incomplete
right: Incomplete
top: Incomplete
bottom: Incomplete
diagonal: Incomplete
vertical: Incomplete
horizontal: Incomplete
outline: Incomplete
diagonalUp: Incomplete
diagonalDown: Incomplete
start: Typed[Side, Literal[True]]
end: Typed[Side, Literal[True]]
left: Typed[Side, Literal[True]]
right: Typed[Side, Literal[True]]
top: Typed[Side, Literal[True]]
bottom: Typed[Side, Literal[True]]
diagonal: Typed[Side, Literal[True]]
vertical: Typed[Side, Literal[True]]
horizontal: Typed[Side, Literal[True]]
outline: Bool[Literal[False]]
diagonalUp: Bool[Literal[False]]
diagonalDown: Bool[Literal[False]]
diagonal_direction: Incomplete
def __init__(
self,
left: Incomplete | None = None,
right: Incomplete | None = None,
top: Incomplete | None = None,
bottom: Incomplete | None = None,
diagonal: Incomplete | None = None,
left: Side | None = None,
right: Side | None = None,
top: Side | None = None,
bottom: Side | None = None,
diagonal: Side | None = None,
diagonal_direction: Incomplete | None = None,
vertical: Incomplete | None = None,
horizontal: Incomplete | None = None,
diagonalUp: bool = False,
diagonalDown: bool = False,
outline: bool = True,
start: Incomplete | None = None,
end: Incomplete | None = None,
vertical: Side | None = None,
horizontal: Side | None = None,
diagonalUp: _ConvertibleToBool = False,
diagonalDown: _ConvertibleToBool = False,
outline: _ConvertibleToBool = True,
start: Side | None = None,
end: Side | None = None,
) -> None: ...
def __iter__(self): ...

View File

@@ -1,13 +1,19 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from array import array
from typing_extensions import Literal
from openpyxl.descriptors import Strict
from openpyxl.descriptors.base import Bool, Integer, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.styles.alignment import Alignment
from openpyxl.styles.protection import Protection
class ArrayDescriptor:
key: Incomplete
def __init__(self, key) -> None: ...
def __get__(self, instance, cls): ...
def __set__(self, instance, value) -> None: ...
def __get__(self, instance: Serialisable | Strict, cls: Unused): ...
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
class StyleArray(array[Incomplete]):
tagname: str
@@ -27,43 +33,43 @@ class StyleArray(array[Incomplete]):
class CellStyle(Serialisable):
tagname: str
numFmtId: Incomplete
fontId: Incomplete
fillId: Incomplete
borderId: Incomplete
xfId: Incomplete
quotePrefix: Incomplete
pivotButton: Incomplete
applyNumberFormat: Incomplete
applyFont: Incomplete
applyFill: Incomplete
applyBorder: Incomplete
numFmtId: Integer[Literal[False]]
fontId: Integer[Literal[False]]
fillId: Integer[Literal[False]]
borderId: Integer[Literal[False]]
xfId: Integer[Literal[True]]
quotePrefix: Bool[Literal[True]]
pivotButton: Bool[Literal[True]]
applyNumberFormat: Bool[Literal[True]]
applyFont: Bool[Literal[True]]
applyFill: Bool[Literal[True]]
applyBorder: Bool[Literal[True]]
# Overwritten by properties below
# applyAlignment: Bool
# applyProtection: Bool
alignment: Incomplete
protection: Incomplete
extLst: Incomplete
# applyAlignment: Bool[Literal[True]]
# applyProtection: Bool[Literal[True]]
alignment: Typed[Alignment, Literal[True]]
protection: Typed[Protection, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
__attrs__: Incomplete
def __init__(
self,
numFmtId: int = 0,
fontId: int = 0,
fillId: int = 0,
borderId: int = 0,
xfId: Incomplete | None = None,
quotePrefix: Incomplete | None = None,
pivotButton: Incomplete | None = None,
applyNumberFormat: Incomplete | None = None,
applyFont: Incomplete | None = None,
applyFill: Incomplete | None = None,
applyBorder: Incomplete | None = None,
applyAlignment: Incomplete | None = None,
applyProtection: Incomplete | None = None,
alignment: Incomplete | None = None,
protection: Incomplete | None = None,
extLst: Incomplete | None = None,
numFmtId: _ConvertibleToInt = 0,
fontId: _ConvertibleToInt = 0,
fillId: _ConvertibleToInt = 0,
borderId: _ConvertibleToInt = 0,
xfId: _ConvertibleToInt | None = None,
quotePrefix: _ConvertibleToBool | None = None,
pivotButton: _ConvertibleToBool | None = None,
applyNumberFormat: _ConvertibleToBool | None = None,
applyFont: _ConvertibleToBool | None = None,
applyFill: _ConvertibleToBool | None = None,
applyBorder: _ConvertibleToBool | None = None,
applyAlignment: Unused = None,
applyProtection: Unused = None,
alignment: Alignment | None = None,
protection: Protection | None = None,
extLst: Unused = None,
) -> None: ...
def to_array(self): ...
@classmethod
@@ -82,7 +88,7 @@ class CellStyleList(Serialisable):
alignment: Incomplete
protection: Incomplete
__elements__: Incomplete
def __init__(self, count: Incomplete | None = None, xf=()) -> None: ...
def __init__(self, count: Unused = None, xf=()) -> None: ...
@property
def count(self): ...
def __getitem__(self, idx): ...

View File

@@ -1,6 +1,8 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors import Typed
from openpyxl.descriptors import Strict, Typed
from openpyxl.descriptors.base import Bool, Integer, MinMax, String, _ConvertibleToBool, _ConvertibleToFloat, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
COLOR_INDEX: Incomplete
@@ -9,27 +11,27 @@ WHITE: Incomplete
BLUE: Incomplete
aRGB_REGEX: Incomplete
class RGB(Typed):
expected_type: Incomplete
def __set__(self, instance, value) -> None: ...
class RGB(Typed[str, Incomplete]):
expected_type: type[str]
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
class Color(Serialisable):
tagname: str
rgb: Incomplete
indexed: Incomplete
auto: Incomplete
theme: Incomplete
tint: Incomplete
type: Incomplete
indexed: Integer[Literal[False]]
auto: Bool[Literal[False]]
theme: Integer[Literal[False]]
tint: MinMax[float, Literal[False]]
type: String[Literal[False]]
def __init__(
self,
rgb="00000000",
indexed: Incomplete | None = None,
auto: Incomplete | None = None,
theme: Incomplete | None = None,
tint: float = 0.0,
index: Incomplete | None = None,
type: str = "rgb",
indexed: _ConvertibleToInt | None = None,
auto: _ConvertibleToBool | None = None,
theme: _ConvertibleToInt | None = None,
tint: _ConvertibleToFloat = 0.0,
index: _ConvertibleToInt | None = None,
type: Unused = "rgb",
) -> None: ...
@property
def value(self): ...
@@ -40,9 +42,9 @@ class Color(Serialisable):
def index(self): ...
def __add__(self, other): ...
class ColorDescriptor(Typed):
expected_type: Incomplete
def __set__(self, instance, value) -> None: ...
class ColorDescriptor(Typed[Color, Incomplete]):
expected_type: type[Color]
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
class RgbColor(Serialisable):
tagname: str

View File

@@ -1,32 +1,37 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Alias, Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.styles import Alignment, Border, Fill, Font, Protection
from openpyxl.styles.numbers import NumberFormat
class DifferentialStyle(Serialisable):
tagname: str
__elements__: Incomplete
font: Incomplete
numFmt: Incomplete
fill: Incomplete
alignment: Incomplete
border: Incomplete
protection: Incomplete
extLst: Incomplete
font: Typed[Font, Literal[True]]
numFmt: Typed[NumberFormat, Literal[True]]
fill: Typed[Fill, Literal[True]]
alignment: Typed[Alignment, Literal[True]]
border: Typed[Border, Literal[True]]
protection: Typed[Protection, Literal[True]]
extLst: ExtensionList | None
def __init__(
self,
font: Incomplete | None = None,
numFmt: Incomplete | None = None,
fill: Incomplete | None = None,
alignment: Incomplete | None = None,
border: Incomplete | None = None,
protection: Incomplete | None = None,
extLst: Incomplete | None = None,
font: Font | None = None,
numFmt: NumberFormat | None = None,
fill: Fill | None = None,
alignment: Alignment | None = None,
border: Border | None = None,
protection: Protection | None = None,
extLst: ExtensionList | None = None,
) -> None: ...
class DifferentialStyleList(Serialisable):
tagname: str
dxf: Incomplete
styles: Incomplete
styles: Alias
__attrs__: Incomplete
def __init__(self, dxf=(), count: Incomplete | None = None) -> None: ...
def append(self, dxf) -> None: ...

View File

@@ -1,28 +1,53 @@
from _typeshed import Incomplete
from typing_extensions import Final, Literal, TypeAlias
from openpyxl.descriptors import Sequence
from openpyxl.descriptors.base import Alias, Float, MinMax, NoneSet, Set, _ConvertibleToFloat
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: Incomplete
FILL_NONE: Final = "none"
FILL_SOLID: Final = "solid"
FILL_PATTERN_DARKDOWN: Final = "darkDown"
FILL_PATTERN_DARKGRAY: Final = "darkGray"
FILL_PATTERN_DARKGRID: Final = "darkGrid"
FILL_PATTERN_DARKHORIZONTAL: Final = "darkHorizontal"
FILL_PATTERN_DARKTRELLIS: Final = "darkTrellis"
FILL_PATTERN_DARKUP: Final = "darkUp"
FILL_PATTERN_DARKVERTICAL: Final = "darkVertical"
FILL_PATTERN_GRAY0625: Final = "gray0625"
FILL_PATTERN_GRAY125: Final = "gray125"
FILL_PATTERN_LIGHTDOWN: Final = "lightDown"
FILL_PATTERN_LIGHTGRAY: Final = "lightGray"
FILL_PATTERN_LIGHTGRID: Final = "lightGrid"
FILL_PATTERN_LIGHTHORIZONTAL: Final = "lightHorizontal"
FILL_PATTERN_LIGHTTRELLIS: Final = "lightTrellis"
FILL_PATTERN_LIGHTUP: Final = "lightUp"
FILL_PATTERN_LIGHTVERTICAL: Final = "lightVertical"
FILL_PATTERN_MEDIUMGRAY: Final = "mediumGray"
_GradientFillType: TypeAlias = Literal["linear", "path"]
_FillsType: TypeAlias = Literal[
"none",
"solid",
"darkDown",
"darkGray",
"darkGrid",
"darkHorizontal",
"darkTrellis",
"darkUp",
"darkVertical",
"gray0625",
"gray125",
"lightDown",
"lightGray",
"lightGrid",
"lightHorizontal",
"lightTrellis",
"lightUp",
"lightVertical",
"mediumGray",
]
fills: tuple[_FillsType, ...]
class Fill(Serialisable):
tagname: str
@@ -32,12 +57,12 @@ class Fill(Serialisable):
class PatternFill(Fill):
tagname: str
__elements__: Incomplete
patternType: Incomplete
fill_type: Incomplete
patternType: NoneSet[_FillsType]
fill_type: Alias
fgColor: Incomplete
start_color: Incomplete
start_color: Alias
bgColor: Incomplete
end_color: Incomplete
end_color: Alias
def __init__(
self,
patternType: Incomplete | None = None,
@@ -54,26 +79,33 @@ DEFAULT_GRAY_FILL: Incomplete
class Stop(Serialisable):
tagname: str
position: Incomplete
position: MinMax[float, Literal[False]]
color: Incomplete
def __init__(self, color, position) -> None: ...
def __init__(self, color, position: _ConvertibleToFloat) -> None: ...
class StopList(Sequence):
expected_type: Incomplete
expected_type: type[Incomplete]
def __set__(self, obj, values) -> None: ...
class GradientFill(Fill):
tagname: str
type: Incomplete
fill_type: Incomplete
degree: Incomplete
left: Incomplete
right: Incomplete
top: Incomplete
bottom: Incomplete
type: Set[_GradientFillType]
fill_type: Alias
degree: Float[Literal[False]]
left: Float[Literal[False]]
right: Float[Literal[False]]
top: Float[Literal[False]]
bottom: Float[Literal[False]]
stop: Incomplete
def __init__(
self, type: str = "linear", degree: int = 0, left: int = 0, right: int = 0, top: int = 0, bottom: int = 0, stop=()
self,
type: _GradientFillType = "linear",
degree: _ConvertibleToFloat = 0,
left: _ConvertibleToFloat = 0,
right: _ConvertibleToFloat = 0,
top: _ConvertibleToFloat = 0,
bottom: _ConvertibleToFloat = 0,
stop=(),
) -> None: ...
def __iter__(self): ...
def to_tree(self, tagname: Incomplete | None = None, namespace: Incomplete | None = None, idx: Incomplete | None = None): ... # type: ignore[override]

View File

@@ -1,5 +1,6 @@
from _typeshed import Incomplete
from openpyxl.descriptors.base import Alias
from openpyxl.descriptors.serialisable import Serialisable
class Font(Serialisable):
@@ -11,19 +12,19 @@ class Font(Serialisable):
charset: Incomplete
family: Incomplete
sz: Incomplete
size: Incomplete
size: Alias
b: Incomplete
bold: Incomplete
bold: Alias
i: Incomplete
italic: Incomplete
italic: Alias
strike: Incomplete
strikethrough: Incomplete
strikethrough: Alias
outline: Incomplete
shadow: Incomplete
condense: Incomplete
extend: Incomplete
u: Incomplete
underline: Incomplete
underline: Alias
vertAlign: Incomplete
color: Incomplete
scheme: Incomplete

View File

@@ -1,31 +1,39 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors.base import Bool, Integer, String, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.styles.alignment import Alignment
from openpyxl.styles.borders import Border
from openpyxl.styles.fills import Fill
from openpyxl.styles.fonts import Font
from openpyxl.styles.protection import Protection
class NamedStyle(Serialisable): # type: ignore[misc]
font: Incomplete
fill: Incomplete
border: Incomplete
alignment: Incomplete
class NamedStyle(Serialisable):
font: Typed[Font, Literal[False]]
fill: Typed[Fill, Literal[False]]
border: Typed[Border, Literal[False]]
alignment: Typed[Alignment, Literal[False]]
number_format: Incomplete
protection: Incomplete
builtinId: Incomplete
hidden: Incomplete
protection: Typed[Protection, Literal[False]]
builtinId: Integer[Literal[True]]
hidden: Bool[Literal[True]]
# Overwritten by property below
# xfId: Integer
name: Incomplete
name: String[Literal[False]]
def __init__(
self,
name: str = "Normal",
font=None,
fill=None,
border=None,
alignment=None,
font: Font | None = None,
fill: Fill | None = None,
border: Border | None = None,
alignment: Alignment | None = None,
number_format: Incomplete | None = None,
protection=None,
builtinId: Incomplete | None = None,
hidden: bool = False,
xfId: Incomplete | None = None,
protection: Protection | None = None,
builtinId: _ConvertibleToInt | None = None,
hidden: _ConvertibleToBool | None = False,
xfId: Unused = None,
) -> None: ...
def __setattr__(self, attr: str, value) -> None: ...
def __iter__(self): ...
@@ -44,23 +52,23 @@ class NamedStyleList(list[Incomplete]):
class _NamedCellStyle(Serialisable):
tagname: str
name: Incomplete
xfId: Incomplete
builtinId: Incomplete
iLevel: Incomplete
hidden: Incomplete
customBuiltin: Incomplete
extLst: Incomplete
name: String[Literal[False]]
xfId: Integer[Literal[False]]
builtinId: Integer[Literal[True]]
iLevel: Integer[Literal[True]]
hidden: Bool[Literal[True]]
customBuiltin: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
name: Incomplete | None = None,
xfId: Incomplete | None = None,
builtinId: Incomplete | None = None,
iLevel: Incomplete | None = None,
hidden: Incomplete | None = None,
customBuiltin: Incomplete | None = None,
extLst: Incomplete | None = None,
name: str,
xfId: _ConvertibleToInt,
builtinId: _ConvertibleToInt | None = None,
iLevel: _ConvertibleToInt | None = None,
hidden: _ConvertibleToBool | None = None,
customBuiltin: _ConvertibleToBool | None = None,
extLst: Unused = None,
) -> None: ...
class _NamedCellStyleList(Serialisable):
@@ -69,7 +77,7 @@ class _NamedCellStyleList(Serialisable):
# count: Integer
cellStyle: Incomplete
__attrs__: Incomplete
def __init__(self, count: Incomplete | None = None, cellStyle=()) -> None: ...
def __init__(self, count: Unused = None, cellStyle=()) -> None: ...
@property
def count(self): ...
@property

View File

@@ -1,6 +1,8 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors import String
from openpyxl.descriptors import Strict, String
from openpyxl.descriptors.base import Integer, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
BUILTIN_FORMATS: Incomplete
@@ -53,21 +55,21 @@ def is_builtin(fmt): ...
def builtin_format_code(index): ...
def builtin_format_id(fmt): ...
class NumberFormatDescriptor(String):
def __set__(self, instance, value) -> None: ...
class NumberFormatDescriptor(String[Incomplete]):
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
class NumberFormat(Serialisable): # type: ignore[misc]
numFmtId: Incomplete
formatCode: Incomplete
def __init__(self, numFmtId: Incomplete | None = None, formatCode: Incomplete | None = None) -> None: ...
class NumberFormat(Serialisable):
numFmtId: Integer[Literal[False]]
formatCode: String[Literal[False]]
def __init__(self, numFmtId: _ConvertibleToInt, formatCode: str) -> None: ...
class NumberFormatList(Serialisable): # type: ignore[misc]
class NumberFormatList(Serialisable):
# Overwritten by property below
# count: Integer
numFmt: Incomplete
__elements__: Incomplete
__attrs__: Incomplete
def __init__(self, count: Incomplete | None = None, numFmt=()) -> None: ...
def __init__(self, count: Unused = None, numFmt=()) -> None: ...
@property
def count(self): ...
def __getitem__(self, idx): ...

View File

@@ -1,30 +1,33 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from warnings import warn as warn
from openpyxl.descriptors import Strict
from openpyxl.descriptors.serialisable import Serialisable
class StyleDescriptor:
collection: Incomplete
key: Incomplete
def __init__(self, collection, key) -> None: ...
def __set__(self, instance, value) -> None: ...
def __get__(self, instance, cls): ...
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
def __get__(self, instance: Serialisable | Strict, cls: Unused): ...
class NumberFormatDescriptor:
key: str
collection: str
def __set__(self, instance, value) -> None: ...
def __get__(self, instance, cls): ...
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
def __get__(self, instance: Serialisable | Strict, cls: Unused): ...
class NamedStyleDescriptor:
key: str
collection: str
def __set__(self, instance, value) -> None: ...
def __get__(self, instance, cls): ...
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
def __get__(self, instance: Serialisable | Strict, cls: Unused): ...
class StyleArrayDescriptor:
key: Incomplete
def __init__(self, key) -> None: ...
def __set__(self, instance, value) -> None: ...
def __get__(self, instance, cls): ...
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
def __get__(self, instance: Serialisable | Strict, cls: Unused): ...
class StyleableObject:
font: Incomplete

View File

@@ -1,20 +1,28 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal
from openpyxl.descriptors.base import Typed
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.styles.cell_style import CellStyleList
from openpyxl.styles.colors import ColorList
from openpyxl.styles.named_styles import _NamedCellStyleList
from openpyxl.styles.numbers import NumberFormatList
from openpyxl.styles.table import TableStyleList
class Stylesheet(Serialisable):
tagname: str
numFmts: Incomplete
numFmts: Typed[NumberFormatList, Literal[False]]
fonts: Incomplete
fills: Incomplete
borders: Incomplete
cellStyleXfs: Incomplete
cellXfs: Incomplete
cellStyles: Incomplete
cellStyleXfs: Typed[CellStyleList, Literal[False]]
cellXfs: Typed[CellStyleList, Literal[False]]
cellStyles: Typed[_NamedCellStyleList, Literal[False]]
dxfs: Incomplete
tableStyles: Incomplete
colors: Incomplete
extLst: Incomplete
tableStyles: Typed[TableStyleList, Literal[True]]
colors: Typed[ColorList, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
number_formats: Incomplete
cell_styles: Incomplete
@@ -23,17 +31,17 @@ class Stylesheet(Serialisable):
named_styles: Incomplete
def __init__(
self,
numFmts: Incomplete | None = None,
numFmts: NumberFormatList | None = None,
fonts=(),
fills=(),
borders=(),
cellStyleXfs: Incomplete | None = None,
cellXfs: Incomplete | None = None,
cellStyles: Incomplete | None = None,
cellStyleXfs: CellStyleList | None = None,
cellXfs: CellStyleList | None = None,
cellStyles: _NamedCellStyleList | None = None,
dxfs=(),
tableStyles: Incomplete | None = None,
colors: Incomplete | None = None,
extLst: Incomplete | None = None,
tableStyles: TableStyleList | None = None,
colors: ColorList | None = None,
extLst: Unused = None,
) -> None: ...
@classmethod
def from_tree(cls, node): ...

View File

@@ -1,45 +1,78 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Bool, Integer, Set, String, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
_TableStyleElementType: TypeAlias = Literal[
"wholeTable",
"headerRow",
"totalRow",
"firstColumn",
"lastColumn",
"firstRowStripe",
"secondRowStripe",
"firstColumnStripe",
"secondColumnStripe",
"firstHeaderCell",
"lastHeaderCell",
"firstTotalCell",
"lastTotalCell",
"firstSubtotalColumn",
"secondSubtotalColumn",
"thirdSubtotalColumn",
"firstSubtotalRow",
"secondSubtotalRow",
"thirdSubtotalRow",
"blankRow",
"firstColumnSubheading",
"secondColumnSubheading",
"thirdColumnSubheading",
"firstRowSubheading",
"secondRowSubheading",
"thirdRowSubheading",
"pageFieldLabels",
"pageFieldValues",
]
class TableStyleElement(Serialisable):
tagname: str
type: Incomplete
size: Incomplete
dxfId: Incomplete
type: Set[_TableStyleElementType]
size: Integer[Literal[True]]
dxfId: Integer[Literal[True]]
def __init__(
self, type: Incomplete | None = None, size: Incomplete | None = None, dxfId: Incomplete | None = None
self, type: _TableStyleElementType, size: _ConvertibleToInt | None = None, dxfId: _ConvertibleToInt | None = None
) -> None: ...
class TableStyle(Serialisable):
tagname: str
name: Incomplete
pivot: Incomplete
table: Incomplete
count: Incomplete
name: String[Literal[False]]
pivot: Bool[Literal[True]]
table: Bool[Literal[True]]
count: Integer[Literal[True]]
tableStyleElement: Incomplete
__elements__: Incomplete
def __init__(
self,
name: Incomplete | None = None,
pivot: Incomplete | None = None,
table: Incomplete | None = None,
count: Incomplete | None = None,
name: str,
pivot: _ConvertibleToBool | None = None,
table: _ConvertibleToBool | None = None,
count: _ConvertibleToInt | None = None,
tableStyleElement=(),
) -> None: ...
class TableStyleList(Serialisable):
tagname: str
defaultTableStyle: Incomplete
defaultPivotStyle: Incomplete
defaultTableStyle: String[Literal[True]]
defaultPivotStyle: String[Literal[True]]
tableStyle: Incomplete
__elements__: Incomplete
__attrs__: Incomplete
def __init__(
self,
count: Incomplete | None = None,
defaultTableStyle: str = "TableStyleMedium9",
defaultPivotStyle: str = "PivotStyleLight16",
count: Unused = None,
defaultTableStyle: str | None = "TableStyleMedium9",
defaultPivotStyle: str | None = "PivotStyleLight16",
tableStyle=(),
) -> None: ...
@property

View File

@@ -2,8 +2,10 @@ from _typeshed import Incomplete
from collections import defaultdict
from collections.abc import Generator
from re import Pattern
from typing_extensions import Literal
from openpyxl.descriptors import Sequence
from openpyxl.descriptors.base import Alias, Bool, Integer, String, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
RESERVED: frozenset[str]
@@ -11,40 +13,40 @@ RESERVED_REGEX: Pattern[str]
class DefinedName(Serialisable):
tagname: str
name: Incomplete
comment: Incomplete
customMenu: Incomplete
description: Incomplete
help: Incomplete
statusBar: Incomplete
localSheetId: Incomplete
hidden: Incomplete
function: Incomplete
vbProcedure: Incomplete
xlm: Incomplete
functionGroupId: Incomplete
shortcutKey: Incomplete
publishToServer: Incomplete
workbookParameter: Incomplete
name: String[Literal[False]]
comment: String[Literal[True]]
customMenu: String[Literal[True]]
description: String[Literal[True]]
help: String[Literal[True]]
statusBar: String[Literal[True]]
localSheetId: Integer[Literal[True]]
hidden: Bool[Literal[True]]
function: Bool[Literal[True]]
vbProcedure: Bool[Literal[True]]
xlm: Bool[Literal[True]]
functionGroupId: Integer[Literal[True]]
shortcutKey: String[Literal[True]]
publishToServer: Bool[Literal[True]]
workbookParameter: Bool[Literal[True]]
attr_text: Incomplete
value: Incomplete
value: Alias
def __init__(
self,
name: Incomplete | None = None,
comment: Incomplete | None = None,
customMenu: Incomplete | None = None,
description: Incomplete | None = None,
help: Incomplete | None = None,
statusBar: Incomplete | None = None,
localSheetId: Incomplete | None = None,
hidden: Incomplete | None = None,
function: Incomplete | None = None,
vbProcedure: Incomplete | None = None,
xlm: Incomplete | None = None,
functionGroupId: Incomplete | None = None,
shortcutKey: Incomplete | None = None,
publishToServer: Incomplete | None = None,
workbookParameter: Incomplete | None = None,
name: str,
comment: str | None = None,
customMenu: str | None = None,
description: str | None = None,
help: str | None = None,
statusBar: str | None = None,
localSheetId: _ConvertibleToInt | None = None,
hidden: _ConvertibleToBool | None = None,
function: _ConvertibleToBool | None = None,
vbProcedure: _ConvertibleToBool | None = None,
xlm: _ConvertibleToBool | None = None,
functionGroupId: _ConvertibleToInt | None = None,
shortcutKey: str | None = None,
publishToServer: _ConvertibleToBool | None = None,
workbookParameter: _ConvertibleToBool | None = None,
attr_text: Incomplete | None = None,
) -> None: ...
@property

View File

@@ -1,75 +1,78 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Bool, Integer, NoneSet, String, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.packaging.relationship import Relationship
class ExternalCell(Serialisable): # type: ignore[misc]
r: Incomplete
t: Incomplete
vm: Incomplete
_ExternalCellType: TypeAlias = Literal["b", "d", "n", "e", "s", "str", "inlineStr"]
class ExternalCell(Serialisable):
r: String[Literal[False]]
t: NoneSet[_ExternalCellType]
vm: Integer[Literal[True]]
v: Incomplete
def __init__(
self, r: Incomplete | None = None, t: Incomplete | None = None, vm: Incomplete | None = None, v: Incomplete | None = None
self,
r: str,
t: _ExternalCellType | Literal["none"] | None = None,
vm: _ConvertibleToInt | None = None,
v: Incomplete | None = None,
) -> None: ...
class ExternalRow(Serialisable): # type: ignore[misc]
r: Incomplete
class ExternalRow(Serialisable):
r: Integer[Literal[False]]
cell: Incomplete
__elements__: Incomplete
def __init__(self, r=(), cell: Incomplete | None = None) -> None: ...
def __init__(self, r: _ConvertibleToInt, cell: Incomplete | None = None) -> None: ...
class ExternalSheetData(Serialisable): # type: ignore[misc]
sheetId: Incomplete
refreshError: Incomplete
class ExternalSheetData(Serialisable):
sheetId: Integer[Literal[False]]
refreshError: Bool[Literal[True]]
row: Incomplete
__elements__: Incomplete
def __init__(self, sheetId: Incomplete | None = None, refreshError: Incomplete | None = None, row=()) -> None: ...
def __init__(self, sheetId: _ConvertibleToInt, refreshError: _ConvertibleToBool | None = None, row=()) -> None: ...
class ExternalSheetDataSet(Serialisable): # type: ignore[misc]
class ExternalSheetDataSet(Serialisable):
sheetData: Incomplete
__elements__: Incomplete
def __init__(self, sheetData: Incomplete | None = None) -> None: ...
class ExternalSheetNames(Serialisable): # type: ignore[misc]
class ExternalSheetNames(Serialisable):
sheetName: Incomplete
__elements__: Incomplete
def __init__(self, sheetName=()) -> None: ...
class ExternalDefinedName(Serialisable):
tagname: str
name: Incomplete
refersTo: Incomplete
sheetId: Incomplete
def __init__(
self, name: Incomplete | None = None, refersTo: Incomplete | None = None, sheetId: Incomplete | None = None
) -> None: ...
name: String[Literal[False]]
refersTo: String[Literal[True]]
sheetId: Integer[Literal[True]]
def __init__(self, name: str, refersTo: str | None = None, sheetId: _ConvertibleToInt | None = None) -> None: ...
class ExternalBook(Serialisable):
tagname: str
sheetNames: Incomplete
sheetNames: Typed[ExternalSheetNames, Literal[True]]
definedNames: Incomplete
sheetDataSet: Incomplete
sheetDataSet: Typed[ExternalSheetDataSet, Literal[True]]
id: Incomplete
__elements__: Incomplete
def __init__(
self,
sheetNames: Incomplete | None = None,
sheetNames: ExternalSheetNames | None = None,
definedNames=(),
sheetDataSet: Incomplete | None = None,
sheetDataSet: ExternalSheetDataSet | None = None,
id: Incomplete | None = None,
) -> None: ...
class ExternalLink(Serialisable):
tagname: str
mime_type: str
externalBook: Incomplete
file_link: Incomplete
externalBook: Typed[ExternalBook, Literal[True]]
file_link: Typed[Relationship, Literal[True]]
__elements__: Incomplete
def __init__(
self,
externalBook: Incomplete | None = None,
ddeLink: Incomplete | None = None,
oleLink: Incomplete | None = None,
extLst: Incomplete | None = None,
self, externalBook: ExternalBook | None = None, ddeLink: Unused = None, oleLink: Unused = None, extLst: Unused = None
) -> None: ...
def to_tree(self): ...
@property

View File

@@ -1,15 +1,17 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Integer, String, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
class FunctionGroup(Serialisable):
tagname: str
name: Incomplete
def __init__(self, name: Incomplete | None = None) -> None: ...
name: String[Literal[False]]
def __init__(self, name: str) -> None: ...
class FunctionGroupList(Serialisable):
tagname: str
builtInGroupCount: Incomplete
builtInGroupCount: Integer[Literal[True]]
functionGroup: Incomplete
__elements__: Incomplete
def __init__(self, builtInGroupCount: int = 16, functionGroup=()) -> None: ...
def __init__(self, builtInGroupCount: _ConvertibleToInt | None = 16, functionGroup=()) -> None: ...

View File

@@ -1,95 +1,111 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import (
Bool,
Float,
Integer,
NoneSet,
String,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.serialisable import Serialisable
_WorkbookPropertiesShowObjects: TypeAlias = Literal["all", "placeholders"]
_WorkbookPropertiesUpdateLinks: TypeAlias = Literal["userSet", "never", "always"]
_CalcPropertiesCalcMode: TypeAlias = Literal["manual", "auto", "autoNoTable"]
_CalcPropertiesRefMode: TypeAlias = Literal["A1", "R1C1"]
class WorkbookProperties(Serialisable):
tagname: str
date1904: Incomplete
dateCompatibility: Incomplete
showObjects: Incomplete
showBorderUnselectedTables: Incomplete
filterPrivacy: Incomplete
promptedSolutions: Incomplete
showInkAnnotation: Incomplete
backupFile: Incomplete
saveExternalLinkValues: Incomplete
updateLinks: Incomplete
codeName: Incomplete
hidePivotFieldList: Incomplete
showPivotChartFilter: Incomplete
allowRefreshQuery: Incomplete
publishItems: Incomplete
checkCompatibility: Incomplete
autoCompressPictures: Incomplete
refreshAllConnections: Incomplete
defaultThemeVersion: Incomplete
date1904: Bool[Literal[True]]
dateCompatibility: Bool[Literal[True]]
showObjects: NoneSet[_WorkbookPropertiesShowObjects]
showBorderUnselectedTables: Bool[Literal[True]]
filterPrivacy: Bool[Literal[True]]
promptedSolutions: Bool[Literal[True]]
showInkAnnotation: Bool[Literal[True]]
backupFile: Bool[Literal[True]]
saveExternalLinkValues: Bool[Literal[True]]
updateLinks: NoneSet[_WorkbookPropertiesUpdateLinks]
codeName: String[Literal[True]]
hidePivotFieldList: Bool[Literal[True]]
showPivotChartFilter: Bool[Literal[True]]
allowRefreshQuery: Bool[Literal[True]]
publishItems: Bool[Literal[True]]
checkCompatibility: Bool[Literal[True]]
autoCompressPictures: Bool[Literal[True]]
refreshAllConnections: Bool[Literal[True]]
defaultThemeVersion: Integer[Literal[True]]
def __init__(
self,
date1904: Incomplete | None = None,
dateCompatibility: Incomplete | None = None,
showObjects: Incomplete | None = None,
showBorderUnselectedTables: Incomplete | None = None,
filterPrivacy: Incomplete | None = None,
promptedSolutions: Incomplete | None = None,
showInkAnnotation: Incomplete | None = None,
backupFile: Incomplete | None = None,
saveExternalLinkValues: Incomplete | None = None,
updateLinks: Incomplete | None = None,
codeName: Incomplete | None = None,
hidePivotFieldList: Incomplete | None = None,
showPivotChartFilter: Incomplete | None = None,
allowRefreshQuery: Incomplete | None = None,
publishItems: Incomplete | None = None,
checkCompatibility: Incomplete | None = None,
autoCompressPictures: Incomplete | None = None,
refreshAllConnections: Incomplete | None = None,
defaultThemeVersion: Incomplete | None = None,
date1904: _ConvertibleToBool | None = None,
dateCompatibility: _ConvertibleToBool | None = None,
showObjects: _WorkbookPropertiesShowObjects | Literal["none"] | None = None,
showBorderUnselectedTables: _ConvertibleToBool | None = None,
filterPrivacy: _ConvertibleToBool | None = None,
promptedSolutions: _ConvertibleToBool | None = None,
showInkAnnotation: _ConvertibleToBool | None = None,
backupFile: _ConvertibleToBool | None = None,
saveExternalLinkValues: _ConvertibleToBool | None = None,
updateLinks: _WorkbookPropertiesUpdateLinks | Literal["none"] | None = None,
codeName: str | None = None,
hidePivotFieldList: _ConvertibleToBool | None = None,
showPivotChartFilter: _ConvertibleToBool | None = None,
allowRefreshQuery: _ConvertibleToBool | None = None,
publishItems: _ConvertibleToBool | None = None,
checkCompatibility: _ConvertibleToBool | None = None,
autoCompressPictures: _ConvertibleToBool | None = None,
refreshAllConnections: _ConvertibleToBool | None = None,
defaultThemeVersion: _ConvertibleToInt | None = None,
) -> None: ...
class CalcProperties(Serialisable):
tagname: str
calcId: Incomplete
calcMode: Incomplete
fullCalcOnLoad: Incomplete
refMode: Incomplete
iterate: Incomplete
iterateCount: Incomplete
iterateDelta: Incomplete
fullPrecision: Incomplete
calcCompleted: Incomplete
calcOnSave: Incomplete
concurrentCalc: Incomplete
concurrentManualCount: Incomplete
forceFullCalc: Incomplete
calcId: Integer[Literal[False]]
calcMode: NoneSet[_CalcPropertiesCalcMode]
fullCalcOnLoad: Bool[Literal[True]]
refMode: NoneSet[_CalcPropertiesRefMode]
iterate: Bool[Literal[True]]
iterateCount: Integer[Literal[True]]
iterateDelta: Float[Literal[True]]
fullPrecision: Bool[Literal[True]]
calcCompleted: Bool[Literal[True]]
calcOnSave: Bool[Literal[True]]
concurrentCalc: Bool[Literal[True]]
concurrentManualCount: Integer[Literal[True]]
forceFullCalc: Bool[Literal[True]]
def __init__(
self,
calcId: int = 124519,
calcMode: Incomplete | None = None,
fullCalcOnLoad: bool = True,
refMode: Incomplete | None = None,
iterate: Incomplete | None = None,
iterateCount: Incomplete | None = None,
iterateDelta: Incomplete | None = None,
fullPrecision: Incomplete | None = None,
calcCompleted: Incomplete | None = None,
calcOnSave: Incomplete | None = None,
concurrentCalc: Incomplete | None = None,
concurrentManualCount: Incomplete | None = None,
forceFullCalc: Incomplete | None = None,
calcId: _ConvertibleToInt = 124519,
calcMode: _CalcPropertiesCalcMode | Literal["none"] | None = None,
fullCalcOnLoad: _ConvertibleToBool | None = True,
refMode: _CalcPropertiesRefMode | Literal["none"] | None = None,
iterate: _ConvertibleToBool | None = None,
iterateCount: _ConvertibleToInt | None = None,
iterateDelta: _ConvertibleToFloat | None = None,
fullPrecision: _ConvertibleToBool | None = None,
calcCompleted: _ConvertibleToBool | None = None,
calcOnSave: _ConvertibleToBool | None = None,
concurrentCalc: _ConvertibleToBool | None = None,
concurrentManualCount: _ConvertibleToInt | None = None,
forceFullCalc: _ConvertibleToBool | None = None,
) -> None: ...
class FileVersion(Serialisable):
tagname: str
appName: Incomplete
lastEdited: Incomplete
lowestEdited: Incomplete
rupBuild: Incomplete
appName: String[Literal[True]]
lastEdited: String[Literal[True]]
lowestEdited: String[Literal[True]]
rupBuild: String[Literal[True]]
codeName: Incomplete
def __init__(
self,
appName: Incomplete | None = None,
lastEdited: Incomplete | None = None,
lowestEdited: Incomplete | None = None,
rupBuild: Incomplete | None = None,
appName: str | None = None,
lastEdited: str | None = None,
lowestEdited: str | None = None,
rupBuild: str | None = None,
codeName: Incomplete | None = None,
) -> None: ...

View File

@@ -1,45 +1,47 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Alias, Bool, Integer, String, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
class WorkbookProtection(Serialisable):
tagname: str
workbook_password: Incomplete
workbookPasswordCharacterSet: Incomplete
revision_password: Incomplete
revisionsPasswordCharacterSet: Incomplete
lockStructure: Incomplete
lock_structure: Incomplete
lockWindows: Incomplete
lock_windows: Incomplete
lockRevision: Incomplete
lock_revision: Incomplete
revisionsAlgorithmName: Incomplete
workbook_password: Alias
workbookPasswordCharacterSet: String[Literal[True]]
revision_password: Alias
revisionsPasswordCharacterSet: String[Literal[True]]
lockStructure: Bool[Literal[True]]
lock_structure: Alias
lockWindows: Bool[Literal[True]]
lock_windows: Alias
lockRevision: Bool[Literal[True]]
lock_revision: Alias
revisionsAlgorithmName: String[Literal[True]]
revisionsHashValue: Incomplete
revisionsSaltValue: Incomplete
revisionsSpinCount: Incomplete
workbookAlgorithmName: Incomplete
revisionsSpinCount: Integer[Literal[True]]
workbookAlgorithmName: String[Literal[True]]
workbookHashValue: Incomplete
workbookSaltValue: Incomplete
workbookSpinCount: Incomplete
workbookSpinCount: Integer[Literal[True]]
__attrs__: Incomplete
def __init__(
self,
workbookPassword: Incomplete | None = None,
workbookPasswordCharacterSet: Incomplete | None = None,
workbookPasswordCharacterSet: str | None = None,
revisionsPassword: Incomplete | None = None,
revisionsPasswordCharacterSet: Incomplete | None = None,
lockStructure: Incomplete | None = None,
lockWindows: Incomplete | None = None,
lockRevision: Incomplete | None = None,
revisionsAlgorithmName: Incomplete | None = None,
revisionsPasswordCharacterSet: str | None = None,
lockStructure: _ConvertibleToBool | None = None,
lockWindows: _ConvertibleToBool | None = None,
lockRevision: _ConvertibleToBool | None = None,
revisionsAlgorithmName: str | None = None,
revisionsHashValue: Incomplete | None = None,
revisionsSaltValue: Incomplete | None = None,
revisionsSpinCount: Incomplete | None = None,
workbookAlgorithmName: Incomplete | None = None,
revisionsSpinCount: _ConvertibleToInt | None = None,
workbookAlgorithmName: str | None = None,
workbookHashValue: Incomplete | None = None,
workbookSaltValue: Incomplete | None = None,
workbookSpinCount: Incomplete | None = None,
workbookSpinCount: _ConvertibleToInt | None = None,
) -> None: ...
def set_workbook_password(self, value: str = "", already_hashed: bool = False) -> None: ...
@property
@@ -58,20 +60,20 @@ DocumentSecurity = WorkbookProtection
class FileSharing(Serialisable):
tagname: str
readOnlyRecommended: Incomplete
userName: Incomplete
readOnlyRecommended: Bool[Literal[True]]
userName: String[Literal[True]]
reservationPassword: Incomplete
algorithmName: Incomplete
algorithmName: String[Literal[True]]
hashValue: Incomplete
saltValue: Incomplete
spinCount: Incomplete
spinCount: Integer[Literal[True]]
def __init__(
self,
readOnlyRecommended: Incomplete | None = None,
userName: Incomplete | None = None,
readOnlyRecommended: _ConvertibleToBool | None = None,
userName: str | None = None,
reservationPassword: Incomplete | None = None,
algorithmName: Incomplete | None = None,
algorithmName: str | None = None,
hashValue: Incomplete | None = None,
saltValue: Incomplete | None = None,
spinCount: Incomplete | None = None,
spinCount: _ConvertibleToInt | None = None,
) -> None: ...

View File

@@ -1,15 +1,17 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Bool, NoneSet, String, _ConvertibleToBool
from openpyxl.descriptors.serialisable import Serialisable
_SmartTagPropertiesShow: TypeAlias = Literal["all", "noIndicator"]
class SmartTag(Serialisable):
tagname: str
namespaceUri: Incomplete
name: Incomplete
url: Incomplete
def __init__(
self, namespaceUri: Incomplete | None = None, name: Incomplete | None = None, url: Incomplete | None = None
) -> None: ...
namespaceUri: String[Literal[True]]
name: String[Literal[True]]
url: String[Literal[True]]
def __init__(self, namespaceUri: str | None = None, name: str | None = None, url: str | None = None) -> None: ...
class SmartTagList(Serialisable):
tagname: str
@@ -19,6 +21,8 @@ class SmartTagList(Serialisable):
class SmartTagProperties(Serialisable):
tagname: str
embed: Incomplete
show: Incomplete
def __init__(self, embed: Incomplete | None = None, show: Incomplete | None = None) -> None: ...
embed: Bool[Literal[True]]
show: NoneSet[_SmartTagPropertiesShow]
def __init__(
self, embed: _ConvertibleToBool | None = None, show: _SmartTagPropertiesShow | Literal["none"] | None = None
) -> None: ...

View File

@@ -1,95 +1,134 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Bool, Integer, NoneSet, String, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
_BookViewVilibility: TypeAlias = Literal["visible", "hidden", "veryHidden"]
_CustomWorkbookViewShowComments: TypeAlias = Literal["commNone", "commIndicator", "commIndAndComment"]
_CustomWorkbookViewShowObjects: TypeAlias = Literal["all", "placeholders"]
class BookView(Serialisable):
tagname: str
visibility: Incomplete
minimized: Incomplete
showHorizontalScroll: Incomplete
showVerticalScroll: Incomplete
showSheetTabs: Incomplete
xWindow: Incomplete
yWindow: Incomplete
windowWidth: Incomplete
windowHeight: Incomplete
tabRatio: Incomplete
firstSheet: Incomplete
activeTab: Incomplete
autoFilterDateGrouping: Incomplete
extLst: Incomplete
visibility: NoneSet[_BookViewVilibility]
minimized: Bool[Literal[True]]
showHorizontalScroll: Bool[Literal[True]]
showVerticalScroll: Bool[Literal[True]]
showSheetTabs: Bool[Literal[True]]
xWindow: Integer[Literal[True]]
yWindow: Integer[Literal[True]]
windowWidth: Integer[Literal[True]]
windowHeight: Integer[Literal[True]]
tabRatio: Integer[Literal[True]]
firstSheet: Integer[Literal[True]]
activeTab: Integer[Literal[True]]
autoFilterDateGrouping: Bool[Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
visibility: str = "visible",
minimized: bool = False,
showHorizontalScroll: bool = True,
showVerticalScroll: bool = True,
showSheetTabs: bool = True,
xWindow: Incomplete | None = None,
yWindow: Incomplete | None = None,
windowWidth: Incomplete | None = None,
windowHeight: Incomplete | None = None,
tabRatio: int = 600,
firstSheet: int = 0,
activeTab: int = 0,
autoFilterDateGrouping: bool = True,
extLst: Incomplete | None = None,
visibility: _BookViewVilibility | Literal["none"] | None = "visible",
minimized: _ConvertibleToBool | None = False,
showHorizontalScroll: _ConvertibleToBool | None = True,
showVerticalScroll: _ConvertibleToBool | None = True,
showSheetTabs: _ConvertibleToBool | None = True,
xWindow: _ConvertibleToInt | None = None,
yWindow: _ConvertibleToInt | None = None,
windowWidth: _ConvertibleToInt | None = None,
windowHeight: _ConvertibleToInt | None = None,
tabRatio: _ConvertibleToInt | None = 600,
firstSheet: _ConvertibleToInt | None = 0,
activeTab: _ConvertibleToInt | None = 0,
autoFilterDateGrouping: _ConvertibleToBool | None = True,
extLst: Unused = None,
) -> None: ...
class CustomWorkbookView(Serialisable):
tagname: str
name: Incomplete
name: String[Literal[False]]
guid: Incomplete
autoUpdate: Incomplete
mergeInterval: Incomplete
changesSavedWin: Incomplete
onlySync: Incomplete
personalView: Incomplete
includePrintSettings: Incomplete
includeHiddenRowCol: Incomplete
maximized: Incomplete
minimized: Incomplete
showHorizontalScroll: Incomplete
showVerticalScroll: Incomplete
showSheetTabs: Incomplete
xWindow: Incomplete
yWindow: Incomplete
windowWidth: Incomplete
windowHeight: Incomplete
tabRatio: Incomplete
activeSheetId: Incomplete
showFormulaBar: Incomplete
showStatusbar: Incomplete
showComments: Incomplete
showObjects: Incomplete
extLst: Incomplete
autoUpdate: Bool[Literal[True]]
mergeInterval: Integer[Literal[True]]
changesSavedWin: Bool[Literal[True]]
onlySync: Bool[Literal[True]]
personalView: Bool[Literal[True]]
includePrintSettings: Bool[Literal[True]]
includeHiddenRowCol: Bool[Literal[True]]
maximized: Bool[Literal[True]]
minimized: Bool[Literal[True]]
showHorizontalScroll: Bool[Literal[True]]
showVerticalScroll: Bool[Literal[True]]
showSheetTabs: Bool[Literal[True]]
xWindow: Integer[Literal[False]]
yWindow: Integer[Literal[False]]
windowWidth: Integer[Literal[False]]
windowHeight: Integer[Literal[False]]
tabRatio: Integer[Literal[True]]
activeSheetId: Integer[Literal[False]]
showFormulaBar: Bool[Literal[True]]
showStatusbar: Bool[Literal[True]]
showComments: NoneSet[_CustomWorkbookViewShowComments]
showObjects: NoneSet[_CustomWorkbookViewShowObjects]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
@overload
def __init__(
self,
name: Incomplete | None = None,
name: str,
guid: Incomplete | None = None,
autoUpdate: Incomplete | None = None,
mergeInterval: Incomplete | None = None,
changesSavedWin: Incomplete | None = None,
onlySync: Incomplete | None = None,
personalView: Incomplete | None = None,
includePrintSettings: Incomplete | None = None,
includeHiddenRowCol: Incomplete | None = None,
maximized: Incomplete | None = None,
minimized: Incomplete | None = None,
showHorizontalScroll: Incomplete | None = None,
showVerticalScroll: Incomplete | None = None,
showSheetTabs: Incomplete | None = None,
xWindow: Incomplete | None = None,
yWindow: Incomplete | None = None,
windowWidth: Incomplete | None = None,
windowHeight: Incomplete | None = None,
tabRatio: Incomplete | None = None,
activeSheetId: Incomplete | None = None,
showFormulaBar: Incomplete | None = None,
showStatusbar: Incomplete | None = None,
showComments: str = "commIndicator",
showObjects: str = "all",
extLst: Incomplete | None = None,
autoUpdate: _ConvertibleToBool | None = None,
mergeInterval: _ConvertibleToInt | None = None,
changesSavedWin: _ConvertibleToBool | None = None,
onlySync: _ConvertibleToBool | None = None,
personalView: _ConvertibleToBool | None = None,
includePrintSettings: _ConvertibleToBool | None = None,
includeHiddenRowCol: _ConvertibleToBool | None = None,
maximized: _ConvertibleToBool | None = None,
minimized: _ConvertibleToBool | None = None,
showHorizontalScroll: _ConvertibleToBool | None = None,
showVerticalScroll: _ConvertibleToBool | None = None,
showSheetTabs: _ConvertibleToBool | None = None,
*,
xWindow: _ConvertibleToInt,
yWindow: _ConvertibleToInt,
windowWidth: _ConvertibleToInt,
windowHeight: _ConvertibleToInt,
tabRatio: _ConvertibleToInt | None = None,
activeSheetId: _ConvertibleToInt,
showFormulaBar: _ConvertibleToBool | None = None,
showStatusbar: _ConvertibleToBool | None = None,
showComments: _CustomWorkbookViewShowComments | Literal["none"] | None = "commIndicator",
showObjects: _CustomWorkbookViewShowObjects | Literal["none"] | None = "all",
extLst: Unused = None,
) -> None: ...
@overload
def __init__(
self,
name: str,
guid: Incomplete | None,
autoUpdate: _ConvertibleToBool | None,
mergeInterval: _ConvertibleToInt | None,
changesSavedWin: _ConvertibleToBool | None,
onlySync: _ConvertibleToBool | None,
personalView: _ConvertibleToBool | None,
includePrintSettings: _ConvertibleToBool | None,
includeHiddenRowCol: _ConvertibleToBool | None,
maximized: _ConvertibleToBool | None,
minimized: _ConvertibleToBool | None,
showHorizontalScroll: _ConvertibleToBool | None,
showVerticalScroll: _ConvertibleToBool | None,
showSheetTabs: _ConvertibleToBool | None,
xWindow: _ConvertibleToInt,
yWindow: _ConvertibleToInt,
windowWidth: _ConvertibleToInt,
windowHeight: _ConvertibleToInt,
tabRatio: _ConvertibleToInt | None,
activeSheetId: _ConvertibleToInt,
showFormulaBar: _ConvertibleToBool | None = None,
showStatusbar: _ConvertibleToBool | None = None,
showComments: _CustomWorkbookViewShowComments | Literal["none"] | None = "commIndicator",
showObjects: _CustomWorkbookViewShowObjects | Literal["none"] | None = "all",
extLst: Unused = None,
) -> None: ...

View File

@@ -1,23 +1,52 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import Bool, Integer, NoneSet, String, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
_WebPublishingTargetScreenSize: TypeAlias = Literal[
"544x376",
"640x480",
"720x512",
"800x600",
"1024x768",
"1152x882",
"1152x900",
"1280x1024",
"1600x1200",
"1800x1440",
"1920x1200",
]
class WebPublishObject(Serialisable):
tagname: str
id: Incomplete
divId: Incomplete
sourceObject: Incomplete
destinationFile: Incomplete
title: Incomplete
autoRepublish: Incomplete
id: Integer[Literal[False]]
divId: String[Literal[False]]
sourceObject: String[Literal[True]]
destinationFile: String[Literal[False]]
title: String[Literal[True]]
autoRepublish: Bool[Literal[True]]
@overload
def __init__(
self,
id: Incomplete | None = None,
divId: Incomplete | None = None,
sourceObject: Incomplete | None = None,
destinationFile: Incomplete | None = None,
title: Incomplete | None = None,
autoRepublish: Incomplete | None = None,
id: _ConvertibleToInt,
divId: str,
sourceObject: str | None = None,
*,
destinationFile: str,
title: str | None = None,
autoRepublish: _ConvertibleToBool | None = None,
) -> None: ...
@overload
def __init__(
self,
id: _ConvertibleToInt,
divId: str,
sourceObject: str | None,
destinationFile: str,
title: str | None = None,
autoRepublish: _ConvertibleToBool | None = None,
) -> None: ...
class WebPublishObjectList(Serialisable):
@@ -26,30 +55,30 @@ class WebPublishObjectList(Serialisable):
# count: Integer
webPublishObject: Incomplete
__elements__: Incomplete
def __init__(self, count: Incomplete | None = None, webPublishObject=()) -> None: ...
def __init__(self, count: Unused = None, webPublishObject=()) -> None: ...
@property
def count(self): ...
class WebPublishing(Serialisable):
tagname: str
css: Incomplete
thicket: Incomplete
longFileNames: Incomplete
vml: Incomplete
allowPng: Incomplete
targetScreenSize: Incomplete
dpi: Incomplete
codePage: Incomplete
characterSet: Incomplete
css: Bool[Literal[True]]
thicket: Bool[Literal[True]]
longFileNames: Bool[Literal[True]]
vml: Bool[Literal[True]]
allowPng: Bool[Literal[True]]
targetScreenSize: NoneSet[_WebPublishingTargetScreenSize]
dpi: Integer[Literal[True]]
codePage: Integer[Literal[True]]
characterSet: String[Literal[True]]
def __init__(
self,
css: Incomplete | None = None,
thicket: Incomplete | None = None,
longFileNames: Incomplete | None = None,
vml: Incomplete | None = None,
allowPng: Incomplete | None = None,
targetScreenSize: str = "800x600",
dpi: Incomplete | None = None,
codePage: Incomplete | None = None,
characterSet: Incomplete | None = None,
css: _ConvertibleToBool | None = None,
thicket: _ConvertibleToBool | None = None,
longFileNames: _ConvertibleToBool | None = None,
vml: _ConvertibleToBool | None = None,
allowPng: _ConvertibleToBool | None = None,
targetScreenSize: _WebPublishingTargetScreenSize | Literal["none"] | None = "800x600",
dpi: _ConvertibleToInt | None = None,
codePage: _ConvertibleToInt | None = None,
characterSet: str | None = None,
) -> None: ...

View File

@@ -1,22 +1,38 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from collections.abc import Generator
from typing import overload
from typing_extensions import Literal
from openpyxl.descriptors import Strict
from openpyxl.descriptors.base import MinMax, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
class CellRange(Serialisable): # type: ignore[misc]
min_col: Incomplete
min_row: Incomplete
max_col: Incomplete
max_row: Incomplete
class CellRange(Serialisable):
min_col: MinMax[int, Literal[False]]
min_row: MinMax[int, Literal[False]]
max_col: MinMax[int, Literal[False]]
max_row: MinMax[int, Literal[False]]
title: Incomplete
@overload
def __init__(
self,
range_string: Incomplete | None = None,
min_col: Incomplete | None = None,
min_row: Incomplete | None = None,
max_col: Incomplete | None = None,
max_row: Incomplete | None = None,
range_string: Incomplete,
min_col: Unused = None,
min_row: Unused = None,
max_col: Unused = None,
max_row: Unused = None,
title: Incomplete | None = None,
) -> None: ...
@overload
def __init__(
self,
range_string: None = None,
*,
min_col: _ConvertibleToInt,
min_row: _ConvertibleToInt,
max_col: _ConvertibleToInt,
max_row: _ConvertibleToInt,
title: Incomplete | None = None,
) -> None: ...
@property

View File

@@ -1,11 +1,13 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import String
from openpyxl.descriptors.serialisable import Serialisable
class CellWatch(Serialisable):
tagname: str
r: Incomplete
def __init__(self, r: Incomplete | None = None) -> None: ...
r: String[Literal[True]]
def __init__(self, r: str) -> None: ...
class CellWatches(Serialisable):
tagname: str

View File

@@ -1,54 +1,62 @@
from _typeshed import Incomplete
from typing import overload
from typing_extensions import Literal
from openpyxl.descriptors.base import Bool, Integer, String, Typed, _ConvertibleToBool, _ConvertibleToInt
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.worksheet.ole import ObjectAnchor
class ControlProperty(Serialisable):
tagname: str
anchor: Incomplete
locked: Incomplete
defaultSize: Incomplete
disabled: Incomplete
recalcAlways: Incomplete
uiObject: Incomplete
autoFill: Incomplete
autoLine: Incomplete
autoPict: Incomplete
macro: Incomplete
altText: Incomplete
linkedCell: Incomplete
listFillRange: Incomplete
cf: Incomplete
anchor: Typed[ObjectAnchor, Literal[False]]
locked: Bool[Literal[True]]
defaultSize: Bool[Literal[True]]
_print: Bool[Literal[True]] # Not private. Avoids name clash
disabled: Bool[Literal[True]]
recalcAlways: Bool[Literal[True]]
uiObject: Bool[Literal[True]]
autoFill: Bool[Literal[True]]
autoLine: Bool[Literal[True]]
autoPict: Bool[Literal[True]]
macro: String[Literal[True]]
altText: String[Literal[True]]
linkedCell: String[Literal[True]]
listFillRange: String[Literal[True]]
cf: String[Literal[True]]
id: Incomplete
__elements__: Incomplete
def __init__(
self,
anchor: Incomplete | None = None,
locked: bool = True,
defaultSize: bool = True,
_print: bool = True,
disabled: bool = False,
recalcAlways: bool = False,
uiObject: bool = False,
autoFill: bool = True,
autoLine: bool = True,
autoPict: bool = True,
macro: Incomplete | None = None,
altText: Incomplete | None = None,
linkedCell: Incomplete | None = None,
listFillRange: Incomplete | None = None,
cf: str = "pict",
anchor: ObjectAnchor,
locked: _ConvertibleToBool | None = True,
defaultSize: _ConvertibleToBool | None = True,
_print: _ConvertibleToBool | None = True,
disabled: _ConvertibleToBool | None = False,
recalcAlways: _ConvertibleToBool | None = False,
uiObject: _ConvertibleToBool | None = False,
autoFill: _ConvertibleToBool | None = True,
autoLine: _ConvertibleToBool | None = True,
autoPict: _ConvertibleToBool | None = True,
macro: str | None = None,
altText: str | None = None,
linkedCell: str | None = None,
listFillRange: str | None = None,
cf: str | None = "pict",
id: Incomplete | None = None,
) -> None: ...
class Control(Serialisable):
tagname: str
controlPr: Incomplete
shapeId: Incomplete
name: Incomplete
controlPr: Typed[ControlProperty, Literal[True]]
shapeId: Integer[Literal[False]]
name: String[Literal[True]]
__elements__: Incomplete
@overload
def __init__(
self, controlPr: Incomplete | None = None, shapeId: Incomplete | None = None, name: Incomplete | None = None
self, controlPr: ControlProperty | None = None, *, shapeId: _ConvertibleToInt, name: str | None = None
) -> None: ...
@overload
def __init__(self, controlPr: ControlProperty | None, shapeId: _ConvertibleToInt, name: str | None = None) -> None: ...
class Controls(Serialisable):
tagname: str

View File

@@ -1,11 +1,13 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import String
from openpyxl.descriptors.serialisable import Serialisable
class CustomProperty(Serialisable):
tagname: str
name: Incomplete
def __init__(self, name: Incomplete | None = None) -> None: ...
name: String[Literal[False]]
def __init__(self, name: str) -> None: ...
class CustomProperties(Serialisable):
tagname: str

View File

@@ -1,49 +1,81 @@
from _typeshed import Incomplete
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import (
Alias,
Bool,
Convertible,
Integer,
NoneSet,
String,
_ConvertibleToBool,
_ConvertibleToInt,
_ConvertibleToMultiCellRange,
)
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.worksheet.cell_range import MultiCellRange
_DataValidationType: TypeAlias = Literal["whole", "decimal", "list", "date", "time", "textLength", "custom"]
_DataValidationErrorStyle: TypeAlias = Literal["stop", "warning", "information"]
_DataValidationImeMode: TypeAlias = Literal[
"noControl",
"off",
"on",
"disabled",
"hiragana",
"fullKatakana",
"halfKatakana",
"fullAlpha",
"halfAlpha",
"fullHangul",
"halfHangul",
]
_DataValidationOperator: TypeAlias = Literal[
"between", "notBetween", "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual"
]
def collapse_cell_addresses(cells, input_ranges=()): ...
def expand_cell_ranges(range_string): ...
class DataValidation(Serialisable):
tagname: str
sqref: Incomplete
cells: Incomplete
ranges: Incomplete
showErrorMessage: Incomplete
showDropDown: Incomplete
hide_drop_down: Incomplete
showInputMessage: Incomplete
allowBlank: Incomplete
allow_blank: Incomplete
errorTitle: Incomplete
error: Incomplete
promptTitle: Incomplete
prompt: Incomplete
sqref: Convertible[MultiCellRange, Literal[False]]
cells: Alias
ranges: Alias
showDropDown: Bool[Literal[True]]
hide_drop_down: Alias
showInputMessage: Bool[Literal[True]]
showErrorMessage: Bool[Literal[True]]
allowBlank: Bool[Literal[True]]
allow_blank: Alias
errorTitle: String[Literal[True]]
error: String[Literal[True]]
promptTitle: String[Literal[True]]
prompt: String[Literal[True]]
formula1: Incomplete
formula2: Incomplete
type: Incomplete
errorStyle: Incomplete
imeMode: Incomplete
operator: Incomplete
validation_type: Incomplete
type: NoneSet[_DataValidationType]
errorStyle: NoneSet[_DataValidationErrorStyle]
imeMode: NoneSet[_DataValidationImeMode]
operator: NoneSet[_DataValidationOperator]
validation_type: Alias
def __init__(
self,
type: Incomplete | None = None,
type: _DataValidationType | Literal["none"] | None = None,
formula1: Incomplete | None = None,
formula2: Incomplete | None = None,
showErrorMessage: bool = False,
showInputMessage: bool = False,
showDropDown: Incomplete | None = False,
allowBlank: Incomplete | None = False,
sqref=(),
promptTitle: Incomplete | None = None,
errorStyle: Incomplete | None = None,
error: Incomplete | None = None,
prompt: Incomplete | None = None,
errorTitle: Incomplete | None = None,
imeMode: Incomplete | None = None,
operator: Incomplete | None = None,
showErrorMessage: _ConvertibleToBool | None = False,
showInputMessage: _ConvertibleToBool | None = False,
showDropDown: _ConvertibleToBool | None = False,
allowBlank: _ConvertibleToBool | None = False,
sqref: _ConvertibleToMultiCellRange = (),
promptTitle: str | None = None,
errorStyle: _DataValidationErrorStyle | Literal["none"] | None = None,
error: str | None = None,
prompt: str | None = None,
errorTitle: str | None = None,
imeMode: _DataValidationImeMode | Literal["none"] | None = None,
operator: _DataValidationOperator | Literal["none"] | None = None,
allow_blank: Incomplete | None = False,
) -> None: ...
def add(self, cell) -> None: ...
@@ -51,17 +83,17 @@ class DataValidation(Serialisable):
class DataValidationList(Serialisable):
tagname: str
disablePrompts: Incomplete
xWindow: Incomplete
yWindow: Incomplete
disablePrompts: Bool[Literal[True]]
xWindow: Integer[Literal[True]]
yWindow: Integer[Literal[True]]
dataValidation: Incomplete
__elements__: Incomplete
__attrs__: Incomplete
def __init__(
self,
disablePrompts: Incomplete | None = None,
xWindow: Incomplete | None = None,
yWindow: Incomplete | None = None,
disablePrompts: _ConvertibleToBool | None = None,
xWindow: _ConvertibleToInt | None = None,
yWindow: _ConvertibleToInt | None = None,
count: Incomplete | None = None,
dataValidation=(),
) -> None: ...

View File

@@ -1,10 +1,19 @@
from _typeshed import Incomplete, Unused
from collections.abc import Callable, Iterator
from typing import ClassVar, Generic, TypeVar
from typing_extensions import Self
from typing_extensions import Literal, Self
from openpyxl.descriptors import Strict
from openpyxl.descriptors.base import Alias, Bool, Float, Integer, String
from openpyxl.descriptors.base import (
Alias,
Bool,
Float,
Integer,
String,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.styles.styleable import StyleableObject
from openpyxl.utils.bound_dictionary import BoundDictionary
@@ -16,21 +25,21 @@ _DimT = TypeVar("_DimT", bound=Dimension)
class Dimension(Strict, StyleableObject):
__fields__: ClassVar[tuple[str, ...]]
index: Integer
hidden: Bool
outlineLevel: Integer
index: Integer[Literal[False]]
hidden: Bool[Literal[False]]
outlineLevel: Integer[Literal[True]]
outline_level: Alias
collapsed: Bool
collapsed: Bool[Literal[False]]
style: Alias
def __init__(
self,
index: int,
hidden: bool,
outlineLevel: int | None,
collapsed: bool,
index: _ConvertibleToInt,
hidden: _ConvertibleToBool,
outlineLevel: _ConvertibleToInt | None,
collapsed: _ConvertibleToBool,
worksheet: Worksheet,
visible: bool = True,
visible: Unused = True,
style: Incomplete | None = None,
) -> None: ...
def __iter__(self) -> Iterator[tuple[str, str]]: ...
@@ -39,29 +48,28 @@ class Dimension(Strict, StyleableObject):
class RowDimension(Dimension):
r: Alias
s: Alias
ht: Float
ht: Float[Literal[True]]
height: Alias
thickBot: Bool
thickTop: Bool
thickBot: Bool[Literal[False]]
thickTop: Bool[Literal[False]]
def __init__(
self,
worksheet: Worksheet,
index: int = 0,
ht: Incomplete | None = None,
customHeight: Incomplete | None = None,
ht: _ConvertibleToFloat | None = None,
customHeight: Unused = None,
s: Incomplete | None = None,
customFormat: Incomplete | None = None,
hidden: bool = False,
outlineLevel: int = 0,
outline_level: Incomplete | None = None,
collapsed: bool = False,
customFormat: Unused = None,
hidden: _ConvertibleToBool = None,
outlineLevel: _ConvertibleToInt | None = 0,
outline_level: _ConvertibleToInt | None = None,
collapsed: _ConvertibleToBool = None,
visible: Incomplete | None = None,
height: Incomplete | None = None,
r: Incomplete | None = None,
spans: Incomplete | None = None,
thickBot: Incomplete | None = None,
thickTop: Incomplete | None = None,
spans: Unused = None,
thickBot: _ConvertibleToBool = None,
thickTop: _ConvertibleToBool = None,
**kw: Unused,
) -> None: ...
@property
@@ -70,30 +78,30 @@ class RowDimension(Dimension):
def customHeight(self) -> bool: ...
class ColumnDimension(Dimension):
width: Float
bestFit: Bool
width: Float[Literal[False]]
bestFit: Bool[Literal[False]]
auto_size: Alias
index: String # type: ignore[assignment]
min: Integer
max: Integer
collapsed: Bool
index: String[Literal[False]] # type:ignore[assignment]
min: Integer[Literal[True]]
max: Integer[Literal[True]]
collapsed: Bool[Literal[False]]
def __init__(
self,
worksheet: Worksheet,
index: str = "A",
width: int = 13,
bestFit: bool = False,
hidden: bool = False,
outlineLevel: int = 0,
outline_level: int | None = None,
collapsed: bool = False,
width: _ConvertibleToFloat = 13,
bestFit: _ConvertibleToBool = False,
hidden: _ConvertibleToBool = False,
outlineLevel: _ConvertibleToInt | None = 0,
outline_level: _ConvertibleToInt | None = None,
collapsed: _ConvertibleToBool = False,
style: Incomplete | None = None,
min: int | None = None,
max: int | None = None,
customWidth: bool = False,
min: _ConvertibleToInt | None = None,
max: _ConvertibleToInt | None = None,
customWidth: Unused = False,
visible: bool | None = None,
auto_size: bool | None = None,
auto_size: _ConvertibleToBool | None = None,
) -> None: ...
@property
def customWidth(self) -> bool: ...
@@ -113,31 +121,31 @@ class DimensionHolder(BoundDictionary[str, _DimT], Generic[_DimT]):
class SheetFormatProperties(Serialisable):
tagname: str
baseColWidth: Incomplete
defaultColWidth: Incomplete
defaultRowHeight: Incomplete
customHeight: Incomplete
zeroHeight: Incomplete
thickTop: Incomplete
thickBottom: Incomplete
outlineLevelRow: Incomplete
outlineLevelCol: Incomplete
baseColWidth: Integer[Literal[True]]
defaultColWidth: Float[Literal[True]]
defaultRowHeight: Float[Literal[False]]
customHeight: Bool[Literal[True]]
zeroHeight: Bool[Literal[True]]
thickTop: Bool[Literal[True]]
thickBottom: Bool[Literal[True]]
outlineLevelRow: Integer[Literal[True]]
outlineLevelCol: Integer[Literal[True]]
def __init__(
self,
baseColWidth: int = 8,
defaultColWidth: Incomplete | None = None,
defaultRowHeight: int = 15,
customHeight: Incomplete | None = None,
zeroHeight: Incomplete | None = None,
thickTop: Incomplete | None = None,
thickBottom: Incomplete | None = None,
outlineLevelRow: Incomplete | None = None,
outlineLevelCol: Incomplete | None = None,
baseColWidth: _ConvertibleToInt | None = 8,
defaultColWidth: _ConvertibleToFloat | None = None,
defaultRowHeight: _ConvertibleToFloat = 15,
customHeight: _ConvertibleToBool | None = None,
zeroHeight: _ConvertibleToBool | None = None,
thickTop: _ConvertibleToBool | None = None,
thickBottom: _ConvertibleToBool | None = None,
outlineLevelRow: _ConvertibleToInt | None = None,
outlineLevelCol: _ConvertibleToInt | None = None,
) -> None: ...
class SheetDimension(Serialisable):
tagname: str
ref: Incomplete
def __init__(self, ref: Incomplete | None = None) -> None: ...
ref: String[Literal[False]]
def __init__(self, ref: str) -> None: ...
@property
def boundaries(self): ...

View File

@@ -1,11 +1,13 @@
from _typeshed import Incomplete
from typing_extensions import Literal
from openpyxl.descriptors.base import Bool, String, Typed, _ConvertibleToBool
from openpyxl.descriptors.serialisable import Serialisable
class Extension(Serialisable):
tagname: str
uri: Incomplete
def __init__(self, uri: Incomplete | None = None) -> None: ...
uri: String[Literal[True]]
def __init__(self, uri: str | None = None) -> None: ...
class ExtensionList(Serialisable):
tagname: str
@@ -16,32 +18,32 @@ class ExtensionList(Serialisable):
class IgnoredError(Serialisable):
tagname: str
sqref: Incomplete
evalError: Incomplete
twoDigitTextYear: Incomplete
numberStoredAsText: Incomplete
formula: Incomplete
formulaRange: Incomplete
unlockedFormula: Incomplete
emptyCellReference: Incomplete
listDataValidation: Incomplete
calculatedColumn: Incomplete
evalError: Bool[Literal[True]]
twoDigitTextYear: Bool[Literal[True]]
numberStoredAsText: Bool[Literal[True]]
formula: Bool[Literal[True]]
formulaRange: Bool[Literal[True]]
unlockedFormula: Bool[Literal[True]]
emptyCellReference: Bool[Literal[True]]
listDataValidation: Bool[Literal[True]]
calculatedColumn: Bool[Literal[True]]
def __init__(
self,
sqref: Incomplete | None = None,
evalError: bool = False,
twoDigitTextYear: bool = False,
numberStoredAsText: bool = False,
formula: bool = False,
formulaRange: bool = False,
unlockedFormula: bool = False,
emptyCellReference: bool = False,
listDataValidation: bool = False,
calculatedColumn: bool = False,
evalError: _ConvertibleToBool | None = False,
twoDigitTextYear: _ConvertibleToBool | None = False,
numberStoredAsText: _ConvertibleToBool | None = False,
formula: _ConvertibleToBool | None = False,
formulaRange: _ConvertibleToBool | None = False,
unlockedFormula: _ConvertibleToBool | None = False,
emptyCellReference: _ConvertibleToBool | None = False,
listDataValidation: _ConvertibleToBool | None = False,
calculatedColumn: _ConvertibleToBool | None = False,
) -> None: ...
class IgnoredErrors(Serialisable):
tagname: str
ignoredError: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(self, ignoredError=(), extLst: Incomplete | None = None) -> None: ...
def __init__(self, ignoredError=(), extLst: ExtensionList | None = None) -> None: ...

View File

@@ -1,158 +1,285 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from datetime import datetime
from typing import overload
from typing_extensions import Literal, TypeAlias
from openpyxl.descriptors.base import (
Alias,
Bool,
DateTime,
Float,
Integer,
MinMax,
NoneSet,
Set,
String,
Typed,
_ConvertibleToBool,
_ConvertibleToFloat,
_ConvertibleToInt,
)
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.serialisable import Serialisable
_SortConditionSortBy: TypeAlias = Literal["value", "cellColor", "fontColor", "icon"]
_IconSet: TypeAlias = Literal[
"3Arrows",
"3ArrowsGray",
"3Flags",
"3TrafficLights1",
"3TrafficLights2",
"3Signs",
"3Symbols",
"3Symbols2",
"4Arrows",
"4ArrowsGray",
"4RedToBlack",
"4Rating",
"4TrafficLights",
"5Arrows",
"5ArrowsGray",
"5Rating",
"5Quarters",
]
_SortStateSortMethod: TypeAlias = Literal["stroke", "pinYin"]
_CustomFilterOperator: TypeAlias = Literal[
"equal", "lessThan", "lessThanOrEqual", "notEqual", "greaterThanOrEqual", "greaterThan"
]
_FiltersCalendarType: TypeAlias = Literal[
"gregorian",
"gregorianUs",
"gregorianMeFrench",
"gregorianArabic",
"hijri",
"hebrew",
"taiwan",
"japan",
"thai",
"korea",
"saka",
"gregorianXlitEnglish",
"gregorianXlitFrench",
]
_DynamicFilterType: TypeAlias = Literal[
"null",
"aboveAverage",
"belowAverage",
"tomorrow",
"today",
"yesterday",
"nextWeek",
"thisWeek",
"lastWeek",
"nextMonth",
"thisMonth",
"lastMonth",
"nextQuarter",
"thisQuarter",
"lastQuarter",
"nextYear",
"thisYear",
"lastYear",
"yearToDate",
"Q1",
"Q2",
"Q3",
"Q4",
"M1",
"M2",
"M3",
"M4",
"M5",
"M6",
"M7",
"M8",
"M9",
"M10",
"M11",
"M12",
]
_DateGroupItemDateTimeGrouping: TypeAlias = Literal["year", "month", "day", "hour", "minute", "second"]
class SortCondition(Serialisable):
tagname: str
descending: Incomplete
sortBy: Incomplete
descending: Bool[Literal[True]]
sortBy: NoneSet[_SortConditionSortBy]
ref: Incomplete
customList: Incomplete
dxfId: Incomplete
iconSet: Incomplete
iconId: Incomplete
customList: String[Literal[True]]
dxfId: Integer[Literal[True]]
iconSet: NoneSet[_IconSet]
iconId: Integer[Literal[True]]
def __init__(
self,
ref: Incomplete | None = None,
descending: Incomplete | None = None,
sortBy: Incomplete | None = None,
customList: Incomplete | None = None,
dxfId: Incomplete | None = None,
iconSet: Incomplete | None = None,
iconId: Incomplete | None = None,
descending: _ConvertibleToBool | None = None,
sortBy: _SortConditionSortBy | Literal["none"] | None = None,
customList: str | None = None,
dxfId: _ConvertibleToInt | None = None,
iconSet: _IconSet | Literal["none"] | None = None,
iconId: _ConvertibleToInt | None = None,
) -> None: ...
class SortState(Serialisable):
tagname: str
columnSort: Incomplete
caseSensitive: Incomplete
sortMethod: Incomplete
columnSort: Bool[Literal[True]]
caseSensitive: Bool[Literal[True]]
sortMethod: NoneSet[_SortStateSortMethod]
ref: Incomplete
sortCondition: Incomplete
extLst: Incomplete
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
columnSort: Incomplete | None = None,
caseSensitive: Incomplete | None = None,
sortMethod: Incomplete | None = None,
columnSort: _ConvertibleToBool | None = None,
caseSensitive: _ConvertibleToBool | None = None,
sortMethod: _SortStateSortMethod | Literal["none"] | None = None,
ref: Incomplete | None = None,
sortCondition=(),
extLst: Incomplete | None = None,
extLst: Unused = None,
) -> None: ...
def __bool__(self) -> bool: ...
class IconFilter(Serialisable):
tagname: str
iconSet: Incomplete
iconId: Incomplete
def __init__(self, iconSet: Incomplete | None = None, iconId: Incomplete | None = None) -> None: ...
iconSet: Set[_IconSet]
iconId: Integer[Literal[True]]
def __init__(self, iconSet: _IconSet, iconId: _ConvertibleToInt | None = None) -> None: ...
class ColorFilter(Serialisable):
tagname: str
dxfId: Incomplete
cellColor: Incomplete
def __init__(self, dxfId: Incomplete | None = None, cellColor: Incomplete | None = None) -> None: ...
dxfId: Integer[Literal[True]]
cellColor: Bool[Literal[True]]
def __init__(self, dxfId: _ConvertibleToInt | None = None, cellColor: _ConvertibleToBool | None = None) -> None: ...
class DynamicFilter(Serialisable):
tagname: str
type: Incomplete
val: Incomplete
valIso: Incomplete
maxVal: Incomplete
maxValIso: Incomplete
type: Set[_DynamicFilterType]
val: Float[Literal[True]]
valIso: DateTime[Literal[True]]
maxVal: Float[Literal[True]]
maxValIso: DateTime[Literal[True]]
def __init__(
self,
type: Incomplete | None = None,
val: Incomplete | None = None,
valIso: Incomplete | None = None,
maxVal: Incomplete | None = None,
maxValIso: Incomplete | None = None,
type: _DynamicFilterType,
val: _ConvertibleToFloat | None = None,
valIso: datetime | str | None = None,
maxVal: _ConvertibleToFloat | None = None,
maxValIso: datetime | str | None = None,
) -> None: ...
class CustomFilter(Serialisable):
tagname: str
operator: Incomplete
operator: NoneSet[_CustomFilterOperator]
val: Incomplete
def __init__(self, operator: Incomplete | None = None, val: Incomplete | None = None) -> None: ...
def __init__(
self, operator: _CustomFilterOperator | Literal["none"] | None = None, val: Incomplete | None = None
) -> None: ...
class CustomFilters(Serialisable):
tagname: str
_and: Bool[Literal[True]] # Not private. Avoids name clash
customFilter: Incomplete
__elements__: Incomplete
def __init__(self, _and: Incomplete | None = False, customFilter=()) -> None: ...
def __init__(self, _and: _ConvertibleToBool | None = False, customFilter=()) -> None: ...
class Top10(Serialisable):
tagname: str
top: Incomplete
percent: Incomplete
val: Incomplete
filterVal: Incomplete
top: Bool[Literal[True]]
percent: Bool[Literal[True]]
val: Float[Literal[False]]
filterVal: Float[Literal[True]]
@overload
def __init__(
self,
top: Incomplete | None = None,
percent: Incomplete | None = None,
val: Incomplete | None = None,
filterVal: Incomplete | None = None,
top: _ConvertibleToBool | None = None,
percent: _ConvertibleToBool | None = None,
*,
val: _ConvertibleToFloat,
filterVal: _ConvertibleToFloat | None = None,
) -> None: ...
@overload
def __init__(
self,
top: _ConvertibleToBool | None,
percent: _ConvertibleToBool | None,
val: _ConvertibleToFloat,
filterVal: _ConvertibleToFloat | None = None,
) -> None: ...
class DateGroupItem(Serialisable):
tagname: str
year: Incomplete
month: Incomplete
day: Incomplete
hour: Incomplete
minute: Incomplete
second: Incomplete
dateTimeGrouping: Incomplete
year: Integer[Literal[False]]
month: MinMax[float, Literal[True]]
day: MinMax[float, Literal[True]]
hour: MinMax[float, Literal[True]]
minute: MinMax[float, Literal[True]]
second: Integer[Literal[True]]
dateTimeGrouping: Set[_DateGroupItemDateTimeGrouping]
@overload
def __init__(
self,
year: Incomplete | None = None,
month: Incomplete | None = None,
day: Incomplete | None = None,
hour: Incomplete | None = None,
minute: Incomplete | None = None,
second: Incomplete | None = None,
dateTimeGrouping: Incomplete | None = None,
year: _ConvertibleToInt,
month: _ConvertibleToFloat | None = None,
day: _ConvertibleToFloat | None = None,
hour: _ConvertibleToFloat | None = None,
minute: _ConvertibleToFloat | None = None,
second: _ConvertibleToInt | None = None,
*,
dateTimeGrouping: _DateGroupItemDateTimeGrouping,
) -> None: ...
@overload
def __init__(
self,
year: _ConvertibleToInt,
month: _ConvertibleToFloat | None,
day: _ConvertibleToFloat | None,
hour: _ConvertibleToFloat | None,
minute: _ConvertibleToFloat | None,
second: _ConvertibleToInt | None,
dateTimeGrouping: _DateGroupItemDateTimeGrouping,
) -> None: ...
class Filters(Serialisable):
tagname: str
blank: Incomplete
calendarType: Incomplete
blank: Bool[Literal[True]]
calendarType: NoneSet[_FiltersCalendarType]
filter: Incomplete
dateGroupItem: Incomplete
__elements__: Incomplete
def __init__(
self, blank: Incomplete | None = None, calendarType: Incomplete | None = None, filter=(), dateGroupItem=()
self,
blank: _ConvertibleToBool | None = None,
calendarType: _FiltersCalendarType | Literal["none"] | None = None,
filter=(),
dateGroupItem=(),
) -> None: ...
class FilterColumn(Serialisable):
tagname: str
colId: Incomplete
col_id: Incomplete
hiddenButton: Incomplete
showButton: Incomplete
filters: Incomplete
top10: Incomplete
customFilters: Incomplete
dynamicFilter: Incomplete
colorFilter: Incomplete
iconFilter: Incomplete
extLst: Incomplete
colId: Integer[Literal[False]]
col_id: Alias
hiddenButton: Bool[Literal[True]]
showButton: Bool[Literal[True]]
filters: Typed[Filters, Literal[True]]
top10: Typed[Top10, Literal[True]]
customFilters: Typed[CustomFilters, Literal[True]]
dynamicFilter: Typed[DynamicFilter, Literal[True]]
colorFilter: Typed[ColorFilter, Literal[True]]
iconFilter: Typed[IconFilter, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
colId: Incomplete | None = None,
hiddenButton: Incomplete | None = False,
showButton: Incomplete | None = True,
filters: Incomplete | None = None,
top10: Incomplete | None = None,
customFilters: Incomplete | None = None,
dynamicFilter: Incomplete | None = None,
colorFilter: Incomplete | None = None,
iconFilter: Incomplete | None = None,
extLst: Incomplete | None = None,
colId: _ConvertibleToInt,
hiddenButton: _ConvertibleToBool | None = False,
showButton: _ConvertibleToBool | None = True,
filters: Filters | None = None,
top10: Top10 | None = None,
customFilters: CustomFilters | None = None,
dynamicFilter: DynamicFilter | None = None,
colorFilter: ColorFilter | None = None,
iconFilter: IconFilter | None = None,
extLst: Unused = None,
blank: Incomplete | None = None,
vals: Incomplete | None = None,
) -> None: ...
@@ -161,15 +288,11 @@ class AutoFilter(Serialisable):
tagname: str
ref: Incomplete
filterColumn: Incomplete
sortState: Incomplete
extLst: Incomplete
sortState: Typed[SortState, Literal[True]]
extLst: Typed[ExtensionList, Literal[True]]
__elements__: Incomplete
def __init__(
self,
ref: Incomplete | None = None,
filterColumn=(),
sortState: Incomplete | None = None,
extLst: Incomplete | None = None,
self, ref: Incomplete | None = None, filterColumn=(), sortState: SortState | None = None, extLst: Unused = None
) -> None: ...
def __bool__(self) -> bool: ...
def add_filter_column(self, col_id, vals, blank: bool = False) -> None: ...

Some files were not shown because too many files have changed in this diff Show More