From 8d59f9ac66be7c77d361e18f2e18cd3f0ec8c1cc Mon Sep 17 00:00:00 2001 From: Stephan Finkensieper Date: Fri, 26 Apr 2024 14:16:08 +0000 Subject: [PATCH] Inline method to make mypy happy --- conda_lock/pypi_solver.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/conda_lock/pypi_solver.py b/conda_lock/pypi_solver.py index b5ae97d9c..07d930b5f 100644 --- a/conda_lock/pypi_solver.py +++ b/conda_lock/pypi_solver.py @@ -415,13 +415,10 @@ def get_hash(self) -> HashModel: return self._get_hash_from_dependency() or self._get_hash_from_link() def _get_hash_from_dependency(self) -> Optional[HashModel]: - if self._dependency_provides_hash(): + if isinstance(self.dependency, PoetryDependencyWithHash): return self.dependency.get_hash_model() return None - def _dependency_provides_hash(self) -> bool: - return isinstance(self.dependency, PoetryDependencyWithHash) - def _get_hash_from_link(self) -> HashModel: hashes: Dict[str, str] = {} if self.link.hash_name is not None and self.link.hash is not None: