Skip to content

Commit 823829e

Browse files
[pre-commit.ci] pre-commit autoupdate (#4)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.0.1 → v4.4.0](pre-commit/pre-commit-hooks@v4.0.1...v4.4.0) - [github.com/asottile/setup-cfg-fmt: v1.17.0 → v2.4.0](asottile/setup-cfg-fmt@v1.17.0...v2.4.0) - [github.com/PyCQA/flake8: 3.9.2 → 6.1.0](PyCQA/flake8@3.9.2...6.1.0) - https://github.com/myint/autoflakehttps://github.com/PyCQA/autoflake - [github.com/PyCQA/autoflake: v1.4 → v2.2.1](PyCQA/autoflake@v1.4...v2.2.1) - [github.com/PyCQA/isort: 5.8.0 → 5.12.0](PyCQA/isort@5.8.0...5.12.0) - [github.com/psf/black: 21.5b2 → 23.9.1](psf/black@21.5b2...23.9.1) - [github.com/asottile/pyupgrade: v2.19.0 → v3.13.0](asottile/pyupgrade@v2.19.0...v3.13.0) - [github.com/pre-commit/mirrors-mypy: v0.812 → v1.5.1](pre-commit/mirrors-mypy@v0.812...v1.5.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 9181c25 commit 823829e

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,41 @@ ci:
22
autoupdate_schedule: 'quarterly'
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.0.1
5+
rev: v4.4.0
66
hooks:
77
- id: check-docstring-first
88
- id: end-of-file-fixer
99
- id: trailing-whitespace
1010
- id: mixed-line-ending
1111
- id: check-merge-conflict
1212
- repo: https://github.com/asottile/setup-cfg-fmt
13-
rev: v1.17.0
13+
rev: v2.4.0
1414
hooks:
1515
- id: setup-cfg-fmt
1616
- repo: https://github.com/PyCQA/flake8
17-
rev: 3.9.2
17+
rev: 6.1.0
1818
hooks:
1919
- id: flake8
2020
additional_dependencies: [flake8-typing-imports==1.7.0]
21-
- repo: https://github.com/myint/autoflake
22-
rev: v1.4
21+
- repo: https://github.com/PyCQA/autoflake
22+
rev: v2.2.1
2323
hooks:
2424
- id: autoflake
2525
args: ["--in-place", "--remove-all-unused-imports", "--ignore-init-module-imports", "--remove-unused-variables"]
2626
- repo: https://github.com/PyCQA/isort
27-
rev: 5.8.0
27+
rev: 5.12.0
2828
hooks:
2929
- id: isort
3030
- repo: https://github.com/psf/black
31-
rev: 21.5b2
31+
rev: 23.9.1
3232
hooks:
3333
- id: black
3434
- repo: https://github.com/asottile/pyupgrade
35-
rev: v2.19.0
35+
rev: v3.13.0
3636
hooks:
3737
- id: pyupgrade
3838
args: [--py37-plus]
3939
- repo: https://github.com/pre-commit/mirrors-mypy
40-
rev: v0.812
40+
rev: v1.5.1
4141
hooks:
4242
- id: mypy

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
release = "unknown"
2424

2525

26-
2726
# -- Project information -----------------------------------------------------
2827

2928
project = "mpl_pan_zoom"

mpl_pan_zoom/_pan.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
__all__ = [
22
"PanManager",
33
]
4+
5+
46
class PanManager:
57
"""
68
Enable panning a plot with any mouse button.
@@ -50,7 +52,9 @@ def enable(self):
5052
raise RuntimeError("The PanManager is already enabled")
5153

5254
self._id_press = self.fig.canvas.mpl_connect("button_press_event", self.press)
53-
self._id_release = self.fig.canvas.mpl_connect("button_release_event", self.release)
55+
self._id_release = self.fig.canvas.mpl_connect(
56+
"button_release_event", self.release
57+
)
5458

5559
def disable(self):
5660
"""
@@ -103,7 +107,9 @@ def press(self, event):
103107
):
104108
a.start_pan(x, y, event.button)
105109
self._xypress.append((a, i))
106-
self._id_drag = self.fig.canvas.mpl_connect("motion_notify_event", self._mouse_move)
110+
self._id_drag = self.fig.canvas.mpl_connect(
111+
"motion_notify_event", self._mouse_move
112+
)
107113

108114
def release(self, event):
109115
self._cancel_action()

mpl_pan_zoom/_zoom.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
__all__ = [
44
"zoom_factory",
55
]
6+
7+
68
# based on https://gist.github.com/tacaswell/3144287
79
def zoom_factory(ax, base_scale=1.1):
810
"""

setup.cfg

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ url = https://github.com/ianhi/mpl-pan-zoom
77
author = Ian Hunt-Isaak
88
author_email = [email protected]
99
license = BSD-3-Clause
10-
license_file = LICENSE
10+
license_files = LICENSE
1111
classifiers =
1212
Development Status :: 2 - Pre-Alpha
1313
License :: OSI Approved :: BSD License
1414
Natural Language :: English
1515
Programming Language :: Python :: 3
1616
Programming Language :: Python :: 3 :: Only
17-
Programming Language :: Python :: 3.7
18-
Programming Language :: Python :: 3.8
19-
Programming Language :: Python :: 3.9
2017
Programming Language :: Python :: Implementation :: CPython
2118
project_urls =
2219
Source Code =https://github.com/ianhi/mpl-pan-zoom
@@ -26,7 +23,7 @@ packages = find:
2623
install_requires =
2724
matplotlib
2825
numpy
29-
python_requires = >=3.7
26+
python_requires = >=3.8
3027
zip_safe = False
3128

3229
[options.extras_require]

0 commit comments

Comments
 (0)