diff --git a/piptools/_compat/pip_compat.py b/piptools/_compat/pip_compat.py index a5f843ad..1d346bdf 100644 --- a/piptools/_compat/pip_compat.py +++ b/piptools/_compat/pip_compat.py @@ -64,7 +64,8 @@ def _from_importlib(cls, dist: _ImportLibDist) -> Distribution: return cls(dist._dist.name, dist._dist.version, requires, dist.direct_url) -class FileLink(Link): +class FileLink(Link): # type: ignore[misc] + _url: str @property def file_path(self) -> str: diff --git a/tests/test_pip_compat.py b/tests/test_pip_compat.py index 583addfb..be575154 100644 --- a/tests/test_pip_compat.py +++ b/tests/test_pip_compat.py @@ -1,13 +1,8 @@ from __future__ import annotations -import os -import tempfile from pathlib import Path, PurePosixPath -import pytest - from piptools._compat.pip_compat import parse_requirements -from piptools.repositories import PyPIRepository from .constants import PACKAGES_RELATIVE_PATH