Skip to content

Commit

Permalink
coverage: ignore if TYPE_CHECKING blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Mar 4, 2024
1 parent 0834a76 commit fe977cb
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion plotpy/builder/curvemarker.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
update_style_attr,
)

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from typing import Callable

CURVE_COUNT = 0
Expand Down
2 changes: 1 addition & 1 deletion plotpy/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
from plotpy.coords import axes_to_canvas, canvas_to_axes
from plotpy.items.shape.marker import Marker

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from qtpy.QtCore import QPoint

from plotpy.plot.base import BasePlot
Expand Down
2 changes: 1 addition & 1 deletion plotpy/external/sliders/_misc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from contextlib import contextmanager
from typing import TYPE_CHECKING, Iterator

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from qtpy.QtCore import QObject


Expand Down
2 changes: 1 addition & 1 deletion plotpy/external/sliders/_range_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)
from qtpy.QtWidgets import QApplication, QSlider, QStyleOptionSlider

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from ._generic_range_slider import _GenericRangeSlider


Expand Down
2 changes: 1 addition & 1 deletion plotpy/panels/csection/csitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from plotpy.items.image.misc import get_image_from_qrect
from plotpy.mathutils.geometry import rotate, translate, vector_angle, vector_norm

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from plotpy.items import AnnotatedObliqueRectangle, AnnotatedSegment

try:
Expand Down
2 changes: 1 addition & 1 deletion plotpy/styles/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
SymbolItem,
)

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from plotpy.items import CurveItem


Expand Down
2 changes: 1 addition & 1 deletion plotpy/styles/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
)
from plotpy.styles.base import ItemParameters

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from guidata.dataset import DataSet


Expand Down
2 changes: 1 addition & 1 deletion plotpy/styles/polygonmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from plotpy.config import _
from plotpy.styles.base import ItemParameters

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from plotpy.items import PolygonMapItem


Expand Down
2 changes: 1 addition & 1 deletion plotpy/tests/unit/test_point_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from plotpy.tools import EditPointTool, SelectPointsTool, SelectPointTool
from plotpy.tools.curve import DownSamplingTool

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover

from plotpy.items.curve.base import CurveItem

Expand Down
2 changes: 1 addition & 1 deletion plotpy/tests/unit/test_shape_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
SnapshotTool,
)

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from plotpy.plot.plotwidget import PlotWindow
from plotpy.tools.base import RectangularActionTool

Expand Down
2 changes: 1 addition & 1 deletion plotpy/tests/unit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from plotpy.tests.features.test_auto_curve_image import make_curve_image_legend
from plotpy.tools import CommandTool, InteractiveTool

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover

import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion plotpy/tools/cross_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from plotpy.tools.image import update_image_tool_status
from plotpy.tools.shape import RectangularShapeTool

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from plotpy.plot import BasePlot


Expand Down
2 changes: 1 addition & 1 deletion plotpy/tools/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from plotpy.tools.base import DefaultToolbarID, InteractiveTool, ToggleTool
from plotpy.tools.cursor import BaseCursorTool

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from plotpy.plot.base import BasePlot
from plotpy.plot.manager import PlotManager

Expand Down

0 comments on commit fe977cb

Please sign in to comment.