Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some pre python 3.8 fallback code #1126

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading