Skip to content

Remove unused private SpanSelector._pressv and ._prev. #25554

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

Merged
merged 1 commit into from
Mar 26, 2023
Merged
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
16 changes: 0 additions & 16 deletions lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down