From 8011258f2dc61f4e2e82b818136707f1411cfaf3 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Sun, 26 Mar 2023 20:59:19 +0200 Subject: [PATCH] Remove unused private SpanSelector._pressv and ._prev. They corresponded to the old pressv/prev attributes, which have been deprecated and then removed. --- lib/matplotlib/widgets.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 981e3793841d..13f7287fe375 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -2651,10 +2651,6 @@ def __init__(self, ax, onselect, direction, minspan=0, useblit=False, self._extents_on_press = None self.snap_values = snap_values - # self._pressv is deprecated and we don't use it internally anymore - # but we maintain it until it is removed - self._pressv = None - self.onmove_callback = onmove_callback self.minspan = minspan @@ -2679,9 +2675,6 @@ def __init__(self, ax, onselect, direction, minspan=0, useblit=False, self._active_handle = None - # prev attribute is deprecated but we still need to maintain it - self._prev = (0, 0) - def new_axes(self, ax, *, _props=None): """Set SpanSelector to operate on a new Axes.""" self.ax = ax @@ -2758,10 +2751,6 @@ def _press(self, event): self.update() v = event.xdata if self.direction == 'horizontal' else event.ydata - # self._pressv and self._prev are deprecated but we still need to - # maintain them - self._pressv = v - self._prev = self._get_data(event) if self._active_handle is None and not self.ignore_event_outside: # when the press event outside the span, we initially set the @@ -2801,8 +2790,6 @@ def direction(self, direction): def _release(self, event): """Button release event handler.""" self._set_cursor(False) - # self._pressv is deprecated but we still need to maintain it - self._pressv = None if not self._interactive: self._selection_artist.set_visible(False) @@ -2849,9 +2836,6 @@ def _hover(self, event): def _onmove(self, event): """Motion notify event handler.""" - # self._prev are deprecated but we still need to maintain it - self._prev = self._get_data(event) - v = event.xdata if self.direction == 'horizontal' else event.ydata if self.direction == 'horizontal': vpress = self._eventpress.xdata