U o^ @sdZddlmZddlmZddlmZddlmZm Z m Z m Z m Z m Z ddlmZddlmZGd d d eZGd d d eZGd dde Ze ZGddde ZGdddeZGdddeZGddde ZGdddeZGdddeZGdddeZd ddZdS)!z Excel specific descriptors )REL_NS) safe_string)Element) MatchPatternMinMaxIntegerStringTypedSequence) Serialisable) RANGE_EXPRc@seZdZdZdS) HexBinaryz [0-9a-fA-F]+$N__name__ __module__ __qualname__patternrrt/private/var/folders/sd/whlwsn6x1_qgglc0mjv25_695qk2gl/T/pip-install-4zq3fp6i/openpyxl/openpyxl/descriptors/excel.pyrsrc@seZdZdZdS)UniversalMeasurez$[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)Nrrrrrrsrc@seZdZdZeZdZdZdS) TextPointzt Size in hundredths of points. In theory other units of measurement can be used but these are unbounded iiN)rrr__doc__int expected_typeminmaxrrrrr srcs(eZdZdZdZdZfddZZS) Percentagez&((100)|([0-9][0-9]?))(\.[0-9][0-9]?)?%ii@BcsDt|tr.d|kr.|dd}tt|d}tt|||dS)N%i) isinstancestrreplacerfloatsuperr__set__selfinstancevalue __class__rrr%4s zPercentage.__set__)rrrrrrr% __classcell__rrr*rr.src@seZdZeZdddZdS) ExtensionNcCs ||_dSN)uri)r'r/rrr__init__?szExtension.__init__)N)rrrr r/r0rrrrr-;sr-c@s eZdZeedZdddZdS) ExtensionList)rrcCs ||_dSr.)ext)r'r2rrrr0IszExtensionList.__init__N)r)rrrr r-r2r0rrrrr1Es r1c@seZdZeZdZdS)RelationTN)rrrr namespace allow_nonerrrrr3Osr3c@seZdZdZdS) Base64BinaryzP^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$Nrrrrrr6Usr6c@seZdZdZdS)Guidz?{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\}Nrrrrrr7Zsr7cs$eZdZdZdZfddZZS) CellRangez]^[$]?([A-Za-z]{1,3})[$]?(\d+)(:[$]?([A-Za-z]{1,3})[$]?(\d+)?)?$|^[A-Za-z]{1,3}:[A-Za-z]{1,3}$Tcs&|dk r|}tt|||dSr.)upperr$r8r%r&r*rrr%dszCellRange.__set__)rrrrr5r%r,rrr*rr8_sr8NcCs$|dk rd||f}t|t|dS)z? Override serialisation because explicit none required Nz{%s}%s)val)rr)tagnamer)r4rrr_explicit_noneks r<)N)rZopenpyxl.xml.constantsrZopenpyxl.compatrZopenpyxl.xml.functionsrrrrrr r r Z serialisabler Zopenpyxl.utils.cellr rrrZ Coordinaterr-r1r3r6r7r8r<rrrrs$