Skip to content

Commit a8fa9dd

Browse files
authored
Apply suggestions from code review
1 parent a0288c5 commit a8fa9dd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Diff for: CHANGELOG.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
66

77
### Fixed
88
- Fixed another compatibility issue with Pandas 2.0, just affecting `px.*(line_close=True)` [[#4190](https://github.com/plotly/plotly.py/pull/4190)]
9-
10-
- Added some rounding to the `make_subplots` function to handle situations where the user-input specs cause the domain to exceed 1 by small amounts https://github.com/plotly/plotly.py/pull/4153
9+
- Added some rounding to the `make_subplots` function to handle situations where the user-input specs cause the domain to exceed 1 by small amounts [[#4153](https://github.com/plotly/plotly.py/pull/4153)]
1110
- Sanitize JSON output to prevent an XSS vector when graphs are inserted directly into HTML [[#4196](https://github.com/plotly/plotly.py/pull/4196)]
1211
- Fixed issue with shapes and annotations plotting on the wrong y axis when supplied with a specific axis in the `yref` parameter [[#4177](https://github.com/plotly/plotly.py/pull/4177)]
1312

Diff for: packages/python/plotly/plotly/basedatatypes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ def _add_annotation_like(
15621562

15631563
# If the new_object was created with a yref specified that did not include paper or domain, the specified yref should be used otherwise assign the xref and yref from the layout_keys
15641564
if (
1565-
new_obj.yref == None
1565+
new_obj.yref is None
15661566
or new_obj.yref == "y"
15671567
or "paper" in new_obj.yref
15681568
or "domain" in new_obj.yref
@@ -4053,7 +4053,7 @@ def _process_multiple_axis_spanning_shapes(
40534053
row=row,
40544054
col=col,
40554055
exclude_empty_subplots=exclude_empty_subplots,
4056-
yref=shape_kwargs["yref"] if "yref" in shape_kwargs.keys() else "y",
4056+
yref=shape_kwargs.get("yref", "y"),
40574057
)
40584058
# update xref and yref for the new shapes and annotations
40594059
for layout_obj, n_layout_objs_before in zip(

0 commit comments

Comments
 (0)