-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix various issues from SonarQube #23494
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
702dc0e
d86a505
5f7f6a8
eec341a
3faebcf
0eb2433
36bb21e
13576de
0460cf8
a9ec6aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,7 +190,7 @@ def __init__(self, ax): | |
animated=False) | ||
self.canvas.mpl_connect('key_press_event', self.on_key_press) | ||
|
||
def draw(self, event): | ||
def draw(self): | ||
draw_artist = self.ax.draw_artist | ||
if self.background is None: | ||
self.background = self.canvas.copy_from_bbox(self.ax.bbox) | ||
|
@@ -231,7 +231,7 @@ def draw(self, event): | |
|
||
self.background = None | ||
self.ax.figure.canvas.draw_idle() | ||
return True | ||
return | ||
puck.disp.set_offsets([[puck.x, puck.y]]) | ||
self.ax.draw_artist(puck.disp) | ||
|
||
|
@@ -244,7 +244,6 @@ def draw(self, event): | |
plt.close() | ||
|
||
self.cnt += 1 | ||
return True | ||
|
||
def on_key_press(self, event): | ||
if event.key == '3': | ||
|
@@ -317,10 +316,7 @@ def on_redraw(event): | |
def start_anim(event): | ||
canvas.mpl_disconnect(start_anim.cid) | ||
|
||
def local_draw(): | ||
if animation.ax.get_renderer_cache(): | ||
animation.draw(None) | ||
start_anim.timer.add_callback(local_draw) | ||
start_anim.timer.add_callback(animation.draw) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is changing the semantics to call Semi-OT: This removes the only usage of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect that this was a hedge to make sure we were actually drawn once before running because the However, we have made a lot of progress in pushing the caching of renderers into exactly 1 place and only access them via a function that will fabricate one if needed so I suspect we may no longer need this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above: #23494 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #23202 for removal of the |
||
start_anim.timer.start() | ||
canvas.mpl_connect('draw_event', on_redraw) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the return type and bool value of the return. Do we not actually use this return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No event handlers use the return value;
CallbackRegistry
does not do anything with it.