fix: suppress invalid-method-override on LazyPasswordDataset.__getitem__

The return type dict[str, object] is intentionally more specific than
the generic Dataset[_T_co] base. Suppress the override check; the
class already uses type: ignore[type-arg] for the same reason.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Justin Bollinger
2026-02-20 18:55:59 -05:00
co-authored by Claude Sonnet 4.6
parent 4c3e1d9a6e
commit 01a55e52ff
+1 -1
View File
@@ -211,7 +211,7 @@ def train(
def __len__(self) -> int:
return len(self.offsets)
def __getitem__(self, idx: int) -> dict[str, object]:
def __getitem__(self, idx: int) -> dict[str, object]: # type: ignore[override]
with open(self.filepath, "rb") as f:
f.seek(self.offsets[idx])
line = f.readline().decode("utf-8", errors="replace").strip()