mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-21 11:04:19 +01:00
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:
@@ -10,7 +10,7 @@ from ..core.settings import settings
|
||||
def amount_summary(proofs: List[Proof], unit: Unit) -> str:
|
||||
amounts_we_have = [
|
||||
(amount, len([p for p in proofs if p.amount == amount]))
|
||||
for amount in set([p.amount for p in proofs])
|
||||
for amount in {p.amount for p in proofs}
|
||||
]
|
||||
amounts_we_have.sort(key=lambda x: x[0])
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user