Skip to content

Commit bed9167

Browse files
committed
formatting
1 parent b7960c3 commit bed9167

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pycardano/txbuilder.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class TransactionBuilder:
158158
_withdrawal_script_to_redeemers: List[Tuple[ScriptType, Optional[Redeemer]]] = (
159159
field(init=False, default_factory=lambda: [])
160160
)
161-
161+
162162
_certificate_script_to_redeemers: List[Tuple[ScriptType, Optional[Redeemer]]] = (
163163
field(init=False, default_factory=lambda: [])
164164
)
@@ -396,7 +396,8 @@ def add_certificate_script(
396396
redeemer: Optional[Redeemer] = None,
397397
) -> TransactionBuilder:
398398
"""Add a certificate script along with its redeemer to this transaction.
399-
WARNING: The order of operations matters. The index of the redeemer will be set to the index of the last certificate added.
399+
WARNING: The order of operations matters.
400+
The index of the redeemer will be set to the index of the last certificate added.
400401
401402
Args:
402403
script (Union[UTxO, PlutusV1Script, PlutusV2Script, PlutusV3Script]): A plutus script.
@@ -411,9 +412,10 @@ def add_certificate_script(
411412
f"Expect the redeemer tag's type to be {RedeemerTag.CERTIFICATE}, "
412413
f"but got {redeemer.tag} instead."
413414
)
414-
assert (
415-
self.certificates is not None and len(self.certificates) >= 1
416-
), "self.certificates is None. redeemer.index needs to be set to the index of the corresponding certificate (defaulting to the last certificate) however no certificates could be found"
415+
assert self.certificates is not None and len(self.certificates) >= 1, (
416+
"self.certificates is None. redeemer.index needs to be set to the index of the corresponding"
417+
"certificate (defaulting to the last certificate) however no certificates could be found"
418+
)
417419
redeemer.index = len(self.certificates) - 1
418420
redeemer.tag = RedeemerTag.CERTIFICATE
419421
self._consolidate_redeemer(redeemer)
@@ -516,7 +518,7 @@ def all_scripts(self) -> List[ScriptType]:
516518

517519
for s, _ in self._withdrawal_script_to_redeemers:
518520
scripts[script_hash(s)] = s
519-
521+
520522
for s, _ in self._certificate_script_to_redeemers:
521523
scripts[script_hash(s)] = s
522524

0 commit comments

Comments
 (0)