Skip to content

Commit 7bb2941

Browse files
committed
Coverage: ignore if TYPE_CHECKING globally
1 parent e0f1f66 commit 7bb2941

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+214
-151
lines changed

.coveragerc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ omit =
77
*/plotpy/plot/interactive.py
88
*.vscode/extensions*
99
*/qwt/*
10-
*/guidata/*
10+
*/guidata/*
11+
12+
exclude_lines =
13+
if __name__ == .__main__.:
14+
if TYPE_CHECKING:

plotpy/builder/curvemarker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
update_style_attr,
4646
)
4747

48-
if TYPE_CHECKING: # pragma: no cover
48+
if TYPE_CHECKING:
4949
from typing import Callable
5050

5151
CURVE_COUNT = 0

plotpy/builder/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
XYImageParam,
5555
)
5656

57-
if TYPE_CHECKING: # pragma: no cover
57+
if TYPE_CHECKING:
5858
from plotpy.items.image.filter import ImageFilterItem
5959

6060
IMAGE_COUNT = 0

plotpy/builder/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from plotpy.plot import PlotDialog, PlotOptions, PlotWidget, PlotWindow
2828
from plotpy.styles import COLORS, GridParam, LineStyleParam
2929

30-
if TYPE_CHECKING: # pragma: no cover
30+
if TYPE_CHECKING:
3131
from qtpy.QtWidgets import QWidget
3232

3333
from plotpy.constants import PlotType

plotpy/coords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
import numpy as np
3535

36-
if TYPE_CHECKING: # pragma: no cover
36+
if TYPE_CHECKING:
3737
from qtpy.QtCore import QPointF
3838
from qwt import QwtPlot, QwtPlotItem
3939

plotpy/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
from plotpy.coords import axes_to_canvas, canvas_to_axes
9797
from plotpy.items.shape.marker import Marker
9898

99-
if TYPE_CHECKING: # pragma: no cover
99+
if TYPE_CHECKING:
100100
from qtpy.QtCore import QPoint
101101

102102
from plotpy.plot.base import BasePlot

plotpy/external/sliders/_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from contextlib import contextmanager
22
from typing import TYPE_CHECKING, Iterator
33

4-
if TYPE_CHECKING: # pragma: no cover
4+
if TYPE_CHECKING:
55
from qtpy.QtCore import QObject
66

77

plotpy/external/sliders/_range_style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
)
1818
from qtpy.QtWidgets import QApplication, QSlider, QStyleOptionSlider
1919

20-
if TYPE_CHECKING: # pragma: no cover
20+
if TYPE_CHECKING:
2121
from ._generic_range_slider import _GenericRangeSlider
2222

2323

plotpy/interfaces/items.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import numpy as np
1818

19-
if TYPE_CHECKING: # pragma: no cover
19+
if TYPE_CHECKING:
2020
import guidata.dataset.io
2121
from qtpy.QtCore import QPointF
2222

@@ -242,9 +242,11 @@ class ISerializableType(IItemType):
242242

243243
def serialize(
244244
self,
245-
writer: guidata.dataset.io.HDF5Writer
246-
| guidata.dataset.io.INIWriter
247-
| guidata.dataset.io.JSONWriter,
245+
writer: (
246+
guidata.dataset.io.HDF5Writer
247+
| guidata.dataset.io.INIWriter
248+
| guidata.dataset.io.JSONWriter
249+
),
248250
) -> None:
249251
"""Serialize object to HDF5 writer
250252
@@ -254,9 +256,11 @@ def serialize(
254256

255257
def deserialize(
256258
self,
257-
reader: guidata.dataset.io.HDF5Reader
258-
| guidata.dataset.io.INIReader
259-
| guidata.dataset.io.JSONReader,
259+
reader: (
260+
guidata.dataset.io.HDF5Reader
261+
| guidata.dataset.io.INIReader
262+
| guidata.dataset.io.JSONReader
263+
),
260264
) -> None:
261265
"""Deserialize object from HDF5 reader
262266

plotpy/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
from plotpy.config import _
4545

46-
if TYPE_CHECKING: # pragma: no cover
46+
if TYPE_CHECKING:
4747
import guidata.dataset.io
4848

4949

0 commit comments

Comments
 (0)