Skip to content

Commit 9b7ce0a

Browse files
committed
Merge branch 'release-v4.7' into develop
2 parents e4f0d3f + bd3edb9 commit 9b7ce0a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
- id: check-yaml
1313
- id: check-added-large-files
1414
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.9.9
15+
rev: v0.11.2
1616
hooks:
1717
- id: ruff
1818
name: ruff check
@@ -26,7 +26,7 @@ repos:
2626
name: ruff format
2727
alias: format
2828
- repo: https://github.com/RobertCraigie/pyright-python
29-
rev: v1.1.396
29+
rev: v1.1.398
3030
hooks:
3131
- id: pyright
3232
additional_dependencies:

cryosparc/dataset/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ def drop_fields(self, names: Union[Collection[str], Callable[[str], bool]], *, c
12701270
Returns:
12711271
Dataset: current dataset or copy with fields removed
12721272
"""
1273-
test = (lambda n: n not in names) if isinstance(names, Collection) else (lambda n: not names(n)) # type: ignore
1273+
test = (lambda n: n not in names) if isinstance(names, Collection) else (lambda n: not names(n))
12741274
return self.filter_fields(test, copy=copy)
12751275

12761276
def rename_fields(self, field_map: Union[Dict[str, str], Callable[[str], str]], *, copy: bool = False):
@@ -1286,8 +1286,9 @@ def rename_fields(self, field_map: Union[Dict[str, str], Callable[[str], str]],
12861286
Returns:
12871287
Dataset: current dataset or copy with fields renamed
12881288
"""
1289+
fm: Callable[[str], str]
12891290
if isinstance(field_map, dict):
1290-
fm = lambda x: field_map.get(x, x) # noqa
1291+
fm = lambda x: field_map.get(x, x) # noqa: E731
12911292
else:
12921293
fm = field_map
12931294

@@ -1325,7 +1326,7 @@ def rename_prefix(self, old_prefix: str, new_prefix: str, *, copy: bool = False)
13251326
"""
13261327
prefix_map = {old_prefix: new_prefix}
13271328

1328-
def field_map(name):
1329+
def field_map(name: str):
13291330
prefix, base = name.split("/")
13301331
return prefix_map.get(prefix, prefix) + "/" + base
13311332

0 commit comments

Comments
 (0)