chore: run pyupgrade (#623)

- use `{...}` instead of `set([...])`
- do not use `class Foo(object):`, just use `class Foo:`
- do not specify default flags (`"r"`) for `open()`
This commit is contained in:
Pavol Rusnak
2024-09-24 13:53:35 +02:00
committed by GitHub
parent 870d75b205
commit 25f0763f94
16 changed files with 23 additions and 23 deletions

View File

@@ -234,7 +234,7 @@ class LedgerVerification(
return units_proofs[0]
def get_fees_for_proofs(self, proofs: List[Proof]) -> int:
if not len(set([self.keysets[p.id].unit for p in proofs])) == 1:
if not len({self.keysets[p.id].unit for p in proofs}) == 1:
raise TransactionUnitError("inputs have different units.")
fee = (sum([self.keysets[p.id].input_fee_ppk for p in proofs]) + 999) // 1000
return fee