Skip to content

Commit 6edc256

Browse files
committed
ratchet(types): promote unknown-argument to error
fulltext_filter() in database_arango.py called cls.load(document, strict=True), but no load() implementation accepts a `strict` kwarg — it would raise TypeError if the method were ever invoked (it has no callers anywhere in the repo, so the bug never surfaced). Drop the stray kwarg to match the sibling cls.load(doc) call in filter(), and promote unknown-argument to error. ty check exits 0; ruff clean; tests/schemas (184), tests/apiv2 (197), tests/core_tests (29) all pass.
1 parent 80f16bb commit 6edc256

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

core/database_arango.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ def fulltext_filter(cls, keywords):
13361336
key = cls._text_indexes[0]["fields"][0]
13371337
for document in collection.find_by_text(key, query):
13381338
document["__id"] = document.pop("_key")
1339-
yeti_objects.append(cls.load(document, strict=True))
1339+
yeti_objects.append(cls.load(document))
13401340
return yeti_objects
13411341

13421342
def _delete_vertex_refs_in_graphs(self, vertex_id):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ invalid-type-form = "warn" # 5 — pydantic conlist() in annotations
9696
unresolved-import = "warn" # 3 — optional deps not present in lint env
9797
no-matching-overload = "warn" # 1
9898
missing-argument = "warn" # 1
99-
unknown-argument = "warn" # 1
99+
unknown-argument = "error" # 0 — fixed a stray strict= kwarg on cls.load
100100

101101
[tool.uv.sources]
102102
artifacts = { git = "https://github.com/forensicartifacts/artifacts.git", rev = "main" }

0 commit comments

Comments
 (0)