Skip to content

Commit 9b904c5

Browse files
committed
Clean up imports and docstrings for consistency.
1 parent 76be0e9 commit 9b904c5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/python/plotly/plotly/basedatatypes.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from copy import deepcopy, copy
99
import itertools
1010
from functools import reduce
11-
import json
1211

1312
from _plotly_utils.utils import (
1413
_natural_sort_strings,
@@ -18,7 +17,6 @@
1817
display_string_positions,
1918
chomp_empty_strings,
2019
find_closest_string,
21-
PlotlyJSONEncoder,
2220
)
2321
from _plotly_utils.exceptions import PlotlyKeyError
2422
from .optional_imports import get_module
@@ -3318,7 +3316,7 @@ def to_dict(self):
33183316

33193317
def to_plotly_json(self):
33203318
"""
3321-
Convert figure to a JSON representation as a Python dict.
3319+
Convert figure to a JSON representation as a Python dict
33223320
33233321
Note: May include some JSON-invalid data types, use the `PlotlyJSONEncoder` util when encoding.
33243322
@@ -5611,12 +5609,12 @@ def to_plotly_json(self):
56115609

56125610
def to_json(self, *args, **kwargs):
56135611
"""
5614-
Convert to a JSON string representation.
5612+
Convert object to a JSON string representation
56155613
56165614
Parameters
56175615
----------
56185616
validate: bool (default True)
5619-
True if the figure should be validated before being converted to
5617+
True if the object should be validated before being converted to
56205618
JSON, False otherwise.
56215619
56225620
pretty: bool (default False)
@@ -5636,7 +5634,7 @@ def to_json(self, *args, **kwargs):
56365634
Returns
56375635
-------
56385636
str
5639-
Representation of figure as a JSON string
5637+
Representation of object as a JSON string
56405638
"""
56415639
import plotly.io as pio
56425640

0 commit comments

Comments
 (0)