Skip to content
Snippets Groups Projects
Commit 01938f23 authored by Hugo Trentesaux's avatar Hugo Trentesaux Committed by Vincent Texier
Browse files

[fmt] black

parent c61a7855
No related branches found
No related tags found
2 merge requests!128Release 0.62.0,!124#130: Support reading Duniter's local json blockchain
......@@ -25,10 +25,8 @@ BLOCK_ID_REGEX = "[0-9]+"
BLOCK_UID_REGEX = "{block_id_regex}-{block_hash_regex}".format(
block_id_regex=BLOCK_ID_REGEX, block_hash_regex=BLOCK_HASH_REGEX
)
CONDITIONS_REGEX = (
"(&&|\\|\\|| |[()]|(SIG\\({pubkey_regex}\\)|(XHX\\({hash_regex}\\))))*".format(
pubkey_regex=PUBKEY_REGEX, hash_regex=HASH_REGEX
)
CONDITIONS_REGEX = "(&&|\\|\\|| |[()]|(SIG\\({pubkey_regex}\\)|(XHX\\({hash_regex}\\))))*".format(
pubkey_regex=PUBKEY_REGEX, hash_regex=HASH_REGEX
)
IPV4_REGEX = (
"(?:(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4]["
......
......@@ -3,9 +3,9 @@
from duniterpy.helpers.blockchain import load
bc = load() # gets blockchain iterator
b = next(bc) # gets block
b.number # should return 0
bc = load() # gets blockchain iterator
b = next(bc) # gets block
b.number # should return 0
# you can access all properties of this block through it's duniterpy objects attributes
next(bc).number # should return 1
next(bc).number # should return 2 (and so on)
\ No newline at end of file
next(bc).number # should return 1
next(bc).number # should return 2 (and so on)
......@@ -34,11 +34,7 @@ BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
################################################
def get_identity_document(
current_block: dict,
uid: str,
key: SigningKey,
) -> Identity:
def get_identity_document(current_block: dict, uid: str, key: SigningKey,) -> Identity:
"""
Get an Identity document
......
......@@ -35,10 +35,7 @@ BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
def get_membership_document(
membership_type: str,
current_block: dict,
identity: dict,
key: SigningKey,
membership_type: str, current_block: dict, identity: dict, key: SigningKey,
) -> Membership:
"""
Get a Membership document
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment