Skip to content

Commit f5ec92b

Browse files
committed
fix: add pylint disable comments for clarity in multiple files
1 parent c025225 commit f5ec92b

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

sigima/tests/vistools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
)
3636

3737
# Re-export everything from sigima.viz
38-
from sigima.viz import * # noqa: F401, F403, E402
38+
from sigima.viz import * # noqa: F401, F403, E402 # pylint: disable=C0413
3939

4040
# Note: BACKEND_NAME and BACKEND_SOURCE are included via star import from __all__
4141
# They are lazy-loaded attributes that will be available when accessed, but we

sigima/tests/viz/viz_mpl_unit_test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
Tests are designed to run headlessly (no plt.show()) unless --gui flag is passed.
1212
"""
1313

14+
# pylint: disable=import-outside-toplevel
15+
16+
# Fixture name matches test function arg:
17+
# pylint: disable=redefined-outer-name
18+
1419
from __future__ import annotations
1520

1621
import sys
@@ -133,7 +138,7 @@ def test_anisotropic_pixels(self):
133138
image = create_image("Anisotropic", data=data)
134139
image.set_uniform_coords(dx=2.0, dy=0.5, x0=0, y0=0)
135140

136-
extent, aspect = _get_image_extent_and_aspect(image)
141+
_extent, aspect = _get_image_extent_and_aspect(image)
137142

138143
# dx=2, dy=0.5 -> aspect = 4.0
139144
assert aspect == pytest.approx(4.0)

sigima/tools/image/preprocessing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def fit_circle_model(contour: np.ndarray) -> tuple[float, float, float] | None:
4444
Returns:
4545
Tuple (xc, yc, radius) or None if fitting fails
4646
"""
47+
# pylint: disable=no-member
4748
if _USE_NEW_SHAPE_API:
4849
model = measure.CircleModel.from_estimate(contour)
4950
if model:
@@ -68,6 +69,7 @@ def fit_ellipse_model(
6869
Tuple (xc, yc, a, b, theta) or None if fitting fails,
6970
where a and b are semi-major and semi-minor axes
7071
"""
72+
# pylint: disable=no-member
7173
if _USE_NEW_SHAPE_API:
7274
model = measure.EllipseModel.from_estimate(contour)
7375
if model:

sigima/viz/viz_mpl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def view_curves(
211211
plt.show()
212212

213213

214+
# pylint: disable=too-many-positional-arguments
214215
def view_images(
215216
data_or_objs: list[ImageObj | np.ndarray] | ImageObj | np.ndarray,
216217
name: str | None = None, # Qt-specific # pylint: disable=unused-argument

0 commit comments

Comments
 (0)