Skip to content

Commit 20fc01a

Browse files
author
Oleksandr Anyshchenko
committed
Applied black formatter
1 parent 21f718d commit 20fc01a

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

exonum/transactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def tx(self, secret_key, hex=False):
9696
k: v for k, v in plain.items() if k not in meta_fields
9797
}
9898
del message["payload_sz"]
99-
del message['network_id'] # Redundant field in JSON
99+
del message["network_id"] # Redundant field in JSON
100100
return message
101101

102102
def hash(self, secret_key):

tests/test_serde.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# coding: utf-8
22
from uuid import uuid4
33
from six import with_metaclass
4-
from exonum.datatypes import (Decimal, EncodingStruct, SocketAddr, Str, Uuid,
5-
Vec, i64, u8, u16)
4+
from exonum.datatypes import (
5+
Decimal,
6+
EncodingStruct,
7+
SocketAddr,
8+
Str,
9+
Uuid,
10+
Vec,
11+
i64,
12+
u8,
13+
u16,
14+
)
615

716

817
def test_simple():
@@ -75,7 +84,6 @@ class X(with_metaclass(EncodingStruct)):
7584
assert xx.f.val == x.f.val
7685

7786

78-
7987
def test_inner():
8088
class X(with_metaclass(EncodingStruct)):
8189
first = Vec(u16)

work.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
# a.tx(secret_key)
2525

2626
public_key = bytes.fromhex(
27-
"0f17189c062e7f3fbb47a21834d41e4d5c5388dd7db38c4de1ce732971a38ef9")
27+
"0f17189c062e7f3fbb47a21834d41e4d5c5388dd7db38c4de1ce732971a38ef9"
28+
)
2829
secret_key = bytes.fromhex(
29-
"5520c351b7760aedeef32687918eb2587ab515e4ae0eeef271a0f0a99f1df3710f17189c062e7f3fbb47a21834d41e4d5c5388dd7db38c4de1ce732971a38ef9")
30+
"5520c351b7760aedeef32687918eb2587ab515e4ae0eeef271a0f0a99f1df3710f17189c062e7f3fbb47a21834d41e4d5c5388dd7db38c4de1ce732971a38ef9"
31+
)
3032

3133

3234
@transactions
@@ -38,4 +40,4 @@ class CreateUser(metaclass=exonum.EncodingStruct):
3840
a = CreateUser(public_key=public_key, name="Me")
3941

4042
print(json.dumps(a.tx(secret_key), indent=2))
41-
print('tx hash:', a.hash(secret_key))
43+
print("tx hash:", a.hash(secret_key))

0 commit comments

Comments
 (0)