Skip to content

Commit

Permalink
update .pre-commit-config.yaml
Browse files Browse the repository at this point in the history
apply additional black fixes
apply additional codespell fix
  • Loading branch information
grlee77 committed Oct 24, 2023
1 parent 10c3a44 commit 22357f1
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 72 deletions.
24 changes: 18 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@ repos:
hooks:
- id: isort
files: ^python/cucim/src/.*
args: ["--settings-path=python/cucim/setup.cfg"]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
args: ["--settings-path=python/cucim/pyproject.toml"]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: flake8
args: ["--config=python/cucim/setup.cfg"]
files: ^python/cucim/.*
- id: black
files: (python|legate)/.*
args: ["--config", "python/cucim/pyproject.toml"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.278
hooks:
- id: ruff
files: python/.*$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args: [--toml, python/cucim/pyproject.toml]
additional_dependencies:
- tomli
2 changes: 1 addition & 1 deletion python/cucim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ license-files = ["LICENSE"]
# this is only to allow you to run codespell interactively
# e.g. via
# codespell --toml python/cucim/pyproject.toml . -i 3 -w
skip = "build*,dist,.cache,html,_build,_deps,3rdparty,_static,generated,latex,.git,*.ipynb,LICENSE-3rdparty,jitify_testing"
skip = "build*,dist,.cache,html,_build,_deps,3rdparty,_static,generated,latex,.git,*.ipynb,test_data/input/LICENSE-3rdparty,jitify_testing"
# ignore-regex = ""
ignore-words-list = "ans,coo,boun,bui,gool,hart,lond,nd,paeth,unser,wronly"
quiet-level = 3
Expand Down
8 changes: 5 additions & 3 deletions python/cucim/src/cucim/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ submodules = []

try:
import cupy

_is_cupy_available = True
submodules += ['core', 'skimage']
submodules += ["core", "skimage"]
del cupy
except ImportError:
pass

try:
from .clara import CuImage, __version__, cli # noqa: F401

_is_clara_available = True
submodules += ['clara']
submodules += ["clara"]
except ImportError:
__version__ = "23.12.00"

__all__ = submodules + ['__version__', 'is_available'] # noqa: F822
__all__ = submodules + ["__version__", "is_available"] # noqa: F822
26 changes: 13 additions & 13 deletions python/cucim/src/cucim/skimage/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import lazy_loader as lazy # noqa: F401

submodules = [
'color',
'data',
'exposure',
'feature',
'filters',
'measure',
'metrics',
'morphology',
'registration',
'restoration',
'segmentation',
'transform',
'util',
"color",
"data",
"exposure",
"feature",
"filters",
"measure",
"metrics",
"morphology",
"registration",
"restoration",
"segmentation",
"transform",
"util",
]

__all__ = submodules
Expand Down
2 changes: 1 addition & 1 deletion python/cucim/src/cucim/skimage/data/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__all__ = [
'binary_blobs',
"binary_blobs",
]

from ._binary_blobs import binary_blobs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_hessian_matrix_3d_xy(use_gaussian_derivatives):
hessian_matrix(
img,
sigma=0.1,
order="nonexistant",
order="nonexistent",
use_gaussian_derivatives=use_gaussian_derivatives,
)

Expand Down
94 changes: 47 additions & 47 deletions python/cucim/src/cucim/skimage/filters/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
__all__ = [
'LPIFilter2D',
'apply_hysteresis_threshold',
'butterworth',
'correlate_sparse',
'difference_of_gaussians',
'farid',
'farid_h',
'farid_v',
'filter_forward',
'filter_inverse',
'frangi',
'gabor',
'gabor_kernel',
'gaussian',
'hessian',
'laplace',
'median',
'meijering',
'prewitt',
'prewitt_h',
'prewitt_v',
'rank_order',
'roberts',
'roberts_neg_diag',
'roberts_pos_diag',
'sato',
'scharr',
'scharr_h',
'scharr_v',
'sobel',
'sobel_h',
'sobel_v',
'threshold_isodata',
'threshold_li',
'threshold_local',
'threshold_mean',
'threshold_minimum',
'threshold_multiotsu',
'threshold_niblack',
'threshold_otsu',
'threshold_sauvola',
'threshold_triangle',
'threshold_yen',
'try_all_threshold',
'unsharp_mask',
'wiener',
'window'
"LPIFilter2D",
"apply_hysteresis_threshold",
"butterworth",
"correlate_sparse",
"difference_of_gaussians",
"farid",
"farid_h",
"farid_v",
"filter_forward",
"filter_inverse",
"frangi",
"gabor",
"gabor_kernel",
"gaussian",
"hessian",
"laplace",
"median",
"meijering",
"prewitt",
"prewitt_h",
"prewitt_v",
"rank_order",
"roberts",
"roberts_neg_diag",
"roberts_pos_diag",
"sato",
"scharr",
"scharr_h",
"scharr_v",
"sobel",
"sobel_h",
"sobel_v",
"threshold_isodata",
"threshold_li",
"threshold_local",
"threshold_mean",
"threshold_minimum",
"threshold_multiotsu",
"threshold_niblack",
"threshold_otsu",
"threshold_sauvola",
"threshold_triangle",
"threshold_yen",
"try_all_threshold",
"unsharp_mask",
"wiener",
"window",
]

from ._fft_based import butterworth
Expand Down

0 comments on commit 22357f1

Please sign in to comment.