Skip to content

Commit

Permalink
Remove some pre python 3.8 fallback code
Browse files Browse the repository at this point in the history
Updating some linting
  • Loading branch information
manthey committed Aug 23, 2024
1 parent f916660 commit 2ce2832
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
9 changes: 3 additions & 6 deletions histomicstk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# import sub-packages to support nested calls
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _importlib_version

from . import segmentation # must be imported before features
from . import utils # must be imported before other packages
from . import (annotations_and_masks, features, filters, preprocessing,
saliency, workflows)

try:
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _importlib_version
except ImportError:
from importlib_metadata import PackageNotFoundError
from importlib_metadata import version as _importlib_version
try:
__version__ = _importlib_version(__name__)
except PackageNotFoundError:
Expand Down
2 changes: 1 addition & 1 deletion histomicstk/cli/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from slicer_cli_web import ctk_cli_adjustment # noqa
import slicer_cli_web.cli_list_entrypoint # noqa I001
from slicer_cli_web import ctk_cli_adjustment # noqa


def main():
Expand Down
8 changes: 4 additions & 4 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude = [
"*/web_client/*",
"*/*egg*/*",
]
ignore = [
lint.ignore = [
"B017",
"B026",
"B904",
Expand Down Expand Up @@ -34,7 +34,7 @@ ignore = [
"PT017",
]
line-length = 100
select = [
lint.select = [
"B", # bugbear
"C90", # mccabe
"D", # pydocstyle
Expand All @@ -57,8 +57,8 @@ select = [
"RSE",
]

[flake8-quotes]
[lint.flake8-quotes]
inline-quotes = "single"

[mccabe]
[lint.mccabe]
max-complexity = 14

0 comments on commit 2ce2832

Please sign in to comment.