MCPcopy Index your code
hub / github.com/plotly/dash / __init__

Method __init__

dash/dash_table/Format.py:73–101  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

71
72class Format:
73 def __init__(self, **kwargs):
74 self._locale = {}
75 self._nully = ""
76 self._prefix = Prefix.none
77 self._specifier = {
78 "align": Align.default,
79 "fill": "",
80 "group": Group.no,
81 "width": "",
82 "padding": Padding.no,
83 "precision": "",
84 "sign": Sign.default,
85 "symbol": Symbol.no,
86 "trim": Trim.no,
87 "type": Scheme.default,
88 }
89
90 valid_methods = [
91 m for m in dir(self.__class__) if m[0] != "_" and m != "to_plotly_json"
92 ]
93
94 for kw, val in kwargs.items():
95 if kw not in valid_methods:
96 raise TypeError(
97 "{0} is not a format method. Expected one of".format(kw),
98 str(list(valid_methods)),
99 )
100
101 getattr(self, kw)(val)
102
103 def _validate_char(self, value):
104 self._validate_string(value)

Callers 2

constructorMethod · 0.45
StoreObserverClass · 0.45

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected