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

black + copyright

parent 01938f23
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,8 +25,10 @@ BLOCK_ID_REGEX = "[0-9]+" ...@@ -25,8 +25,10 @@ BLOCK_ID_REGEX = "[0-9]+"
BLOCK_UID_REGEX = "{block_id_regex}-{block_hash_regex}".format( BLOCK_UID_REGEX = "{block_id_regex}-{block_hash_regex}".format(
block_id_regex=BLOCK_ID_REGEX, block_hash_regex=BLOCK_HASH_REGEX block_id_regex=BLOCK_ID_REGEX, block_hash_regex=BLOCK_HASH_REGEX
) )
CONDITIONS_REGEX = "(&&|\\|\\|| |[()]|(SIG\\({pubkey_regex}\\)|(XHX\\({hash_regex}\\))))*".format( CONDITIONS_REGEX = (
pubkey_regex=PUBKEY_REGEX, hash_regex=HASH_REGEX "(&&|\\|\\|| |[()]|(SIG\\({pubkey_regex}\\)|(XHX\\({hash_regex}\\))))*".format(
pubkey_regex=PUBKEY_REGEX, hash_regex=HASH_REGEX
)
) )
IPV4_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][" "(?:(?:[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]["
......
"""
Copyright 2014-2020 Vincent Texier <vit@free.fr>
DuniterPy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DuniterPy is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
# imports locally stored blockchain in the chunk format # imports locally stored blockchain in the chunk format
# example usage : # example usage :
# ``` # ```
......
"""
Copyright 2014-2020 Vincent Texier <vit@free.fr>
DuniterPy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DuniterPy is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
# this example lets you load locally copy of duniter blockchain into duniterpy objects # this example lets you load locally copy of duniter blockchain into duniterpy objects
# by default, it searches in ~/.config/duniter/duniter_default/g1/ # by default, it searches in ~/.config/duniter/duniter_default/g1/
......
...@@ -34,7 +34,11 @@ BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" ...@@ -34,7 +34,11 @@ 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 Get an Identity document
......
...@@ -35,7 +35,10 @@ BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" ...@@ -35,7 +35,10 @@ BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
def get_membership_document( 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: ) -> Membership:
""" """
Get a Membership document 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