Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/openpyxl/chart/descriptors.py: 81%
18 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1# Copyright (c) 2010-2022 openpyxl
5from openpyxl.descriptors.nested import (
6 NestedMinMax
7 )
9from openpyxl.descriptors import Typed
11from .data_source import NumFmt
13"""
14Utility descriptors for the chart module.
15For convenience but also clarity.
16"""
18class NestedGapAmount(NestedMinMax):
20 allow_none = True
21 min = 0
22 max = 500
25class NestedOverlap(NestedMinMax):
27 allow_none = True
28 min = -100
29 max = 100
32class NumberFormatDescriptor(Typed):
33 """
34 Allow direct assignment of format code
35 """
37 expected_type = NumFmt
38 allow_none = True
40 def __set__(self, instance, value):
41 if isinstance(value, str):
42 value = NumFmt(value)
43 super(NumberFormatDescriptor, self).__set__(instance, value)