Movatterモバイル変換


[0]ホーム

URL:


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

Fix % formatting and Transform equality.#8399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall 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
7 changes: 4 additions & 3 deletionslib/matplotlib/figure.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -118,17 +118,18 @@ def add(self, key, a):
# All the error checking may be unnecessary; but this method
# is called so seldom that the overhead is negligible.
if not isinstance(a, Axes):
raise ValueError("second argument,%s, is not an Axes" % a)
raise ValueError("second argument,{!r}, is not an Axes".format(a))
try:
hash(key)
except TypeError:
raise ValueError("first argument, %s, is not a valid key" % key)
raise ValueError(
"first argument, {!r}, is not a valid key".format(key))

a_existing = self.get(key)
if a_existing is not None:
Stack.remove(self, (key, a_existing))
warnings.warn(
"key%s already existed; Axes is being replaced" %key)
"key{!r} already existed; Axes is being replaced".format(key))
# I don't think the above should ever happen.

if a in self:
Expand Down
8 changes: 3 additions & 5 deletionslib/matplotlib/transforms.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1156,11 +1156,9 @@ def __radd__(self, other):
raise TypeError(
"Can not add Transform to object of type '%s'" % type(other))

def __eq__(self, other):
# equality is based on transform object id. Hence:
# Transform() != Transform().
# Some classes, such as TransformWrapper & AffineBase, will override.
return self is other
# Equality is based on object identity for `Transform`s (so we don't
# override `__eq__`), but some subclasses, such as TransformWrapper &
# AffineBase, override this behavior.

def _iter_break_from_left_to_right(self):
"""
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp