Skip to content

Commit

Permalink
fix various lint and mypy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jcreinhold committed Mar 14, 2022
1 parent 4bbf273 commit 4481b52
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 59 deletions.
4 changes: 3 additions & 1 deletion intensity_normalization/normalize/fcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ def from_argparse_args(cls, args: argparse.Namespace, /) -> FCMNormalize:
tt = intnormt.TissueTypes.from_string(args.tissue_type)
return cls(norm_value=args.norm_value, tissue_type=tt)

def call_from_argparse_args(self, args: argparse.Namespace, /) -> None:
def call_from_argparse_args(
self, args: argparse.Namespace, /, **kwargs: typing.Any
) -> None:
if args.mask is not None:
if args.modality is not None:
if args.modality.lower() != "t1":
Expand Down
1 change: 0 additions & 1 deletion intensity_normalization/normalize/whitestripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import argparse
import builtins
import typing
import warnings

import numpy as np
import numpy.typing as npt
Expand Down
114 changes: 57 additions & 57 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
[bumpversion]
current_version = 2.2.1
commit = True
tag = False

[metadata]
name = intensity_normalization
version = attr: intensity_normalization.__version__
Expand All @@ -14,71 +9,76 @@ author = Jacob Reinhold
author_email = jcreinhold@gmail.com
license = Apache Software License 2.0
license_file = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Natural Language :: English
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: CPython
Typing :: Typed
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Natural Language :: English
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: CPython
Typing :: Typed
keywords = intensity, normalization, mri
project_urls =
Bug Tracker = https://github.com/jcreinhold/intensity-normalization/issues
Documentation = https://intensity-normalization.readthedocs.io/
project_urls =
Bug Tracker = https://github.com/jcreinhold/intensity-normalization/issues
Documentation = https://intensity-normalization.readthedocs.io/

[options]
packages = find:
install_requires =
SimpleITK>=2.1.0,<3
nibabel>=3,<4
numpy>=1.22,<2
pillow>=9.0.0
pydicom>=2.2.2,<3
pymedio>=0.2.8,<1
scikit-fuzzy>=0.4.2,<1
scikit-image>=0.17,<1
scikit-learn>=0.24,<2
scipy>=1.5,<2
statsmodels>=0.12,<1
install_requires =
SimpleITK>=2.1.0,<3
nibabel>=3,<4
numpy>=1.22,<2
pillow>=9.0.0
pydicom>=2.2.2,<3
pymedio>=0.2.8,<1
scikit-fuzzy>=0.4.2,<1
scikit-image>=0.17,<1
scikit-learn>=0.24,<2
scipy>=1.5,<2
statsmodels>=0.12,<1
python_requires = >=3.9, !=3.10.*, !=3.11.*
include_package_data = True
test_suite = tests
zip_safe = False

[options.packages.find]
exclude =
tests
docs
include =
intensity_normalization
intensity_normalization.*
exclude =
tests
docs
include =
intensity_normalization
intensity_normalization.*

[options.entry_points]
console_scripts =
fcm-normalize = intensity_normalization.cli.fcm:fcm_main
kde-normalize = intensity_normalization.cli.kde:kde_main
lsq-normalize = intensity_normalization.cli.lsq:lsq_main
nyul-normalize = intensity_normalization.cli.nyul:nyul_main
ws-normalize = intensity_normalization.cli.whitestripe:whitestripe_main
zscore-normalize = intensity_normalization.cli.zscore:zscore_main
plot-histograms = intensity_normalization.cli.histogram:histogram_main [plot]
tissue-membership = intensity_normalization.cli.tissue_membership:tissue_membership_main
ravel-normalize = intensity_normalization.cli.ravel:ravel_main [ants]
preprocess = intensity_normalization.cli.preprocess:preprocess_main [ants]
coregister = intensity_normalization.cli.coregister:coregister_main [ants]
console_scripts =
fcm-normalize = intensity_normalization.cli.fcm:fcm_main
kde-normalize = intensity_normalization.cli.kde:kde_main
lsq-normalize = intensity_normalization.cli.lsq:lsq_main
nyul-normalize = intensity_normalization.cli.nyul:nyul_main
ws-normalize = intensity_normalization.cli.whitestripe:whitestripe_main
zscore-normalize = intensity_normalization.cli.zscore:zscore_main
plot-histograms = intensity_normalization.cli.histogram:histogram_main [plot]
tissue-membership = intensity_normalization.cli.tissue_membership:tissue_membership_main
ravel-normalize = intensity_normalization.cli.ravel:ravel_main [ants]
preprocess = intensity_normalization.cli.preprocess:preprocess_main [ants]
coregister = intensity_normalization.cli.coregister:coregister_main [ants]

[options.extras_require]
ants =
antspyx>=0.2.7
plot =
matplotlib>=3,<4
ants =
antspyx>=0.2.7
plot =
matplotlib>=3,<4

[options.package_data]
intensity_normalization = py.typed

[bumpversion]
current_version = 2.2.1
commit = True
tag = False

[bumpversion:file:intensity_normalization/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"
Expand All @@ -88,8 +88,8 @@ count = True
doctests = True
exclude = docs
extend-ignore = E203
per-file-ignores =
__init__.py: F401
per-file-ignores =
__init__.py: F401
max-line-length = 88
statistics = True

Expand All @@ -99,6 +99,6 @@ test = pytest
[tool:pytest]
addopts = --doctest-modules --ignore=setup.py
doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL NUMBER
testpaths =
intensity_normalization
tests
testpaths =
intensity_normalization
tests

0 comments on commit 4481b52

Please sign in to comment.