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: