Skip to content

Commit 66e658d

Browse files
committed
Chore: Bump Ruff version.
1 parent 5ba3dda commit 66e658d

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- id: black
1919

2020
- repo: https://github.com/charliermarsh/ruff-pre-commit
21-
rev: 'v0.6.1'
21+
rev: 'v0.7.4'
2222
hooks:
2323
- id: ruff
2424
args: [ "--fix", "." ]

dp3/bin/schema_update.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def main(args):
7878
curr_eid_types = config_schema["entity_id_types"]
7979

8080
log.info("Mismatch in entity ID types:")
81-
for entity, entity_updates in sorted(eid_updates.items(), key=lambda x: x[0]):
81+
for entity in sorted(eid_updates):
8282
prev = prev_eid_types.get(entity, "None")
8383
curr = curr_eid_types.get(entity, "None")
8484
log.info(

dp3/database/schema_cleaner.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def safe_update_schema(self):
134134
return self._error_on_conflict()
135135

136136
if eid_updates:
137-
for entity in eid_updates.keys():
137+
for entity in eid_updates:
138138
self.log.warning(
139139
"Entity ID type mismatch for %s: %s (DB) -> %s (config)",
140140
entity,
@@ -661,6 +661,6 @@ def migrate_schema_3_to_4(schema: dict) -> dict:
661661
"""
662662
schema["_id"] += 1
663663
schema["version"] = 4
664-
schema["entity_id_types"] = {entity: str(str) for entity in schema["schema"].keys()}
664+
schema["entity_id_types"] = {entity: str(str) for entity in schema["schema"]}
665665

666666
return schema

dp3/snapshots/snapshooter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
DataPointTask,
3939
Snapshot,
4040
SnapshotMessageType,
41+
parse_eid_tuples_from_cache,
4142
parse_eids_from_cache,
4243
task_context,
43-
parse_eid_tuples_from_cache,
4444
)
4545
from dp3.common.types import EventGroupType
4646
from dp3.common.utils import get_func_name

tests/test_api/test_02_get_attr_value.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def test_attr_serialization(self):
110110
attr_type=2, current_value=sorted(valid, key=lambda x: str(x))
111111
)
112112
self.query_expected_value(
113-
lambda: self.get_history_attr_value(path),
114-
lambda received: received == expected,
113+
lambda: self.get_history_attr_value(path), # noqa: B023
114+
lambda received: received == expected, # noqa: B023
115115
attempts=10,
116116
delay_s=0.2,
117117
)

0 commit comments

Comments
 (0)