Skip to content

Commit 98fab98

Browse files
committed
Fix SyntaxWarning and adjusted valType 'enumerated' docstring format.
1 parent cd623aa commit 98fab98

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

_plotly_utils/basevalidators.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@ def description(self):
545545

546546
desc = (
547547
desc
548-
+ """
549-
- One of the following enumeration values:
548+
+ """\n
549+
- One of the following enumeration values:\n
550550
{enum_vals_str}""".format(enum_vals_str=enum_vals_str)
551551
)
552552

@@ -557,20 +557,21 @@ def description(self):
557557
initial_indent=" " * 12,
558558
subsequent_indent=" " * 12,
559559
break_on_hyphens=False,
560+
break_long_words=False,
560561
)
561562
)
562563

563564
desc = (
564565
desc
565-
+ """
566-
- A string that matches one of the following regular expressions:
566+
+ """\n
567+
- A string that matches one of the following regular expressions:\n
567568
{enum_regexs_str}""".format(enum_regexs_str=enum_regexs_str)
568569
)
569570

570571
if self.array_ok:
571572
desc = (
572573
desc
573-
+ """
574+
+ """\n
574575
- A tuple, list, or one-dimensional numpy array of the above"""
575576
)
576577

@@ -2007,7 +2008,7 @@ def description(self):
20072008
for i, item_validator in enumerate(self.item_validators):
20082009
# Update name for 2d
20092010
orig_name = item_validator.plotly_name
2010-
item_validator.plotly_name = "{name}\\[i\\]\\[{i}\\]".format(
2011+
item_validator.plotly_name = "{name}\\\\[i\\\\]\\\\[{i}\\\\]".format(
20112012
name=self.plotly_name, i=i
20122013
)
20132014

@@ -2035,7 +2036,7 @@ def description(self):
20352036
""".format(el_desc=el_desc)
20362037

20372038
if self.dimensions in ("1-2", 2):
2038-
item_validator.plotly_name = "{name}\\[i\\]\\[j\\]".format(
2039+
item_validator.plotly_name = "{name}\\\\[i\\\\]\\\\[j\\\\]".format(
20392040
name=self.plotly_name
20402041
)
20412042

0 commit comments

Comments
 (0)