Skip to content
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

Fixed compatibility issue in clicker #19

Merged
merged 5 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion mpl_point_clicker/_clicker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"clicker",
]
from numbers import Integral
from typing import Union

import numpy as np
from matplotlib.backend_bases import MouseButton
Expand Down Expand Up @@ -141,7 +142,7 @@ def set_positions(self, positions):
self._positions[k] = list(v)
self._observers.process('pos-set', self.get_positions())

def clear_positions(self, classes: str | list[str] | None = None):
def clear_positions(self, classes: Union[str, list[str], None] = None):
"""
Clear all points of classes in *classes*.

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ packages = find:
install_requires =
matplotlib
numpy
typing
classifiers =
Intended Audience :: Developers
Intended Audience :: Science/Research
Expand Down
Loading