Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/mpl_toolkits/axisartist/axislines.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ def __init__(self, loc, nth_coord=None):
{"bottom": 0, "top": 0, "left": 1, "right": 1}, loc=loc))
if (nth_coord == 0 and loc not in ["left", "right"]
or nth_coord == 1 and loc not in ["bottom", "top"]):
_api.warn_deprecated(
"3.7", message=f"{loc=!r} is incompatible with "
"{nth_coord=}; support is deprecated since %(since)s")
raise ValueError("x=None is not supported")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this error message come from? It seems unrelated to the checks that are guarding it, what is x?

I think the message should likely be f"{loc=!r} is incompatible with {nth_coord=}"

self._loc = loc
self._pos = {"bottom": 0, "top": 1, "left": 0, "right": 1}[loc]
super().__init__()
Expand Down