Skip to content

Commit

Permalink
Add typing.Tuple, define h_tuple type, define keys type.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWizardTower authored and grahamc committed Feb 29, 2020
1 parent 641f9f2 commit 26b23ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nixops/diff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import itertools

from typing import Any, AnyStr, Callable, Dict, Optional, List
from typing import Any, AnyStr, Callable, Dict, List, Optional, Tuple
from nixops.logger import MachineLogger
from nixops.state import StateDict

Expand Down Expand Up @@ -149,8 +149,9 @@ def visit(handler: Handler) -> None:
def get_handlers_sequence(self, combinations: int = 1) -> List[Handler]:
if len(self.get_keys()) == 0:
return []
h_tuple: Tuple[Handler, ...]
for h_tuple in itertools.combinations(self.handlers, combinations):
keys = []
keys: List[str] = []
for item in h_tuple:
keys.extend(item.get_keys())
if combinations == len(self.handlers):
Expand Down

0 comments on commit 26b23ab

Please sign in to comment.