function_group.py 803 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright (c) 2010-2024 openpyxl
  2. from openpyxl.descriptors.serialisable import Serialisable
  3. from openpyxl.descriptors import (
  4. Sequence,
  5. String,
  6. Integer,
  7. )
  8. class FunctionGroup(Serialisable):
  9. tagname = "functionGroup"
  10. name = String()
  11. def __init__(self,
  12. name=None,
  13. ):
  14. self.name = name
  15. class FunctionGroupList(Serialisable):
  16. tagname = "functionGroups"
  17. builtInGroupCount = Integer(allow_none=True)
  18. functionGroup = Sequence(expected_type=FunctionGroup, allow_none=True)
  19. __elements__ = ('functionGroup',)
  20. def __init__(self,
  21. builtInGroupCount=16,
  22. functionGroup=(),
  23. ):
  24. self.builtInGroupCount = builtInGroupCount
  25. self.functionGroup = functionGroup