mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 22:51:14 -07:00
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:
co-authored by
Claude Sonnet 4.6
parent
4c3e1d9a6e
commit
01a55e52ff
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user