From ff4c8c84619da201addf164381a0ad898d9b942c Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 23 Dec 2024 22:25:51 +0300 Subject: [PATCH] Shut mypy up --- repology/parsers/parsers/hackage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repology/parsers/parsers/hackage.py b/repology/parsers/parsers/hackage.py index 7804aedb7..230176358 100644 --- a/repology/parsers/parsers/hackage.py +++ b/repology/parsers/parsers/hackage.py @@ -86,14 +86,14 @@ def _iter_hackage_tarfile_multipass(path: str) -> Iterable[tuple[str, dict[str, latest_versions: dict[str, list[Any]] = {} # name -> [version, count] # Pass 1: gather preferred versions - with tarfile.open(path, 'r|*') as tar: + with tarfile.open(path, 'r|*') as tar: # type: ignore for tarinfo in tar: tarpath = tarinfo.name.split('/') if tarpath[-1] == 'preferred-versions': preferred_versions[tarpath[0]] = _extract_tarinfo(tar, tarinfo) # Pass 2: gather latest versions - with tarfile.open(path, 'r|*') as tar: + with tarfile.open(path, 'r|*') as tar: # type: ignore for tarinfo in tar: tarpath = tarinfo.name.split('/') if tarpath[-1].endswith('.cabal'): @@ -106,7 +106,7 @@ def _iter_hackage_tarfile_multipass(path: str) -> Iterable[tuple[str, dict[str, latest_versions[name][1] += 1 # Pass 3: extract cabal files - with tarfile.open(path, 'r|*') as tar: + with tarfile.open(path, 'r|*') as tar: # type: ignore for tarinfo in tar: tarpath = tarinfo.name.split('/') if tarpath[-1].endswith('.cabal'):