Skip to content

Commit 5f60684

Browse files
authored
Merge pull request #975 from fractal-analytics-platform/precommit-update
bump precommit
2 parents efc85b4 + f20b3b3 commit 5f60684

25 files changed

+14
-46
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.3.0
3+
rev: v6.0.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- repo: https://github.com/asottile/reorder_python_imports
8-
rev: v3.1.0
8+
rev: v3.15.0
99
hooks:
1010
- id: reorder-python-imports
1111
- repo: https://github.com/psf/black
12-
rev: 22.3.0
12+
rev: 23.12.1
1313
hooks:
1414
- id: black
1515
args: [--line-length=79]
1616
- repo: https://github.com/PyCQA/flake8
17-
rev: 3.9.2
17+
rev: 7.3.0
1818
hooks:
1919
- id: flake8
2020
args: ["--ignore=E203,W503"]
2121
- repo: https://github.com/PyCQA/bandit
22-
rev: '1.7.4'
22+
rev: '1.8.6'
2323
hooks:
2424
- id: bandit
2525
args: ["-x", "tests/*"]

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Unreleased
44

5+
* Bump versions of `pre-commit` tools (\#975).
6+
57
# 1.5.4
68
* Tasks:
79
* Catch `FileNotFoundError` in `apply_registration_to_image` task when race conditions with the reference cycle are hit (\#971).

docs/_tasks/generate_task_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
homepage_url = package["homepage_url"]
117117
manifest_url = package["manifest_url"]
118118
description = package.get("description", None)
119-
r = requests.get(manifest_url)
119+
r = requests.get(manifest_url, timeout=100)
120120
if not r.status_code == 200:
121121
error_msg = f"Something wrong with the request to {manifest_url}"
122122
logger.error(f"{prefix} {error_msg}")

fractal_tasks_core/channels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def _get_new_unique_value(
420420

421421

422422
def update_omero_channels(
423-
old_channels: list[dict[str, Any]]
423+
old_channels: list[dict[str, Any]],
424424
) -> list[dict[str, Any]]:
425425
"""
426426
Make an existing list of Omero channels Fractal-compatible

fractal_tasks_core/dev/lib_descriptions.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ def _get_class_attrs_descriptions(
165165
docstring = ast.get_docstring(_class)
166166
parsed_docstring = docparse(docstring)
167167
descriptions = {
168-
x.arg_name: _sanitize_description(x.description)
169-
if x.description
170-
else "Missing description"
168+
x.arg_name: (
169+
_sanitize_description(x.description)
170+
if x.description
171+
else "Missing description"
172+
)
171173
for x in parsed_docstring.params
172174
}
173175
logging.info(f"[_get_class_attrs_descriptions] END ({class_name=})")

fractal_tasks_core/dev/lib_signature_constraints.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def _validate_function_signature(function: Callable):
8181
"""
8282
sig = signature(function)
8383
for param in sig.parameters.values():
84-
8584
# CASE 1: Check that name is not forbidden
8685
if param.name in FORBIDDEN_PARAM_NAMES:
8786
raise ValueError(

fractal_tasks_core/pyramids.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def build_pyramid(
3737
aggregation_function: Optional[Callable] = None,
3838
open_array_kwargs: Optional[Mapping] = None,
3939
) -> None:
40-
4140
"""
4241
Starting from on-disk highest-resolution data, build and write to disk a
4342
pyramid with `(num_levels - 1)` coarsened levels.

fractal_tasks_core/tasks/copy_ome_zarr_hcs_plate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ def copy_ome_zarr_hcs_plate(
143143

144144
# Generate parallelization list
145145
for zarr_url in zarr_urls:
146-
147146
# Check if the zarr_url is valid
148147
if len(zarr_url.rstrip("/").split("/")) < 4:
149148
raise ValueError(

tests/data/fake_package_for_schema_experiments/new_args_schema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626

2727
if __name__ == "__main__":
28-
2928
# Read manifest
3029
manifest_path = (
3130
Path(my_package.__file__).parent / "__FRACTAL_MANIFEST__.json"

tests/tasks/_validation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ def validate_axes_and_coordinateTransformations(image_zarr: Path):
108108
def validate_labels_and_measurements(
109109
image_zarr: Path, *, label_name: str, table_name: str
110110
):
111-
112111
label_path = str(image_zarr / "labels" / label_name / "0")
113112
table_path = str(image_zarr / "tables" / table_name)
114113
debug(label_path)

0 commit comments

Comments
 (0)