Skip to content

Commit b7c58bd

Browse files
authored
Remove unused imports in private modules and provide tool script (#374)
1 parent 69869f3 commit b7c58bd

File tree

180 files changed

+133
-1343
lines changed

Some content is hidden

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

180 files changed

+133
-1343
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ MigrationBackup/
357357
# Python virtual environment
358358
.venv
359359

360+
# Lock files (like uv.lock)
361+
*.lock
362+
360363
# Build files from utils
361364
.eggs
362365
*.egg-info

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ extra-standard-library = [
112112
]
113113

114114
[tool.pyright]
115-
exclude = ["build", ".git"]
115+
exclude = ["build", ".git", ".venv*"]
116116
stubPath = "./stubs"
117117
pythonversion = "3.9" # Target oldest supported Python version
118118
typeCheckingMode = "standard"

stubs/skimage/_shared/coord.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import numpy as np
2-
from scipy.spatial import distance
3-
41
def _ensure_spacing(coord, spacing, p_norm, max_out): ...
52
def ensure_spacing(
63
coords,

stubs/skimage/_shared/filters.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
from collections.abc import Iterable
21
from typing import Literal
32

4-
import numpy as np
53
from numpy.typing import ArrayLike, NDArray
6-
from scipy import ndimage as ndi
74

85
from .._typing import Scalar
96
from . import utils
10-
from .utils import _supported_float_type, convert_to_float, warn
117

128
@utils.deprecate_multichannel_kwarg(multichannel_position=5)
139
def gaussian(

stubs/skimage/_shared/lazy.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import importlib
2-
import importlib.util
3-
import os
4-
import sys
51
from collections.abc import Mapping
62

73
def attach(

stubs/skimage/_shared/setup.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env python
22

3-
import os
4-
53
base_path = ...
64

75
def configuration(parent_package="", top_path=None): ...

stubs/skimage/_shared/tester.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import os
2-
import sys
31
from typing import Literal
42

53
from numpy.typing import ArrayLike

stubs/skimage/_shared/testing.pyi

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,5 @@
1-
import functools
2-
import os
3-
import re
4-
import struct
5-
import threading
6-
import warnings
7-
from tempfile import NamedTemporaryFile
8-
9-
import numpy as np
10-
from numpy import testing
11-
from numpy.testing import (
12-
TestCase,
13-
assert_,
14-
assert_allclose,
15-
assert_almost_equal,
16-
assert_array_almost_equal,
17-
assert_array_almost_equal_nulp,
18-
assert_array_equal,
19-
assert_array_less,
20-
assert_equal,
21-
assert_no_warnings,
22-
assert_warns,
23-
)
241
from numpy.typing import ArrayLike
252

26-
from ..data._fetchers import _fetch
27-
from ._warnings import expected_warnings
28-
293
SKIP_RE = ...
304

315
skipif = ...

stubs/skimage/_shared/utils.pyi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
import functools
2-
import inspect
3-
import sys
4-
import warnings
51
from collections.abc import Iterable, Mapping
62
from typing import Any, Literal
73

8-
import numpy as np
9-
import scipy
10-
from numpy.lib import NumpyVersion
114
from numpy.typing import ArrayLike, NDArray
125

136
from ._warnings import all_warnings, warn

stubs/skimage/_shared/version_requirements.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import sys
2-
3-
from packaging import version as _version
4-
51
def ensure_python_version(min_version): ...
62
def _check_version(actver, version, cmp_op): ...
73
def get_module_version(module_name): ...

0 commit comments

Comments
 (0)