A PyQT GUI application for converting InfoLease report outputs into Excel files. Handles parsing and summarizing. Learns where files are meant to be store and compiles monthly and yearly summaries.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InfoLeaseExtract/venv/Lib/site-packages/openpyxl/worksheet/hyperlink.py

61 lines
1.4 KiB

from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descriptors import (
String,
Sequence,
)
from openpyxl.descriptors.excel import Relation
class Hyperlink(Serialisable):
tagname = "hyperlink"
ref = String()
location = String(allow_none=True)
tooltip = String(allow_none=True)
display = String(allow_none=True)
id = Relation()
target = String(allow_none=True)
__attrs__ = ("ref", "location", "tooltip", "display", "id")
def __init__(self,
ref=None,
location=None,
tooltip=None,
display=None,
id=None,
target=None,
):
self.ref = ref
self.location = location
self.tooltip = tooltip
self.display = display
self.id = id
self.target = target
class HyperlinkList(Serialisable):
tagname = "hyperlinks"
hyperlink = Sequence(expected_type=Hyperlink)
def __init__(self, hyperlink=()):
self.hyperlink = hyperlink
def __bool__(self):
return bool(self.hyperlink)
def __len__(self):
return len(self.hyperlink)
def append(self, value):
values = self.hyperlink[:]
values.append(value)
if not value.id:
value.id = "rId{0}".format(len(values))
self.hyperlink = values