Skip to content

Commit

Permalink
Inline method to make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
sfinkens committed Apr 26, 2024
1 parent 5252843 commit 8d59f9a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions conda_lock/pypi_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8d59f9a

Please sign in to comment.