Skip to content

Commit

Permalink
Fix type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Nov 29, 2023
1 parent fb66f3a commit 8c8c6d0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/resolvelib/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
Collection,
Generic,
Iterable,
List,
Mapping,
NamedTuple,
Optional,
Set,
Tuple,
)

from .providers import AbstractProvider
Expand Down Expand Up @@ -279,7 +276,7 @@ def _attempt_to_pin_criterion(self, name: KT) -> list[Criterion[RT, CT]]:
# end, signal for backtracking.
return causes

def _backtrack_iteration(self) -> Tuple[KT, CT, List[Tuple[KT, list[CT]]]]:
def _backtrack_iteration(self) -> tuple[KT, CT, list[tuple[KT, list[CT]]]]:
broken_state = self._states.pop()
name, candidate = broken_state.mapping.popitem()
incompatibilities_from_broken = [
Expand All @@ -292,8 +289,8 @@ def _backtrack_iteration(self) -> Tuple[KT, CT, List[Tuple[KT, list[CT]]]]:
def _backjump_iteration(
self,
causes: list[RequirementInformation[RT, CT]],
incompatible_deps: Set[KT],
) -> Tuple[KT, CT, List[Tuple[KT, list[CT]]]]:
incompatible_deps: set[KT],
) -> tuple[KT, CT, list[tuple[KT, list[CT]]]]:
# Ensure to backtrack to a state that caused the incompatibility
incompatible_state = False
name, candidate, broken_state = None, None, None
Expand Down

0 comments on commit 8c8c6d0

Please sign in to comment.