Skip to content
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: debug-statements
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.22
rev: v0.16.1
hooks:
- id: ruff-check
- id: ruff-format
Expand Down
6 changes: 4 additions & 2 deletions package/PartSeg/common_gui/colormap_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ def __init__(self, parent=None):
self.reverse_btn = QPushButton("Reverse")
self.info_label = InfoLabel(
[
"<strong>Tip:</strong> Select color and double click on a color bar below. "
"Repeat to add another colors.",
(
"<strong>Tip:</strong> Select color and double click on a color bar below. "
"Repeat to add another colors."
),
"<strong>Tip:</strong> Double click on a marker to remove it.",
"<strong>Tip:</strong> Press and hold mouse left button on a marker to drag and drop it on color bar.",
],
Expand Down
2 changes: 1 addition & 1 deletion package/PartSegCore/mask_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def _calculate_mask(
mask_description: MaskProperty,
dilate_radius: list[int],
mask: np.ndarray,
old_mask: None | np.ndarray,
old_mask: np.ndarray | None,
) -> np.ndarray:
if mask_description.dilate != RadiusType.NO and mask_description.dilate_radius != 0:
if mask_description.dilate_radius > 0:
Expand Down
2 changes: 1 addition & 1 deletion package/PartSegImage/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def __init__(
spacing: Spacing,
time_increment: float = 1.0,
file_path=None,
mask: None | np.ndarray = None,
mask: np.ndarray | None = None,
channel_info: list[ChannelInfo | ChannelInfoFull] | None = None,
axes_order: str | None = None,
shift: Spacing | None = None,
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ select = [
ignore = ["A003", "SIM108", "ARG002", "ARG003", "ARG004", "PLR2004",
"PLR0913", # should be re-enabled in a future version
"PLW1641", # Complain about lack of hash in mutable objects"
"PLR0917", # migrate more functions to named only arguments
]

[tool.ruff.lint.isort]
Expand All @@ -336,7 +337,7 @@ max-complexity = 15

[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = ["A001"]
"package/tests/**" = ["ARG", "PLC1901", "S101", "RUF012", "ANN", "FBT"]
"package/tests/**" = ["ARG", "PLC1901", "S101", "RUF012", "ANN", "FBT", "PLR0917"]
"package/PartSegCore/sphinx/*" = ["ARG"]
"package/tests/**.py" = ["PLR2004"]
"package/PartSegCore/_old_json_hooks.py" = ["PLR0912", "PLR0911", "PLC0415"]
Expand Down
Loading