From 3aa8848ac047763ae6fc575ec64beadeefda2d17 Mon Sep 17 00:00:00 2001
From: Hugo Trentesaux <hugo@trentesaux.fr>
Date: Fri, 9 Oct 2020 12:28:35 +0200
Subject: [PATCH] black + copyright

---
 duniterpy/constants.py            |  6 ++++--
 duniterpy/helpers/blockchain.py   | 18 ++++++++++++++++++
 examples/load_local_blockchain.py | 18 ++++++++++++++++++
 examples/send_identity.py         |  6 +++++-
 examples/send_membership.py       |  5 ++++-
 5 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/duniterpy/constants.py b/duniterpy/constants.py
index 6703e382..1e182dc2 100644
--- a/duniterpy/constants.py
+++ b/duniterpy/constants.py
@@ -25,8 +25,10 @@ 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]["
diff --git a/duniterpy/helpers/blockchain.py b/duniterpy/helpers/blockchain.py
index cc6d433a..0e4e1090 100644
--- a/duniterpy/helpers/blockchain.py
+++ b/duniterpy/helpers/blockchain.py
@@ -1,3 +1,21 @@
+"""
+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
 # example usage :
 # ```
diff --git a/examples/load_local_blockchain.py b/examples/load_local_blockchain.py
index d59ee891..0dc9e9ff 100644
--- a/examples/load_local_blockchain.py
+++ b/examples/load_local_blockchain.py
@@ -1,3 +1,21 @@
+"""
+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
 # by default, it searches in ~/.config/duniter/duniter_default/g1/
 
diff --git a/examples/send_identity.py b/examples/send_identity.py
index 1fc29f89..68bcd4d5 100644
--- a/examples/send_identity.py
+++ b/examples/send_identity.py
@@ -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
 
diff --git a/examples/send_membership.py b/examples/send_membership.py
index dfa7139e..acfb79ef 100644
--- a/examples/send_membership.py
+++ b/examples/send_membership.py
@@ -35,7 +35,10 @@ 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
-- 
GitLab