MCPcopy Index your code
hub / github.com/plotly/plotly.py / description

Method description

_plotly_utils/basevalidators.py:2301–2340  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2299 )
2300
2301 def description(self):
2302 # Separate regular values from regular expressions
2303 enum_vals = []
2304 enum_regexs = []
2305 for v, regex in zip(self.values, self.val_regexs):
2306 if regex is not None:
2307 enum_regexs.append(regex.pattern)
2308 else:
2309 enum_vals.append(v)
2310 desc = """\
2311 The '{name}' property is an enumeration that may be specified as:""".format(
2312 name=self.plotly_name
2313 )
2314
2315 if enum_vals:
2316 enum_vals_str = "\n".join(
2317 textwrap.wrap(
2318 repr(enum_vals),
2319 initial_indent=" " * 12,
2320 subsequent_indent=" " * 12,
2321 break_on_hyphens=False,
2322 width=80,
2323 )
2324 )
2325
2326 desc = (
2327 desc
2328 + """
2329 - One of the following dash styles:
2330{enum_vals_str}""".format(enum_vals_str=enum_vals_str)
2331 )
2332
2333 desc = (
2334 desc
2335 + """
2336 - A string containing a dash length list in pixels or percentages
2337 (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.)
2338"""
2339 )
2340 return desc
2341
2342
2343class ImageUriValidator(BaseValidator):

Callers

nothing calls this directly

Calls 2

formatMethod · 0.45
wrapMethod · 0.45

Tested by

no test coverage detected