Skip to content

Commit 6690116

Browse files
committed
Fixed confusing indentation & some formatting
1 parent 8d12a05 commit 6690116

File tree

2 files changed

+32
-29
lines changed

2 files changed

+32
-29
lines changed

plotly/express/_imshow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ def imshow(
168168
The figure height in pixels.
169169
170170
aspect : 'equal', 'auto', or None
171-
- 'equal': Ensures an aspect ratio of 1 or pixels (square pixels)
172-
- 'auto': The axes is kept fixed and the aspect ratio of pixels is
171+
- 'equal': Ensures an aspect ratio of 1 or pixels (square pixels)
172+
- 'auto': The axes is kept fixed and the aspect ratio of pixels is
173173
adjusted so that the data fit in the axes. In general, this will
174174
result in non-square pixels.
175-
- if None, 'equal' is used for numpy arrays and 'auto' for xarrays
175+
- if None, 'equal' is used for numpy arrays and 'auto' for xarrays
176176
(which have typically heterogeneous coordinates)
177177
178178
contrast_rescaling : 'minmax', 'infer', or None

plotly/io/_json.py

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ def to_json_plotly(plotly_object, pretty=False, engine=None):
9090
representation should be as compact as possible.
9191
9292
engine: str (default None)
93-
The JSON encoding engine to use. One of:
94-
- "json" for an engine based on the built-in Python json module
95-
- "orjson" for a faster engine that requires the orjson package
96-
- "auto" for the "orjson" engine if available, otherwise "json"
93+
The JSON encoding engine to use. One of:\n
94+
- "json" for an engine based on the built-in Python json module
95+
- "orjson" for a faster engine that requires the orjson package
96+
- "auto" for the "orjson" engine if available, otherwise "json"
97+
9798
If not specified, the default engine is set to the current value of
9899
plotly.io.json.config.default_engine.
99100
@@ -193,10 +194,11 @@ def to_json(fig, validate=True, pretty=False, remove_uids=True, engine=None):
193194
True if trace UIDs should be omitted from the JSON representation
194195
195196
engine: str (default None)
196-
The JSON encoding engine to use. One of:
197-
- "json" for an engine based on the built-in Python json module
198-
- "orjson" for a faster engine that requires the orjson package
199-
- "auto" for the "orjson" engine if available, otherwise "json"
197+
The JSON encoding engine to use. One of:\n
198+
- "json" for an engine based on the built-in Python json module
199+
- "orjson" for a faster engine that requires the orjson package
200+
- "auto" for the "orjson" engine if available, otherwise "json"
201+
200202
If not specified, the default engine is set to the current value of
201203
plotly.io.json.config.default_engine.
202204
@@ -244,10 +246,11 @@ def write_json(fig, file, validate=True, pretty=False, remove_uids=True, engine=
244246
True if trace UIDs should be omitted from the JSON representation
245247
246248
engine: str (default None)
247-
The JSON encoding engine to use. One of:
248-
- "json" for an engine based on the built-in Python json module
249-
- "orjson" for a faster engine that requires the orjson package
250-
- "auto" for the "orjson" engine if available, otherwise "json"
249+
The JSON encoding engine to use. One of:\n
250+
- "json" for an engine based on the built-in Python json module
251+
- "orjson" for a faster engine that requires the orjson package
252+
- "auto" for the "orjson" engine if available, otherwise "json"
253+
251254
If not specified, the default engine is set to the current value of
252255
plotly.io.json.config.default_engine.
253256
Returns
@@ -306,11 +309,11 @@ def from_json_plotly(value, engine=None):
306309
A JSON string or bytes object
307310
308311
engine: str (default None)
309-
The JSON decoding engine to use. One of:
310-
- if "json", parse JSON using built in json module
311-
- if "orjson", parse using the faster orjson module, requires the orjson
312+
The JSON decoding engine to use. One of:\n
313+
- if "json", parse JSON using built in json module
314+
- if "orjson", parse using the faster orjson module, requires the orjson
312315
package
313-
- if "auto" use orjson module if available, otherwise use the json module
316+
- if "auto" use orjson module if available, otherwise use the json module
314317
315318
If not specified, the default engine is set to the current value of
316319
plotly.io.json.config.default_engine.
@@ -377,11 +380,11 @@ def from_json(value, output_type="Figure", skip_invalid=False, engine=None):
377380
True if invalid figure properties should be silently ignored.
378381
379382
engine: str (default None)
380-
The JSON decoding engine to use. One of:
381-
- if "json", parse JSON using built in json module
382-
- if "orjson", parse using the faster orjson module, requires the orjson
383+
The JSON decoding engine to use. One of:\n
384+
- if "json", parse JSON using built in json module
385+
- if "orjson", parse using the faster orjson module, requires the orjson
383386
package
384-
- if "auto" use orjson module if available, otherwise use the json module
387+
- if "auto" use orjson module if available, otherwise use the json module
385388
386389
If not specified, the default engine is set to the current value of
387390
plotly.io.json.config.default_engine.
@@ -419,8 +422,8 @@ def read_json(file, output_type="Figure", skip_invalid=False, engine=None):
419422
Parameters
420423
----------
421424
file: str or readable
422-
A string containing the path to a local file or a read-able Python
423-
object (e.g. a pathlib.Path object or an open file descriptor)
425+
A string containing the path to a local file or a read-able Python
426+
object (e.g. a pathlib.Path object or an open file descriptor)
424427
425428
output_type: type or str (default 'Figure')
426429
The output figure type or type name.
@@ -431,11 +434,11 @@ def read_json(file, output_type="Figure", skip_invalid=False, engine=None):
431434
True if invalid figure properties should be silently ignored.
432435
433436
engine: str (default None)
434-
The JSON decoding engine to use. One of:
435-
- if "json", parse JSON using built in json module
436-
- if "orjson", parse using the faster orjson module, requires the orjson
437+
The JSON decoding engine to use. One of:\n
438+
- if "json", parse JSON using built in json module
439+
- if "orjson", parse using the faster orjson module, requires the orjson
437440
package
438-
- if "auto" use orjson module if available, otherwise use the json module
441+
- if "auto" use orjson module if available, otherwise use the json module
439442
440443
If not specified, the default engine is set to the current value of
441444
plotly.io.json.config.default_engine.

0 commit comments

Comments
 (0)