Skip to content

Commit 396e494

Browse files
committed
fix annotations
1 parent 7224387 commit 396e494

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

plotpy/tests/unit/test_cursor_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import numpy as np
24
import pytest
35
from guidata.qthelpers import exec_dialog, qt_app_context

plotpy/tests/unit/test_events.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
This files tests the vent handlers not covered by other tests.
33
"""
44

5+
from __future__ import annotations
6+
57
from typing import Callable
68

79
import numpy as np

plotpy/tests/unit/test_manipulate_selection.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
from typing import Callable, Protocol
1+
from __future__ import annotations
2+
3+
from typing import Callable, TypeVar
24

35
import numpy as np
46
import pytest
57
import qtpy.QtCore as QC
6-
import qtpy.QtWidgets as QW
78
from guidata.qthelpers import exec_dialog, qt_app_context
8-
from qwt import QwtPlotItem
9-
from typing_extensions import TypeVar
109

1110
from plotpy.builder import make
1211
from plotpy.interfaces.items import (
13-
IBasePlotItem,
1412
IImageItemType,
15-
IItemType,
1613
IShapeItemType,
1714
)
1815
from plotpy.items.image.base import BaseImageItem
1916
from plotpy.items.image.transform import TrImageItem
2017
from plotpy.plot.base import BasePlot
2118
from plotpy.plot.plotwidget import PlotWindow
2219
from plotpy.tests.data import gen_image4
23-
from plotpy.tests.items.test_transform import make_items
2420
from plotpy.tests.unit.utils import (
2521
create_window,
2622
drag_mouse,

plotpy/tests/unit/test_mask_tool.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
import contextlib
1+
from __future__ import annotations
22

3-
import numpy as np
43
import pytest
54
from guidata.env import execenv
65
from guidata.qthelpers import exec_dialog, qt_app_context
76

87
from plotpy.builder import make
9-
from plotpy.interfaces.items import IImageItemType
10-
from plotpy.plot import BasePlot
118
from plotpy.tests.data import gen_image4
129
from plotpy.tests.unit.utils import (
13-
drag_mouse,
14-
mouse_event_at_relative_plot_pos,
1510
rel_pos_to_canvas_pos,
1611
)
17-
from plotpy.tools import ColormapTool, ReverseColormapTool
18-
from plotpy.tools.image import ImageMaskTool, LockTrImageTool
12+
from plotpy.tools.image import ImageMaskTool
1913
from plotpy.tools.shape import CircleTool, RectangleTool, RectangularShapeTool
2014

2115

0 commit comments

Comments
 (0)