Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bcdccf4

Browse files
committed
Format with ruff.
1 parent 8036084 commit bcdccf4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎plotly/io/_kaleido.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,17 +376,22 @@ def to_image(
376376
if defaults.mathjax:
377377
kopts["mathjax"] = defaults.mathjax
378378

379-
380379
width = (
381380
width
382381
or fig_dict.get("layout", {}).get("width")
383-
or fig_dict.get("layout", {}).get("template", {}).get("layout", {}).get("width")
382+
or fig_dict.get("layout", {})
383+
.get("template", {})
384+
.get("layout", {})
385+
.get("width")
384386
or defaults.default_width
385387
)
386388
height = (
387389
height
388390
or fig_dict.get("layout", {}).get("height")
389-
or fig_dict.get("layout", {}).get("template", {}).get("layout", {}).get("height")
391+
or fig_dict.get("layout", {})
392+
.get("template", {})
393+
.get("layout", {})
394+
.get("height")
390395
or defaults.default_height
391396
)
392397

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /