Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Quexington committed Nov 5, 2024
1 parent 1658b3b commit 9aa4dbb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions chia/wallet/puzzles/custody/custody_architecture.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

# General (inner) puzzle driver spec
class Puzzle(Protocol):

def memo(self, nonce: int) -> Program: ...

def puzzle(self, nonce: int) -> Program: ...
Expand All @@ -60,7 +59,6 @@ def from_program(cls, prog: Program) -> PuzzleHint:

@dataclass(frozen=True)
class UnknownPuzzle:

puzzle_hint: PuzzleHint

def memo(self, nonce: int) -> Program:
Expand Down Expand Up @@ -248,7 +246,8 @@ def memo(self) -> Program:
puzzle_hint: Union[MofNHint, PuzzleHint]
if isinstance(self.puzzle, MofN):
puzzle_hint = MofNHint(
self.puzzle.m, [member.memo() for member in self.puzzle.members] # pylint: disable=no-member
self.puzzle.m,
[member.memo() for member in self.puzzle.members], # pylint: disable=no-member
)
else:
puzzle_hint = PuzzleHint(
Expand Down Expand Up @@ -325,15 +324,15 @@ def fill_in_unknown_puzzles(self, puzzle_dict: Mapping[bytes32, Puzzle]) -> Puzz

new_puzzle: Puzzle
if (
isinstance(self.puzzle, UnknownPuzzle)
and self.puzzle.puzzle_hint.puzhash in puzzle_dict # pylint: disable=no-member
isinstance(self.puzzle, UnknownPuzzle) and self.puzzle.puzzle_hint.puzhash in puzzle_dict # pylint: disable=no-member
):
new_puzzle = puzzle_dict[self.puzzle.puzzle_hint.puzhash] # pylint: disable=no-member
elif isinstance(self.puzzle, MofN):
new_puzzle = replace(
self.puzzle,
members=[
puz.fill_in_unknown_puzzles(puzzle_dict) for puz in self.puzzle.members # pylint: disable=no-member
puz.fill_in_unknown_puzzles(puzzle_dict)
for puz in self.puzzle.members # pylint: disable=no-member
],
)
else:
Expand Down Expand Up @@ -412,7 +411,6 @@ def solve(
member_solution: Program,
delegated_puzzle_and_solution: Optional[DelegatedPuzzleAndSolution] = None,
) -> Program:

if len(self.restrictions) > 0: # We optimize away the restriction layer when no restrictions are present
solution = Program.to([member_validator_solutions, dpuz_validator_solutions, member_solution])
else:
Expand Down

0 comments on commit 9aa4dbb

Please sign in to comment.