diff --git a/.gitignore b/.gitignore
index af2fde44a0c30a3430cc2f221e8ecef37fdfbd31..c0682531521ed23821947af2693a2e9d03fb5c0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,4 +48,7 @@ res/i18n/lang-*
 out
 .directory
 temp
-*_uic.py
\ No newline at end of file
+*_uic.py
+
+# mypy
+.mypy_cache
\ No newline at end of file
diff --git a/src/sakia/__init__.py b/src/sakia/__init__.py
index 712fc52e85edd419a73806f89964fba4414ae5ca..2cbe02dafad4f26e18d6e74db23ae507d695bed8 100644
--- a/src/sakia/__init__.py
+++ b/src/sakia/__init__.py
@@ -1,2 +1,2 @@
-__version_info__ = ('0', '33', '0rc7')
-__version__ = '.'.join(__version_info__)
+__version_info__ = ("0", "33", "0rc7")
+__version__ = ".".join(__version_info__)
diff --git a/src/sakia/app.py b/src/sakia/app.py
index ecfe2e41f2d99d3d6e7fa45a43013f8e23ba4e06..f69536884c55fa0f379e4fd1ac57cca2b196bde9 100644
--- a/src/sakia/app.py
+++ b/src/sakia/app.py
@@ -9,12 +9,26 @@ from PyQt5.QtCore import QObject, pyqtSignal, QTranslator, QCoreApplication, QLo
 from . import __version__
 from .options import SakiaOptions
 from sakia.data.connectors import BmaConnector
-from sakia.services import NetworkService, BlockchainService, IdentitiesService, \
-    SourcesServices, TransactionsService, DocumentsService
+from sakia.services import (
+    NetworkService,
+    BlockchainService,
+    IdentitiesService,
+    SourcesServices,
+    TransactionsService,
+    DocumentsService,
+)
 from sakia.data.repositories import SakiaDatabase
 from sakia.data.entities import Transaction, Connection, Identity, Dividend
-from sakia.data.processors import BlockchainProcessor, NodesProcessor, IdentitiesProcessor, \
-    CertificationsProcessor, SourcesProcessor, TransactionsProcessor, ConnectionsProcessor, DividendsProcessor
+from sakia.data.processors import (
+    BlockchainProcessor,
+    NodesProcessor,
+    IdentitiesProcessor,
+    CertificationsProcessor,
+    SourcesProcessor,
+    TransactionsProcessor,
+    ConnectionsProcessor,
+    DividendsProcessor,
+)
 from sakia.data.files import AppDataFile, UserParametersFile, PluginsDirectory
 from sakia.decorators import asyncify
 from sakia.money import *
@@ -72,7 +86,7 @@ class Application(QObject):
     transactions_service = attr.ib(default=None)
     documents_service = attr.ib(default=None)
     current_ref = attr.ib(default=Quantitative)
-    _logger = attr.ib(default=attr.Factory(lambda:logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
     available_version = attr.ib(init=False)
     _translator = attr.ib(init=False)
 
@@ -87,7 +101,7 @@ class Application(QObject):
         options = SakiaOptions.from_arguments(argv)
         app_data = AppDataFile.in_config_path(options.config_path).load_or_init()
         app = cls(qapp, loop, options, app_data, None, None, options.currency, None)
-        #app.set_proxy()
+        # app.set_proxy()
         app.load_profile(options.profile)
         app.documents_service = DocumentsService.instanciate(app)
         app.switch_language()
@@ -99,8 +113,12 @@ class Application(QObject):
         :param profile_name:
         :return:
         """
-        self.plugins_dir = PluginsDirectory.in_config_path(self.options.config_path, profile_name).load_or_init(self.options.with_plugin)
-        self.parameters = UserParametersFile.in_config_path(self.options.config_path, profile_name).load_or_init(profile_name)
+        self.plugins_dir = PluginsDirectory.in_config_path(
+            self.options.config_path, profile_name
+        ).load_or_init(self.options.with_plugin)
+        self.parameters = UserParametersFile.in_config_path(
+            self.options.config_path, profile_name
+        ).load_or_init(profile_name)
         self.db = SakiaDatabase.load_or_init(self.options, profile_name)
 
         self.instanciate_services()
@@ -109,8 +127,15 @@ class Application(QObject):
         nodes_processor = NodesProcessor(self.db.nodes_repo)
         bma_connector = BmaConnector(nodes_processor, self.parameters)
         connections_processor = ConnectionsProcessor(self.db.connections_repo)
-        identities_processor = IdentitiesProcessor(self.db.identities_repo, self.db.certifications_repo, self.db.blockchains_repo, bma_connector)
-        certs_processor = CertificationsProcessor(self.db.certifications_repo, self.db.identities_repo, bma_connector)
+        identities_processor = IdentitiesProcessor(
+            self.db.identities_repo,
+            self.db.certifications_repo,
+            self.db.blockchains_repo,
+            bma_connector,
+        )
+        certs_processor = CertificationsProcessor(
+            self.db.certifications_repo, self.db.identities_repo, bma_connector
+        )
         blockchain_processor = BlockchainProcessor.instanciate(self)
         sources_processor = SourcesProcessor.instanciate(self)
         transactions_processor = TransactionsProcessor.instanciate(self)
@@ -119,48 +144,76 @@ class Application(QObject):
         self.db.commit()
 
         self.documents_service = DocumentsService.instanciate(self)
-        self.identities_service = IdentitiesService(self.currency, connections_processor,
-                                                    identities_processor,
-                                                    certs_processor, blockchain_processor,
-                                                    bma_connector)
-
-        self.transactions_service = TransactionsService(self.currency, transactions_processor,
-                                                                   dividends_processor,
-                                                                   identities_processor, connections_processor,
-                                                                   bma_connector)
-
-        self.sources_service = SourcesServices(self.currency, sources_processor,
-                                               connections_processor, transactions_processor,
-                                               blockchain_processor, bma_connector)
-
-        self.blockchain_service = BlockchainService(self, self.currency, blockchain_processor, connections_processor,
-                                                    bma_connector,
-                                                    self.identities_service,
-                                                    self.transactions_service,
-                                                    self.sources_service)
-
-        self.network_service = NetworkService.load(self, self.currency, nodes_processor,
-                                                    self.blockchain_service,
-                                                    self.identities_service)
+        self.identities_service = IdentitiesService(
+            self.currency,
+            connections_processor,
+            identities_processor,
+            certs_processor,
+            blockchain_processor,
+            bma_connector,
+        )
+
+        self.transactions_service = TransactionsService(
+            self.currency,
+            transactions_processor,
+            dividends_processor,
+            identities_processor,
+            connections_processor,
+            bma_connector,
+        )
+
+        self.sources_service = SourcesServices(
+            self.currency,
+            sources_processor,
+            connections_processor,
+            transactions_processor,
+            blockchain_processor,
+            bma_connector,
+        )
+
+        self.blockchain_service = BlockchainService(
+            self,
+            self.currency,
+            blockchain_processor,
+            connections_processor,
+            bma_connector,
+            self.identities_service,
+            self.transactions_service,
+            self.sources_service,
+        )
+
+        self.network_service = NetworkService.load(
+            self,
+            self.currency,
+            nodes_processor,
+            self.blockchain_service,
+            self.identities_service,
+        )
 
     async def remove_connection(self, connection):
         connections_processor = ConnectionsProcessor.instanciate(self)
         connections_processor.remove_connections(connection)
 
-        CertificationsProcessor.instanciate(self).cleanup_connection(connection, connections_processor.pubkeys())
+        CertificationsProcessor.instanciate(self).cleanup_connection(
+            connection, connections_processor.pubkeys()
+        )
         IdentitiesProcessor.instanciate(self).cleanup_connection(connection)
 
-        SourcesProcessor.instanciate(self).drop_all_of(currency=connection.currency, pubkey=connection.pubkey)
+        SourcesProcessor.instanciate(self).drop_all_of(
+            currency=connection.currency, pubkey=connection.pubkey
+        )
 
         DividendsProcessor.instanciate(self).cleanup_connection(connection)
 
-        TransactionsProcessor.instanciate(self).cleanup_connection(connection, connections_processor.pubkeys())
+        TransactionsProcessor.instanciate(self).cleanup_connection(
+            connection, connections_processor.pubkeys()
+        )
 
         self.db.commit()
         self.connection_removed.emit(connection)
 
     async def initialize_blockchain(self):
-        await asyncio.sleep(2) # Give time for the network to connect to nodes
+        await asyncio.sleep(2)  # Give time for the network to connect to nodes
         await BlockchainProcessor.instanciate(self).initialize_blockchain(self.currency)
 
     def switch_language(self):
@@ -195,8 +248,10 @@ class Application(QObject):
         try:
             async with aiohttp.ClientSession() as session:
                 async with async_timeout.timeout(10):
-                    response = await session.get("https://api.github.com/repos/duniter/sakia/releases",
-                                                 proxy=self.parameters.proxy())
+                    response = await session.get(
+                        "https://api.github.com/repos/duniter/sakia/releases",
+                        proxy=self.parameters.proxy(),
+                    )
                     if response.status == 200:
                         releases = await response.json()
                         latest = None
@@ -204,24 +259,35 @@ class Application(QObject):
                             if not latest:
                                 latest = r
                             else:
-                                latest_date = datetime.datetime.strptime(latest['published_at'], "%Y-%m-%dT%H:%M:%SZ")
-                                date = datetime.datetime.strptime(r['published_at'], "%Y-%m-%dT%H:%M:%SZ")
+                                latest_date = datetime.datetime.strptime(
+                                    latest["published_at"], "%Y-%m-%dT%H:%M:%SZ"
+                                )
+                                date = datetime.datetime.strptime(
+                                    r["published_at"], "%Y-%m-%dT%H:%M:%SZ"
+                                )
                                 if latest_date < date:
                                     latest = r
                         latest_version = latest["tag_name"]
-                        version = (__version__ == latest_version,
-                                   latest_version,
-                                   latest["html_url"])
+                        version = (
+                            __version__ == latest_version,
+                            latest_version,
+                            latest["html_url"],
+                        )
                         logging.debug("Found version : {0}".format(latest_version))
                         logging.debug("Current version : {0}".format(__version__))
                         self.available_version = version
-        except (aiohttp.ClientError, aiohttp.ServerDisconnectedError, asyncio.TimeoutError, socket.gaierror) as e:
+        except (
+            aiohttp.ClientError,
+            aiohttp.ServerDisconnectedError,
+            asyncio.TimeoutError,
+            socket.gaierror,
+        ) as e:
             self._logger.debug("Could not connect to github : {0}".format(str(e)))
 
     def save_parameters(self, parameters):
-        self.parameters = UserParametersFile\
-            .in_config_path(self.options.config_path, parameters.profile_name)\
-            .save(parameters)
+        self.parameters = UserParametersFile.in_config_path(
+            self.options.config_path, parameters.profile_name
+        ).save(parameters)
 
     def change_referential(self, index):
         self.current_ref = Referentials[index]
diff --git a/src/sakia/constants.py b/src/sakia/constants.py
index d5c59565d934ded0ecd9004201e8acaa76bd92c0..fa6d0cf9f746a2878c4c55104111afd7fc3a585a 100644
--- a/src/sakia/constants.py
+++ b/src/sakia/constants.py
@@ -3,8 +3,12 @@ import yaml
 
 MAX_CONFIRMATIONS = 6
 
-with open(os.path.join(os.path.dirname(__file__), "root_servers.yml"), 'r', encoding="utf-8") as stream:
+with open(
+    os.path.join(os.path.dirname(__file__), "root_servers.yml"), "r", encoding="utf-8"
+) as stream:
     ROOT_SERVERS = yaml.load(stream)
 
-with open(os.path.join(os.path.dirname(__file__), "g1_licence.html"), 'r', encoding="utf-8") as stream:
+with open(
+    os.path.join(os.path.dirname(__file__), "g1_licence.html"), "r", encoding="utf-8"
+) as stream:
     G1_LICENCE = stream.read()
diff --git a/src/sakia/data/connectors/bma.py b/src/sakia/data/connectors/bma.py
index 456f7d8225dc80f80a6abd5a0d2162d72eeeb862..6cbfc6ec9c8638acb6ff9950f0d261a7e90adf62 100644
--- a/src/sakia/data/connectors/bma.py
+++ b/src/sakia/data/connectors/bma.py
@@ -23,7 +23,10 @@ async def parse_responses(responses):
                 elif r.status == 400:
                     error = await r.text()
                     try:
-                        result = (False, errors.DuniterError(bma.parse_error(error)).message)
+                        result = (
+                            False,
+                            errors.DuniterError(bma.parse_error(error)).message,
+                        )
                     except jsonschema.ValidationError:
                         result = (False, error)
                 elif r.status == 200:
@@ -37,25 +40,29 @@ async def parse_responses(responses):
                 result = (False, str(e))
     return result
 
+
 def filter_endpoints(request, nodes):
     def compare_versions(node, version):
-        if node.version and node.version != '':
+        if node.version and node.version != "":
             try:
                 return parse_version(node.version) >= parse_version(version)
             except TypeError:
                 return False
         else:
             return True
+
     filters = {
         bma.ud.history: lambda n: compare_versions(n, "0.11.0"),
         bma.tx.history: lambda n: compare_versions(n, "0.11.0"),
-        bma.blockchain.membership: lambda n: compare_versions(n, "0.14")
+        bma.blockchain.membership: lambda n: compare_versions(n, "0.14"),
     }
     if request in filters:
         nodes = [n for n in nodes if filters[request](n)]
     endpoints = []
     for n in nodes:
-        endpoints += [e for e in n.endpoints if type(e) in (BMAEndpoint, SecuredBMAEndpoint)]
+        endpoints += [
+            e for e in n.endpoints if type(e) in (BMAEndpoint, SecuredBMAEndpoint)
+        ]
     return endpoints
 
 
@@ -116,7 +123,7 @@ def _filter_data(request, data):
         for idty in filtered["identities"]:
             for c in idty["certifications"]:
                 c.pop("expiresIn")
-            idty.pop('membershipPendingExpiresIn')
+            idty.pop("membershipPendingExpiresIn")
 
     return filtered
 
@@ -127,8 +134,7 @@ def _merge_lookups(answers_data):
         if isinstance(data, errors.DuniterError):
             raise data
 
-    lookup_data = {"partial": False,
-                   "results": []}
+    lookup_data = {"partial": False, "results": []}
     for dict_hash in answers_data:
         if not isinstance(answers_data[dict_hash], errors.DuniterError):
             for data in answers_data[dict_hash]["results"]:
@@ -159,9 +165,10 @@ class BmaConnector:
     """
     This class is used to access BMA API.
     """
+
     _nodes_processor = attr.ib()
     _user_parameters = attr.ib()
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     async def _verified_request(self, node, request):
         try:
@@ -192,36 +199,65 @@ class BmaConnector:
         session = aiohttp.ClientSession()
         filtered_data = {}
         try:
-            while max([len(nodes) for nodes in answers.values()] + [0]) <= nb_verification:
+            while (
+                max([len(nodes) for nodes in answers.values()] + [0]) <= nb_verification
+            ):
                 futures = []
 
                 try:
-                    for i in range(0, int(nb_verification*1.4)+1):
+                    for i in range(0, int(nb_verification * 1.4) + 1):
                         node = next(nodes_generator)
                         endpoints = filter_endpoints(request, [node])
                         if not endpoints:
                             continue
                         endpoint = random.choice(endpoints)
                         self._logger.debug(
-                            "Requesting {0} on endpoint {1}".format(str(request.__name__), str(endpoint)))
-                        futures.append(self._verified_request(node, request(next(
-                            endpoint.conn_handler(session, proxy=self._user_parameters.proxy())),
-                            **req_args)))
+                            "Requesting {0} on endpoint {1}".format(
+                                str(request.__name__), str(endpoint)
+                            )
+                        )
+                        futures.append(
+                            self._verified_request(
+                                node,
+                                request(
+                                    next(
+                                        endpoint.conn_handler(
+                                            session, proxy=self._user_parameters.proxy()
+                                        )
+                                    ),
+                                    **req_args
+                                ),
+                            )
+                        )
                     if random_offline_node:
-                        futures.append(self._verified_request(random_offline_node[0], request(next(
-                            endpoint.conn_handler(session, proxy=self._user_parameters.proxy())),
-                            **req_args)))
+                        futures.append(
+                            self._verified_request(
+                                random_offline_node[0],
+                                request(
+                                    next(
+                                        endpoint.conn_handler(
+                                            session, proxy=self._user_parameters.proxy()
+                                        )
+                                    ),
+                                    **req_args
+                                ),
+                            )
+                        )
                 except StopIteration:
                     # When no more node is available, we go out of the while loop
                     break
                 finally:
                     # Everytime we go out of the while loop, we gather the futures
                     if futures:
-                        responses = await asyncio.gather(*futures, return_exceptions=True)
+                        responses = await asyncio.gather(
+                            *futures, return_exceptions=True
+                        )
                         for r in responses:
                             if isinstance(r, errors.DuniterError):
                                 if r.ucode == errors.HTTP_LIMITATION:
-                                    self._logger.debug("Exception in responses : " + r.message)
+                                    self._logger.debug(
+                                        "Exception in responses : " + r.message
+                                    )
                                     continue
                                 else:
                                     data_hash = hash(r.ucode)
@@ -248,15 +284,23 @@ class BmaConnector:
         raise NoPeerAvailable("", len(synced_nodes))
 
     async def simple_get(self, currency, request, req_args):
-        endpoints = filter_endpoints(request, self._nodes_processor.synced_nodes(currency))
+        endpoints = filter_endpoints(
+            request, self._nodes_processor.synced_nodes(currency)
+        )
         tries = 0
         while tries < 3 and endpoints:
             endpoint = random.choice(endpoints)
             endpoints.remove(endpoint)
             try:
-                self._logger.debug("Requesting {0} on endpoint {1}".format(str(request.__name__), str(endpoint)))
+                self._logger.debug(
+                    "Requesting {0} on endpoint {1}".format(
+                        str(request.__name__), str(endpoint)
+                    )
+                )
                 async with aiohttp.ClientSession() as session:
-                    json_data = await request(next(endpoint.conn_handler(session), **req_args))
+                    json_data = await request(
+                        next(endpoint.conn_handler(session), **req_args)
+                    )
                     return json_data
             except errors.DuniterError as e:
                 if e.ucode == errors.HTTP_LIMITATION:
@@ -264,8 +308,13 @@ class BmaConnector:
                     tries += 1
                 else:
                     raise
-            except (ClientError, gaierror, asyncio.TimeoutError,
-                    ValueError, jsonschema.ValidationError) as e:
+            except (
+                ClientError,
+                gaierror,
+                asyncio.TimeoutError,
+                ValueError,
+                jsonschema.ValidationError,
+            ) as e:
                 self._logger.debug(str(e))
                 tries += 1
             except AttributeError as e:
@@ -300,17 +349,30 @@ class BmaConnector:
         .. note:: If one node accept the requests (returns 200),
         the broadcast should be considered accepted by the network.
         """
-        filtered_endpoints = filter_endpoints(request, self._nodes_processor.synced_nodes(currency))
-        endpoints = random.sample(filtered_endpoints, 6) if len(filtered_endpoints) > 6 else filtered_endpoints
+        filtered_endpoints = filter_endpoints(
+            request, self._nodes_processor.synced_nodes(currency)
+        )
+        endpoints = (
+            random.sample(filtered_endpoints, 6)
+            if len(filtered_endpoints) > 6
+            else filtered_endpoints
+        )
         replies = []
 
         if len(endpoints) > 0:
             async with aiohttp.ClientSession() as session:
                 for endpoint in endpoints:
                     self._logger.debug("Trying to connect to : " + str(endpoint))
-                    reply = asyncio.ensure_future(request(next(endpoint.conn_handler(session,
-                                                                                proxy=self._user_parameters.proxy())),
-                                                          **req_args))
+                    reply = asyncio.ensure_future(
+                        request(
+                            next(
+                                endpoint.conn_handler(
+                                    session, proxy=self._user_parameters.proxy()
+                                )
+                            ),
+                            **req_args
+                        )
+                    )
                     replies.append(reply)
 
                 result = await asyncio.gather(*replies, return_exceptions=True)
diff --git a/src/sakia/data/connectors/node.py b/src/sakia/data/connectors/node.py
index e31a63c49a628820ce5fd1812bc1b9a7d76ddfea..bc33caccf19d23776b04a29c7f844fb807bba965 100644
--- a/src/sakia/data/connectors/node.py
+++ b/src/sakia/data/connectors/node.py
@@ -22,14 +22,16 @@ class NodeConnectorLoggerAdapter(logging.LoggerAdapter):
     This example adapter expects the passed in dict-like object to have a
     'connid' key, whose value in brackets is prepended to the log message.
     """
+
     def process(self, msg, kwargs):
-        return '[%s] %s' % (self.extra['pubkey'][:5], msg), kwargs
+        return "[%s] %s" % (self.extra["pubkey"][:5], msg), kwargs
 
 
 class NodeConnector(QObject):
     """
     A node is a peer send from the client point of view.
     """
+
     changed = pyqtSignal()
     success = pyqtSignal()
     failure = pyqtSignal(int)
@@ -44,14 +46,14 @@ class NodeConnector(QObject):
         super().__init__()
         self.node = node
         self.failure_count = 0
-        self._ws_tasks = {'block': None,
-                    'peer': None}
-        self._connected = {'block': False,
-                    'peer': False}
+        self._ws_tasks = {"block": None, "peer": None}
+        self._connected = {"block": False, "peer": False}
         self._user_parameters = user_parameters
         self.session = session
-        self._raw_logger = logging.getLogger('sakia')
-        self._logger = NodeConnectorLoggerAdapter(self._raw_logger, {'pubkey': self.node.pubkey})
+        self._raw_logger = logging.getLogger("sakia")
+        self._logger = NodeConnectorLoggerAdapter(
+            self._raw_logger, {"pubkey": self.node.pubkey}
+        )
 
     def __del__(self):
         for ws in self._ws_tasks.values():
@@ -73,17 +75,33 @@ class NodeConnector(QObject):
         http_scheme = "https" if secured else "http"
         ws_scheme = "ws" if secured else "wss"
         session = aiohttp.ClientSession()
-        peer_data = await bma.network.peering(ConnectionHandler(http_scheme, ws_scheme, address, port, "",
-                                                                proxy=user_parameters.proxy(), session=session))
+        peer_data = await bma.network.peering(
+            ConnectionHandler(
+                http_scheme,
+                ws_scheme,
+                address,
+                port,
+                "",
+                proxy=user_parameters.proxy(),
+                session=session,
+            )
+        )
 
-        peer = Peer.from_signed_raw("{0}{1}\n".format(peer_data['raw'],
-                                                      peer_data['signature']))
+        peer = Peer.from_signed_raw(
+            "{0}{1}\n".format(peer_data["raw"], peer_data["signature"])
+        )
 
         if currency and peer.currency != currency:
             raise InvalidNodeCurrency(currency, peer.currency)
 
-        node = Node(peer.currency, peer.pubkey, peer.endpoints, peer.blockUID, last_state_change=time.time())
-        logging.getLogger('sakia').debug("Node from address : {:}".format(str(node)))
+        node = Node(
+            peer.currency,
+            peer.pubkey,
+            peer.endpoints,
+            peer.blockUID,
+            last_state_change=time.time(),
+        )
+        logging.getLogger("sakia").debug("Node from address : {:}".format(str(node)))
 
         return cls(node, user_parameters, session=session)
 
@@ -100,9 +118,15 @@ class NodeConnector(QObject):
         if currency and peer.currency != currency:
             raise InvalidNodeCurrency(currency, peer.currency)
 
-        node = Node(peer.currency, peer.pubkey, peer.endpoints, peer.blockUID,
-                    current_buid=peer.blockUID, last_state_change=time.time())
-        logging.getLogger('sakia').debug("Node from peer : {:}".format(str(node)))
+        node = Node(
+            peer.currency,
+            peer.pubkey,
+            peer.endpoints,
+            peer.blockUID,
+            current_buid=peer.blockUID,
+            last_state_change=time.time(),
+        )
+        logging.getLogger("sakia").debug("Node from peer : {:}".format(str(node)))
 
         return cls(node, user_parameters, session=None)
 
@@ -116,7 +140,13 @@ class NodeConnector(QObject):
                 self._logger.debug("{0}".format(str(e)))
             else:
                 raise
-        except (ClientError, gaierror, TimeoutError, ConnectionRefusedError, ValueError) as e:
+        except (
+            ClientError,
+            gaierror,
+            TimeoutError,
+            ConnectionRefusedError,
+            ValueError,
+        ) as e:
             self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
             self.handle_failure()
         except jsonschema.ValidationError as e:
@@ -158,11 +188,13 @@ class NodeConnector(QObject):
         Refresh all data of this node
         :param bool manual: True if the refresh was manually initiated
         """
-        if not self._ws_tasks['block']:
-            self._ws_tasks['block'] = asyncio.ensure_future(self.connect_current_block())
+        if not self._ws_tasks["block"]:
+            self._ws_tasks["block"] = asyncio.ensure_future(
+                self.connect_current_block()
+            )
 
-        if not self._ws_tasks['peer']:
-            self._ws_tasks['peer'] = asyncio.ensure_future(self.connect_peers())
+        if not self._ws_tasks["peer"]:
+            self._ws_tasks["peer"] = asyncio.ensure_future(self.connect_peers())
 
         if manual:
             asyncio.ensure_future(self.request_peers())
@@ -173,30 +205,42 @@ class NodeConnector(QObject):
         If the connection fails, it tries the fallback mode on HTTP GET
         """
         for endpoint in [e for e in self.node.endpoints if isinstance(e, BMAEndpoint)]:
-            if not self._connected['block']:
+            if not self._connected["block"]:
                 try:
-                    conn_handler = next(endpoint.conn_handler(self.session, proxy=self._user_parameters.proxy()))
+                    conn_handler = next(
+                        endpoint.conn_handler(
+                            self.session, proxy=self._user_parameters.proxy()
+                        )
+                    )
                     ws_connection = bma.ws.block(conn_handler)
                     async with ws_connection as ws:
-                        self._connected['block'] = True
+                        self._connected["block"] = True
                         self._logger.debug("Connected successfully to block ws")
                         async for msg in ws:
                             if msg.type == aiohttp.WSMsgType.TEXT:
                                 self._logger.debug("Received a block")
-                                block_data = bma.parse_text(msg.data, bma.ws.WS_BLOCk_SCHEMA)
-                                self.block_found.emit(BlockUID(block_data['number'], block_data['hash']))
+                                block_data = bma.parse_text(
+                                    msg.data, bma.ws.WS_BLOCk_SCHEMA
+                                )
+                                self.block_found.emit(
+                                    BlockUID(block_data["number"], block_data["hash"])
+                                )
                             elif msg.type == aiohttp.WSMsgType.CLOSED:
                                 break
                             elif msg.type == aiohttp.WSMsgType.ERROR:
                                 break
                 except (aiohttp.WSServerHandshakeError, ValueError) as e:
-                    self._logger.debug("Websocket block {0} : {1}".format(type(e).__name__, str(e)))
+                    self._logger.debug(
+                        "Websocket block {0} : {1}".format(type(e).__name__, str(e))
+                    )
                     self.handle_failure()
                 except (ClientError, gaierror, TimeoutError) as e:
                     self._logger.debug("{0} : {1}".format(str(e), self.node.pubkey[:5]))
                     self.handle_failure()
                 except jsonschema.ValidationError as e:
-                    self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
+                    self._logger.debug(
+                        "{:}:{:}".format(str(e.__class__.__name__), str(e))
+                    )
                     self.handle_failure(weight=3)
                 except RuntimeError:
                     if self.session.closed:
@@ -209,8 +253,8 @@ class NodeConnector(QObject):
                     else:
                         raise
                 finally:
-                    self._connected['block'] = False
-                    self._ws_tasks['block'] = None
+                    self._connected["block"] = False
+                    self._ws_tasks["block"] = None
 
     async def connect_peers(self):
         """
@@ -218,32 +262,42 @@ class NodeConnector(QObject):
         If the connection fails, it tries the fallback mode on HTTP GET
         """
         for endpoint in [e for e in self.node.endpoints if isinstance(e, BMAEndpoint)]:
-            if not self._connected['peer']:
+            if not self._connected["peer"]:
                 try:
-                    conn_handler = next(endpoint.conn_handler(self.session,
-                                                         proxy=self._user_parameters.proxy()))
+                    conn_handler = next(
+                        endpoint.conn_handler(
+                            self.session, proxy=self._user_parameters.proxy()
+                        )
+                    )
                     ws_connection = bma.ws.peer(conn_handler)
                     async with ws_connection as ws:
-                        self._connected['peer'] = True
+                        self._connected["peer"] = True
                         self._logger.debug("Connected successfully to peer ws")
                         async for msg in ws:
                             if msg.type == aiohttp.WSMsgType.TEXT:
                                 self._logger.debug("Received a peer")
-                                peer_data = bma.parse_text(msg.data, bma.ws.WS_PEER_SCHEMA)
+                                peer_data = bma.parse_text(
+                                    msg.data, bma.ws.WS_PEER_SCHEMA
+                                )
                                 self.refresh_peer_data(peer_data)
                             elif msg.type == aiohttp.WSMsgType.CLOSED:
                                 break
                             elif msg.type == aiohttp.WSMsgType.ERROR:
                                 break
                 except (aiohttp.WSServerHandshakeError, ValueError) as e:
-                    self._logger.debug("Websocket peer {0} : {1}"
-                                       .format(type(e).__name__, str(e)))
+                    self._logger.debug(
+                        "Websocket peer {0} : {1}".format(type(e).__name__, str(e))
+                    )
                     await self.request_peers()
                 except (ClientError, gaierror, TimeoutError) as e:
-                    self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
+                    self._logger.debug(
+                        "{:}:{:}".format(str(e.__class__.__name__), str(e))
+                    )
                     self.handle_failure()
                 except jsonschema.ValidationError as e:
-                    self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
+                    self._logger.debug(
+                        "{:}:{:}".format(str(e.__class__.__name__), str(e))
+                    )
                     self.handle_failure(weight=3)
                 except RuntimeError:
                     if self.session.closed:
@@ -256,8 +310,8 @@ class NodeConnector(QObject):
                     else:
                         raise
                 finally:
-                    self._connected['peer'] = False
-                    self._ws_tasks['peer'] = None
+                    self._connected["peer"] = False
+                    self._ws_tasks["peer"] = None
 
     async def request_peers(self):
         """
@@ -265,40 +319,58 @@ class NodeConnector(QObject):
         """
         for endpoint in [e for e in self.node.endpoints if isinstance(e, BMAEndpoint)]:
             try:
-                peers_data = await self.safe_request(endpoint, bma.network.peers,
-                                                     req_args={'leaves': 'true'},
-                                                     proxy=self._user_parameters.proxy())
+                peers_data = await self.safe_request(
+                    endpoint,
+                    bma.network.peers,
+                    req_args={"leaves": "true"},
+                    proxy=self._user_parameters.proxy(),
+                )
                 if not peers_data:
                     continue
-                if peers_data['root'] != self.node.merkle_peers_root:
-                    leaves = [leaf for leaf in peers_data['leaves']
-                              if leaf not in self.node.merkle_peers_leaves]
+                if peers_data["root"] != self.node.merkle_peers_root:
+                    leaves = [
+                        leaf
+                        for leaf in peers_data["leaves"]
+                        if leaf not in self.node.merkle_peers_leaves
+                    ]
                     for leaf_hash in leaves:
                         try:
-                            leaf_data = await self.safe_request(endpoint,
-                                                                bma.network.peers,
-                                                                proxy=self._user_parameters.proxy(),
-                                                                req_args={'leaf': leaf_hash})
+                            leaf_data = await self.safe_request(
+                                endpoint,
+                                bma.network.peers,
+                                proxy=self._user_parameters.proxy(),
+                                req_args={"leaf": leaf_hash},
+                            )
                             if not leaf_data:
                                 break
-                            self.refresh_peer_data(leaf_data['leaf']['value'])
+                            self.refresh_peer_data(leaf_data["leaf"]["value"])
                         except (AttributeError, ValueError) as e:
                             if ("feed_appdata", "do_handshake") in str(e):
                                 self._logger.debug(str(e))
                             else:
-                                self._logger.debug("Incorrect peer data in {leaf} : {err}".format(leaf=leaf_hash, err=str(e)))
+                                self._logger.debug(
+                                    "Incorrect peer data in {leaf} : {err}".format(
+                                        leaf=leaf_hash, err=str(e)
+                                    )
+                                )
                                 self.handle_failure()
                         except errors.DuniterError as e:
                             if e.ucode == 2012:
                                 # Since with multinodes, peers or not the same on all nodes, sometimes this request results
                                 # in peer not found error
-                                self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
+                                self._logger.debug(
+                                    "{:}:{:}".format(str(e.__class__.__name__), str(e))
+                                )
                             else:
                                 self.handle_failure()
-                                self._logger.debug("Incorrect peer data in {leaf} : {err}".format(leaf=leaf_hash, err=str(e)))
+                                self._logger.debug(
+                                    "Incorrect peer data in {leaf} : {err}".format(
+                                        leaf=leaf_hash, err=str(e)
+                                    )
+                                )
                     else:
-                        self.node.merkle_peers_root = peers_data['root']
-                        self.node.merkle_peers_leaves = tuple(peers_data['leaves'])
+                        self.node.merkle_peers_root = peers_data["root"]
+                        self.node.merkle_peers_leaves = tuple(peers_data["leaves"])
                 return  # Break endpoints loop
             except errors.DuniterError as e:
                 self._logger.debug("Error in peers reply : {0}".format(str(e)))
@@ -313,8 +385,7 @@ class NodeConnector(QObject):
     def refresh_peer_data(self, peer_data):
         if "raw" in peer_data:
             try:
-                str_doc = "{0}{1}\n".format(peer_data['raw'],
-                                            peer_data['signature'])
+                str_doc = "{0}{1}\n".format(peer_data["raw"], peer_data["signature"])
                 peer_doc = Peer.from_signed_raw(str_doc)
                 self.neighbour_found.emit(peer_doc)
             except MalformedDocumentError as e:
@@ -328,12 +399,13 @@ class NodeConnector(QObject):
         """
         for endpoint in [e for e in self.node.endpoints if isinstance(e, BMAEndpoint)]:
             try:
-                heads_data = await self.safe_request(endpoint, bma.network.heads,
-                                                     proxy=self._user_parameters.proxy())
+                heads_data = await self.safe_request(
+                    endpoint, bma.network.heads, proxy=self._user_parameters.proxy()
+                )
                 if not heads_data:
                     continue
                 self.handle_success()
-                return heads_data # Break endpoints loop
+                return heads_data  # Break endpoints loop
             except errors.DuniterError as e:
                 self._logger.debug("Error in peers reply : {0}".format(str(e)))
                 self.handle_failure()
diff --git a/src/sakia/data/entities/connection.py b/src/sakia/data/entities/connection.py
index 3fd7d7e5cafffb22d11be8538d504f8543359677..c7d655f17cb2d65bfd3ca5fdaad649c9cc5c76f9 100644
--- a/src/sakia/data/entities/connection.py
+++ b/src/sakia/data/entities/connection.py
@@ -10,13 +10,16 @@ class Connection:
     It is defined by the currency name, and the key informations
     used to connect to it. If the user is using an identity, it is defined here too.
     """
+
     currency = attr.ib(convert=str)
     pubkey = attr.ib(convert=str)
     uid = attr.ib(convert=str, default="", cmp=False, hash=False)
     scrypt_N = attr.ib(convert=int, default=4096, cmp=False, hash=False)
     scrypt_r = attr.ib(convert=int, default=16, cmp=False, hash=False)
     scrypt_p = attr.ib(convert=int, default=1, cmp=False, hash=False)
-    blockstamp = attr.ib(convert=block_uid, default=BlockUID.empty(), cmp=False, hash=False)
+    blockstamp = attr.ib(
+        convert=block_uid, default=BlockUID.empty(), cmp=False, hash=False
+    )
     salt = attr.ib(convert=str, init=False, default="", cmp=False, hash=False)
     password = attr.ib(init=False, convert=str, default="", cmp=False, hash=False)
 
diff --git a/src/sakia/data/entities/contact.py b/src/sakia/data/entities/contact.py
index 989958fd99d3c45ae30abefe01954a95fbc3b0ca..06152ee16a7664c9aaff253b5ffddfe5d24a8d9b 100644
--- a/src/sakia/data/entities/contact.py
+++ b/src/sakia/data/entities/contact.py
@@ -8,6 +8,7 @@ class Contact:
     """
     A contact in the network currency
     """
+
     re_displayed_text = re.compile("([\w\s\d]+) < ((?![OIl])[1-9A-Za-z]{42,45}) >")
 
     currency = attr.ib(convert=str)
@@ -18,4 +19,3 @@ class Contact:
 
     def displayed_text(self):
         return self.name + " < " + self.pubkey + " > "
-
diff --git a/src/sakia/data/entities/identity.py b/src/sakia/data/entities/identity.py
index 64510ed076f5c61f6436fa1a47d8dd2232853fc3..e14bdb267fabc82d70c5f6c04e91ce4749320d46 100644
--- a/src/sakia/data/entities/identity.py
+++ b/src/sakia/data/entities/identity.py
@@ -15,10 +15,23 @@ class Identity:
     written = attr.ib(convert=bool, default=False, cmp=False, hash=False)
     revoked_on = attr.ib(convert=int, default=0, cmp=False, hash=False)
     outdistanced = attr.ib(convert=bool, default=True, cmp=False, hash=False)
-    member = attr.ib(validator=attr.validators.instance_of(bool), default=False, cmp=False, hash=False)
-    membership_buid = attr.ib(convert=block_uid, default=BlockUID.empty(), cmp=False, hash=False)
+    member = attr.ib(
+        validator=attr.validators.instance_of(bool),
+        default=False,
+        cmp=False,
+        hash=False,
+    )
+    membership_buid = attr.ib(
+        convert=block_uid, default=BlockUID.empty(), cmp=False, hash=False
+    )
     membership_timestamp = attr.ib(convert=int, default=0, cmp=False, hash=False)
-    membership_type = attr.ib(convert=str, default='', validator=lambda s, a, t: t in ('', 'IN', 'OUT'), cmp=False, hash=False)
+    membership_type = attr.ib(
+        convert=str,
+        default="",
+        validator=lambda s, a, t: t in ("", "IN", "OUT"),
+        cmp=False,
+        hash=False,
+    )
     membership_written_on = attr.ib(convert=int, default=0, cmp=False, hash=False)
     sentry = attr.ib(convert=bool, default=False, cmp=False, hash=False)
 
@@ -29,7 +42,9 @@ class Identity:
         :return: the document
         :rtype: duniterpy.documents.Identity
         """
-        return IdentityDoc(10, self.currency, self.pubkey, self.uid, self.blockstamp, self.signature)
+        return IdentityDoc(
+            10, self.currency, self.pubkey, self.uid, self.blockstamp, self.signature
+        )
 
     def is_obsolete(self, sig_window, current_time):
         expired = self.timestamp + sig_window <= current_time
diff --git a/src/sakia/data/entities/node.py b/src/sakia/data/entities/node.py
index dc9c91f17c6c2836c8573dfd1a4df034aa2989c1..779a9f0a1c2fa5adb1a3e3a2fb32432d02048e06 100644
--- a/src/sakia/data/entities/node.py
+++ b/src/sakia/data/entities/node.py
@@ -11,7 +11,7 @@ def _tuple_of_endpoints(value):
         return tuple(l)
     elif isinstance(value, str):
         if value:
-            list_of_str = value.split('\n')
+            list_of_str = value.split("\n")
             conv = []
             for s in list_of_str:
                 conv.append(endpoint(s))
@@ -31,7 +31,10 @@ class Node:
     - OFFLINE > 3: The node is disconnected
     - DESYNCED : The node is online but is desynced from the network
     """
-    MERKLE_EMPTY_ROOT = "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
+
+    MERKLE_EMPTY_ROOT = (
+        "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
+    )
 
     FAILURE_THRESHOLD = 3
 
@@ -61,14 +64,16 @@ class Node:
     # The version of the software in /node/summary
     version = attr.ib(convert=str, cmp=False, default="", hash=False)
     # Root of the merkle peers tree, default = sha256 of empty string
-    merkle_peers_root = attr.ib(convert=str, cmp=False,
-                                default=MERKLE_EMPTY_ROOT, hash=False)
+    merkle_peers_root = attr.ib(
+        convert=str, cmp=False, default=MERKLE_EMPTY_ROOT, hash=False
+    )
     # Leaves of the merkle peers tree
-    merkle_peers_leaves = attr.ib(convert=attrs_tuple_of_str, cmp=False, default=tuple(), hash=False)
+    merkle_peers_leaves = attr.ib(
+        convert=attrs_tuple_of_str, cmp=False, default=tuple(), hash=False
+    )
     # Define if this node is a root node in Sakia
     root = attr.ib(convert=bool, cmp=False, default=False, hash=False)
     # If this node is a member or not
     member = attr.ib(convert=bool, cmp=False, default=False, hash=False)
     # If this node is a member or not
     last_state_change = attr.ib(convert=int, cmp=False, default=False, hash=False)
-
diff --git a/src/sakia/data/entities/source.py b/src/sakia/data/entities/source.py
index be93c5a9cc272a79e38168414a9c7939e9d03811..4c06f0e0f4e8b4a50fb4886fc7347a81f3268c97 100644
--- a/src/sakia/data/entities/source.py
+++ b/src/sakia/data/entities/source.py
@@ -7,6 +7,6 @@ class Source:
     pubkey = attr.ib(convert=str)
     identifier = attr.ib(convert=str)
     noffset = attr.ib(convert=int)
-    type = attr.ib(convert=str, validator=lambda i, a, s: s == 'T' or s == 'D')
+    type = attr.ib(convert=str, validator=lambda i, a, s: s == "T" or s == "D")
     amount = attr.ib(convert=int, hash=False)
     base = attr.ib(convert=int, hash=False)
diff --git a/src/sakia/data/entities/transaction.py b/src/sakia/data/entities/transaction.py
index 9db652d8c62215f4160327473ce15b92ca177e92..ccffccc113e31a60548e5b207254f999cc7eb2bc 100644
--- a/src/sakia/data/entities/transaction.py
+++ b/src/sakia/data/entities/transaction.py
@@ -20,14 +20,17 @@ def parse_transaction_doc(tx_doc, pubkey, block_number, mediantime, txid):
     :param int txid: The latest txid
     :return: the found transaction
     """
-    receivers = [o.conditions.left.pubkey for o in tx_doc.outputs
-                 if o.conditions.left.pubkey != tx_doc.issuers[0]]
+    receivers = [
+        o.conditions.left.pubkey
+        for o in tx_doc.outputs
+        if o.conditions.left.pubkey != tx_doc.issuers[0]
+    ]
 
-    in_issuers = len([i for i in tx_doc.issuers
-                      if i == pubkey]) > 0
+    in_issuers = len([i for i in tx_doc.issuers if i == pubkey]) > 0
 
-    in_outputs = len([o for o in tx_doc.outputs
-                      if o.conditions.left.pubkey == pubkey]) > 0
+    in_outputs = (
+        len([o for o in tx_doc.outputs if o.conditions.left.pubkey == pubkey]) > 0
+    )
 
     if len(receivers) == 0 and in_issuers:
         receivers = [tx_doc.issuers[0]]
@@ -40,16 +43,14 @@ def parse_transaction_doc(tx_doc, pubkey, block_number, mediantime, txid):
     elif in_issuers or in_outputs:
         # If the wallet pubkey is in the issuers we sent this transaction
         if in_issuers:
-            outputs = [o for o in tx_doc.outputs
-                       if o.conditions.left.pubkey != pubkey]
+            outputs = [o for o in tx_doc.outputs if o.conditions.left.pubkey != pubkey]
             amount = 0
             for o in outputs:
                 amount += o.amount * math.pow(10, o.base)
         # If we are not in the issuers,
         # maybe we are in the recipients of this transaction
         else:
-            outputs = [o for o in tx_doc.outputs
-                       if o.conditions.left.pubkey == pubkey]
+            outputs = [o for o in tx_doc.outputs if o.conditions.left.pubkey == pubkey]
         amount = 0
         for o in outputs:
             amount += o.amount * math.pow(10, o.base)
@@ -57,21 +58,23 @@ def parse_transaction_doc(tx_doc, pubkey, block_number, mediantime, txid):
     else:
         return None
 
-    transaction = Transaction(currency=tx_doc.currency,
-                              pubkey=pubkey,
-                              sha_hash=tx_doc.sha_hash,
-                              written_block=block_number,
-                              blockstamp=tx_doc.blockstamp,
-                              timestamp=mediantime,
-                              signatures=tx_doc.signatures,
-                              issuers=tx_doc.issuers,
-                              receivers=receivers,
-                              amount=amount,
-                              amount_base=amount_base,
-                              comment=tx_doc.comment,
-                              txid=txid,
-                              state=Transaction.VALIDATED,
-                              raw=tx_doc.signed_raw())
+    transaction = Transaction(
+        currency=tx_doc.currency,
+        pubkey=pubkey,
+        sha_hash=tx_doc.sha_hash,
+        written_block=block_number,
+        blockstamp=tx_doc.blockstamp,
+        timestamp=mediantime,
+        signatures=tx_doc.signatures,
+        issuers=tx_doc.issuers,
+        receivers=receivers,
+        amount=amount,
+        amount_base=amount_base,
+        comment=tx_doc.comment,
+        txid=txid,
+        state=Transaction.VALIDATED,
+        raw=tx_doc.signed_raw(),
+    )
     return transaction
 
 
@@ -82,21 +85,23 @@ def build_stopline(currency, pubkey, block_number, mediantime):
     """
     Used to insert a line of ignored tx in the history
     """
-    transaction = Transaction(currency=currency,
-                              pubkey=pubkey,
-                              sha_hash=STOPLINE_HASH,
-                              written_block=block_number,
-                              blockstamp=BlockUID(block_number, BlockUID.empty().sha_hash),
-                              timestamp=mediantime,
-                              signatures="",
-                              issuers="",
-                              receivers="",
-                              amount=0,
-                              amount_base=0,
-                              comment="",
-                              txid=0,
-                              state=Transaction.VALIDATED,
-                              raw="")
+    transaction = Transaction(
+        currency=currency,
+        pubkey=pubkey,
+        sha_hash=STOPLINE_HASH,
+        written_block=block_number,
+        blockstamp=BlockUID(block_number, BlockUID.empty().sha_hash),
+        timestamp=mediantime,
+        signatures="",
+        issuers="",
+        receivers="",
+        amount=0,
+        amount_base=0,
+        comment="",
+        txid=0,
+        state=Transaction.VALIDATED,
+        raw="",
+    )
     return transaction
 
 
@@ -119,28 +124,29 @@ class Transaction:
     :param str txid: the transaction id to sort transctions
     :param int state: the state of the transaction
     """
+
     TO_SEND = 0
     AWAITING = 1
     VALIDATED = 4
     REFUSED = 8
     DROPPED = 16
 
-    currency      = attr.ib(convert=str, cmp=True, hash=True)
-    pubkey        = attr.ib(convert=str, cmp=True, hash=True)
-    sha_hash      = attr.ib(convert=str, cmp=True, hash=True)
+    currency = attr.ib(convert=str, cmp=True, hash=True)
+    pubkey = attr.ib(convert=str, cmp=True, hash=True)
+    sha_hash = attr.ib(convert=str, cmp=True, hash=True)
     written_block = attr.ib(convert=int, cmp=False)
-    blockstamp    = attr.ib(convert=block_uid, cmp=False)
-    timestamp     = attr.ib(convert=int, cmp=False)
-    signatures    = attr.ib(convert=attrs_tuple_of_str, cmp=False)
-    issuers       = attr.ib(convert=attrs_tuple_of_str, cmp=False)
-    receivers     = attr.ib(convert=attrs_tuple_of_str, cmp=False)
-    amount        = attr.ib(convert=int, cmp=False)
-    amount_base   = attr.ib(convert=int, cmp=False)
-    comment       = attr.ib(convert=str, cmp=False)
-    txid          = attr.ib(convert=int, cmp=False)
-    state         = attr.ib(convert=int, cmp=False)
-    local         = attr.ib(convert=bool, cmp=False, default=False)
-    raw           = attr.ib(convert=str, cmp=False, default="")
+    blockstamp = attr.ib(convert=block_uid, cmp=False)
+    timestamp = attr.ib(convert=int, cmp=False)
+    signatures = attr.ib(convert=attrs_tuple_of_str, cmp=False)
+    issuers = attr.ib(convert=attrs_tuple_of_str, cmp=False)
+    receivers = attr.ib(convert=attrs_tuple_of_str, cmp=False)
+    amount = attr.ib(convert=int, cmp=False)
+    amount_base = attr.ib(convert=int, cmp=False)
+    comment = attr.ib(convert=str, cmp=False)
+    txid = attr.ib(convert=int, cmp=False)
+    state = attr.ib(convert=int, cmp=False)
+    local = attr.ib(convert=bool, cmp=False, default=False)
+    raw = attr.ib(convert=str, cmp=False, default="")
 
     def txdoc(self):
         """
diff --git a/src/sakia/data/entities/user_parameters.py b/src/sakia/data/entities/user_parameters.py
index 9bd51205ad63604cef636833f7991f448f4ae52e..ee72a98643b4e27c355964bc5aa12e7a203c1f64 100644
--- a/src/sakia/data/entities/user_parameters.py
+++ b/src/sakia/data/entities/user_parameters.py
@@ -6,6 +6,7 @@ class UserParameters:
     """
     The user parameters entity
     """
+
     profile_name = attr.ib(convert=str, default="Default Profile")
     lang = attr.ib(convert=str, default="en")
     referential = attr.ib(convert=int, default=0)
@@ -24,9 +25,11 @@ class UserParameters:
     def proxy(self):
         if self.enable_proxy is True:
             if self.proxy_user and self.proxy_password:
-                return "http://{:}:{:}@{:}:{:}".format(self.proxy_user,
-                                                       self.proxy_password,
-                                                       self.proxy_address,
-                                                       self.proxy_port)
+                return "http://{:}:{:}@{:}:{:}".format(
+                    self.proxy_user,
+                    self.proxy_password,
+                    self.proxy_address,
+                    self.proxy_port,
+                )
             else:
                 return "http://{0}:{1}".format(self.proxy_address, self.proxy_port)
diff --git a/src/sakia/data/files/__init__.py b/src/sakia/data/files/__init__.py
index efff6b0c2807e6a94c9a0a300b5c3db9d3841ad1..3d649b8ab747cdde09bcf664135cfa960dc59772 100644
--- a/src/sakia/data/files/__init__.py
+++ b/src/sakia/data/files/__init__.py
@@ -1,3 +1,3 @@
 from .user_parameters import UserParametersFile
 from .app_data import AppDataFile
-from .plugins import PluginsDirectory, Plugin
\ No newline at end of file
+from .plugins import PluginsDirectory, Plugin
diff --git a/src/sakia/data/files/app_data.py b/src/sakia/data/files/app_data.py
index 921c8f24787488618833750a93e6972c5747a655..990123c42d74af0e36ae9d6a31f7d1c1e77c6a07 100644
--- a/src/sakia/data/files/app_data.py
+++ b/src/sakia/data/files/app_data.py
@@ -10,8 +10,9 @@ class AppDataFile:
     """
     The repository for AppData
     """
+
     _file = attr.ib()
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
     filename = "appdata.json"
 
     @classmethod
@@ -23,7 +24,7 @@ class AppDataFile:
         Commit a app_data to the database
         :param sakia.data.entities.AppData app_data: the app_data to commit
         """
-        with open(self._file, 'w') as outfile:
+        with open(self._file, "w") as outfile:
             json.dump(attr.asdict(app_data), outfile, indent=4)
 
     def load_or_init(self):
@@ -32,7 +33,7 @@ class AppDataFile:
         :param sakia.data.entities.AppData app_data: the app_data to update
         """
         try:
-            with open(self._file, 'r') as json_data:
+            with open(self._file, "r") as json_data:
                 app_data = AppData(**json.load(json_data))
         except OSError:
             app_data = AppData()
diff --git a/src/sakia/data/files/plugins.py b/src/sakia/data/files/plugins.py
index e4c914458f56ff4aa4e0aa20f4bf5ed219fa1057..d7cfbb83131616177ebe0ad9b4451a9eddbb595f 100644
--- a/src/sakia/data/files/plugins.py
+++ b/src/sakia/data/files/plugins.py
@@ -12,10 +12,11 @@ class PluginsDirectory:
     """
     The repository for UserParameters
     """
+
     _path = attr.ib()
     plugins = attr.ib(default=[])
     with_plugin = attr.ib(default=None)
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def in_config_path(cls, config_path, profile_name="Default Profile"):
@@ -35,29 +36,38 @@ class PluginsDirectory:
                     module_name = os.path.splitext(os.path.basename(file))[0]
                     try:
                         plugin_module = importlib.import_module(module_name)
-                        self.plugins.append(Plugin(plugin_module.PLUGIN_NAME,
-                                                   plugin_module.PLUGIN_DESCRIPTION,
-                                                   plugin_module.PLUGIN_VERSION,
-                                                   True,
-                                                   plugin_module,
-                                                   file))
+                        self.plugins.append(
+                            Plugin(
+                                plugin_module.PLUGIN_NAME,
+                                plugin_module.PLUGIN_DESCRIPTION,
+                                plugin_module.PLUGIN_VERSION,
+                                True,
+                                plugin_module,
+                                file,
+                            )
+                        )
                     except ImportError as e:
-                        self.plugins.append(Plugin(module_name, "", "",
-                                                   False, None, file))
+                        self.plugins.append(
+                            Plugin(module_name, "", "", False, None, file)
+                        )
                         self._logger.debug(str(e) + " with sys.path " + str(sys.path))
             if with_plugin:
                 sys.path.append(with_plugin)
                 module_name = os.path.splitext(os.path.basename(with_plugin))[0]
                 try:
                     plugin_module = importlib.import_module(module_name)
-                    self.with_plugin = Plugin(plugin_module.PLUGIN_NAME,
-                                              plugin_module.PLUGIN_DESCRIPTION,
-                                              plugin_module.PLUGIN_VERSION,
-                                              True,
-                                              plugin_module,
-                                              with_plugin)
+                    self.with_plugin = Plugin(
+                        plugin_module.PLUGIN_NAME,
+                        plugin_module.PLUGIN_DESCRIPTION,
+                        plugin_module.PLUGIN_VERSION,
+                        True,
+                        plugin_module,
+                        with_plugin,
+                    )
                 except ImportError as e:
-                    self.with_plugin = Plugin(module_name, "", "", False, None, with_plugin)
+                    self.with_plugin = Plugin(
+                        module_name, "", "", False, None, with_plugin
+                    )
                     self._logger.debug(str(e) + " with sys.path " + str(sys.path))
         except OSError as e:
             self._logger.debug(str(e))
diff --git a/src/sakia/data/files/user_parameters.py b/src/sakia/data/files/user_parameters.py
index 981d7888bdbebebc8376cfd8379aa4d50d679857..e7fab21530b9999a39312b9973d7d49bc50f39e9 100644
--- a/src/sakia/data/files/user_parameters.py
+++ b/src/sakia/data/files/user_parameters.py
@@ -10,8 +10,9 @@ class UserParametersFile:
     """
     The repository for UserParameters
     """
+
     _file = attr.ib()
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
     filename = "parameters.json"
 
     @classmethod
@@ -27,7 +28,7 @@ class UserParametersFile:
         """
         if not os.path.exists(os.path.abspath(os.path.join(self._file, os.pardir))):
             os.makedirs(os.path.abspath(os.path.join(self._file, os.pardir)))
-        with open(self._file, 'w') as outfile:
+        with open(self._file, "w") as outfile:
             json.dump(attr.asdict(user_parameters), outfile, indent=4)
         return user_parameters
 
@@ -37,7 +38,7 @@ class UserParametersFile:
         :param sakia.data.entities.UserParameters user_parameters: the user_parameters to update
         """
         try:
-            with open(self._file, 'r') as json_data:
+            with open(self._file, "r") as json_data:
                 user_parameters = UserParameters(**json.load(json_data))
                 user_parameters.profile_name = profile_name
         except (OSError, json.decoder.JSONDecodeError):
diff --git a/src/sakia/data/graphs/__init__.py b/src/sakia/data/graphs/__init__.py
index ed8f7ac56cb500a3e4a7cc3dd2ecfdd1d2388629..bc0db35f0e75dda1c2f3e5af17d257cf1bc83464 100644
--- a/src/sakia/data/graphs/__init__.py
+++ b/src/sakia/data/graphs/__init__.py
@@ -1,2 +1,2 @@
 from .base_graph import BaseGraph
-from .wot_graph import WoTGraph
\ No newline at end of file
+from .wot_graph import WoTGraph
diff --git a/src/sakia/data/graphs/base_graph.py b/src/sakia/data/graphs/base_graph.py
index a7c4b3c4e0e4753c59228fd97c8f66b9a9697a79..77b86bad26960364c1ceae2c03e037f36c381485 100644
--- a/src/sakia/data/graphs/base_graph.py
+++ b/src/sakia/data/graphs/base_graph.py
@@ -74,7 +74,9 @@ class BaseGraph(QObject):
         :rtype: str
         """
         if block_number >= 0:
-            current_confirmations = min(max(self.blockchain_service.current_buid().number - block_number, 0), 6)
+            current_confirmations = min(
+                max(self.blockchain_service.current_buid().number - block_number, 0), 6
+            )
         else:
             current_confirmations = 0
 
@@ -83,32 +85,35 @@ class BaseGraph(QObject):
                 return "{0}/{1}".format(current_confirmations, MAX_CONFIRMATIONS)
             else:
                 confirmation = current_confirmations / MAX_CONFIRMATIONS * 100
-                return "{0} %".format(QLocale().toString(float(confirmation), 'f', 0))
+                return "{0} %".format(QLocale().toString(float(confirmation), "f", 0))
         return None
 
     def add_certifier_node(self, certifier, identity, certification, node_status):
         sentry_symbol, sentry_text = sentry_display(certifier)
         name_text = certifier.uid if certifier.uid else certifier.pubkey[:12]
         metadata = {
-            'text': sentry_symbol + name_text,
-            'tooltip': sentry_text + certifier.pubkey,
-            'identity': certifier,
-            'status': node_status
+            "text": sentry_symbol + name_text,
+            "tooltip": sentry_text + certifier.pubkey,
+            "identity": certifier,
+            "status": node_status,
         }
         self.nx_graph.add_node(certifier.pubkey, attr_dict=metadata)
 
         arc_status = self.arc_status(certification.timestamp)
         sig_validity = self.blockchain_service.parameters().sig_validity
-        expiration = self.blockchain_service.adjusted_ts(certification.timestamp + sig_validity)
+        expiration = self.blockchain_service.adjusted_ts(
+            certification.timestamp + sig_validity
+        )
         arc = {
-            'status': arc_status,
-            'tooltip': QLocale.toString(
+            "status": arc_status,
+            "tooltip": QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(expiration).date(),
-                QLocale.dateFormat(QLocale(), QLocale.ShortFormat)
-            ) + " BAT",
-            'cert_time': certification.timestamp,
-            'confirmation_text': self.confirmation_text(certification.written_on)
+                QLocale.dateFormat(QLocale(), QLocale.ShortFormat),
+            )
+            + " BAT",
+            "cert_time": certification.timestamp,
+            "confirmation_text": self.confirmation_text(certification.written_on),
         }
         self.nx_graph.add_edge(certifier.pubkey, identity.pubkey, attr_dict=arc)
 
@@ -116,25 +121,28 @@ class BaseGraph(QObject):
         sentry_symbol, sentry_text = sentry_display(certified)
         name_text = certified.uid if certified.uid else certified.pubkey[:12]
         metadata = {
-            'text': sentry_symbol + name_text,
-            'tooltip': sentry_text + certified.pubkey,
-            'identity': certified,
-            'status': node_status
+            "text": sentry_symbol + name_text,
+            "tooltip": sentry_text + certified.pubkey,
+            "identity": certified,
+            "status": node_status,
         }
         self.nx_graph.add_node(certified.pubkey, attr_dict=metadata)
 
         arc_status = self.arc_status(certification.timestamp)
         sig_validity = self.blockchain_service.parameters().sig_validity
-        expiration = self.blockchain_service.adjusted_ts(certification.timestamp + sig_validity)
+        expiration = self.blockchain_service.adjusted_ts(
+            certification.timestamp + sig_validity
+        )
         arc = {
-            'status': arc_status,
-            'tooltip': QLocale.toString(
+            "status": arc_status,
+            "tooltip": QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(expiration).date(),
-                QLocale.dateFormat(QLocale(), QLocale.ShortFormat)
-            ) + " BAT",
-            'cert_time': certification.timestamp,
-            'confirmation_text': self.confirmation_text(certification.written_on)
+                QLocale.dateFormat(QLocale(), QLocale.ShortFormat),
+            )
+            + " BAT",
+            "cert_time": certification.timestamp,
+            "confirmation_text": self.confirmation_text(certification.written_on),
         }
 
         self.nx_graph.add_edge(identity.pubkey, certified.pubkey, attr_dict=arc)
@@ -149,7 +157,9 @@ class BaseGraph(QObject):
         try:
             #  add certifiers of uid
             for certification in certifier_list:
-                certifier = self.identities_service.get_identity(certification.certifier)
+                certifier = self.identities_service.get_identity(
+                    certification.certifier
+                )
                 if not certifier:
                     certifier = certifier_list[certification]
                 node_status = self.node_status(certifier)
@@ -167,7 +177,9 @@ class BaseGraph(QObject):
         try:
             # add certified by uid
             for certification in tuple(certified_list):
-                certified = self.identities_service.get_identity(certification.certified)
+                certified = self.identities_service.get_identity(
+                    certification.certified
+                )
                 if not certified:
                     certified = certified_list[certification]
                 node_status = self.node_status(certified)
@@ -187,9 +199,9 @@ class BaseGraph(QObject):
         sentry_symbol, sentry_text = sentry_display(identity)
         name_text = identity.uid
         metadata = {
-            'text': sentry_symbol + name_text,
-            'tooltip': sentry_text + identity.pubkey,
-            'status': status,
-            'identity': identity
+            "text": sentry_symbol + name_text,
+            "tooltip": sentry_text + identity.pubkey,
+            "status": status,
+            "identity": identity,
         }
         self.nx_graph.add_node(identity.pubkey, attr_dict=metadata)
diff --git a/src/sakia/data/graphs/wot_graph.py b/src/sakia/data/graphs/wot_graph.py
index 6d18e4b42bacd685ec19453b4f2b8b7a19ca7370..88f0cd3f6c9cd49976f66c076300a465e54e8fee 100644
--- a/src/sakia/data/graphs/wot_graph.py
+++ b/src/sakia/data/graphs/wot_graph.py
@@ -26,11 +26,16 @@ class WoTGraph(BaseGraph):
         certifier_coro = self.identities_service.load_certifiers_of(center_identity)
         certified_coro = self.identities_service.load_certified_by(center_identity)
 
-        certifier_list, certified_list = await asyncio.gather(*[certifier_coro, certified_coro])
+        certifier_list, certified_list = await asyncio.gather(
+            *[certifier_coro, certified_coro]
+        )
 
-        certifier_list, certified_list = await self.identities_service.load_certs_in_lookup(center_identity,
-                                                                                            certifier_list,
-                                                                                            certified_list)
+        (
+            certifier_list,
+            certified_list,
+        ) = await self.identities_service.load_certs_in_lookup(
+            center_identity, certifier_list, certified_list
+        )
 
         # populate graph with certifiers-of
         self.add_certifier_list(certifier_list, center_identity)
@@ -43,10 +48,18 @@ class WoTGraph(BaseGraph):
         self.add_identity(center_identity, node_status)
 
         # populate graph with certifiers-of
-        certifier_list = self.identities_service.certifications_received(center_identity.pubkey)
-        certifier_list = {c: self.identities_service.get_identity(c.certifier) for c in certifier_list}
+        certifier_list = self.identities_service.certifications_received(
+            center_identity.pubkey
+        )
+        certifier_list = {
+            c: self.identities_service.get_identity(c.certifier) for c in certifier_list
+        }
         self.add_certifier_list(certifier_list, center_identity)
         # populate graph with certified-by
-        certified_list = self.identities_service.certifications_sent(center_identity.pubkey)
-        certified_list = {c: self.identities_service.get_identity(c.certified) for c in certified_list}
+        certified_list = self.identities_service.certifications_sent(
+            center_identity.pubkey
+        )
+        certified_list = {
+            c: self.identities_service.get_identity(c.certified) for c in certified_list
+        }
         self.add_certified_list(certified_list, center_identity)
diff --git a/src/sakia/data/processors/__init__.py b/src/sakia/data/processors/__init__.py
index 61e6f4ff9498767d88f676aaac20fd8034cbf74b..f60f7b88cdd99c03cf54a5872b4feeab74835d0b 100644
--- a/src/sakia/data/processors/__init__.py
+++ b/src/sakia/data/processors/__init__.py
@@ -7,5 +7,3 @@ from .sources import SourcesProcessor
 from .transactions import TransactionsProcessor
 from .dividends import DividendsProcessor
 from .contacts import ContactsProcessor
-
-
diff --git a/src/sakia/data/processors/blockchain.py b/src/sakia/data/processors/blockchain.py
index e6823cb71ecf717cfcbb48af1cda4e9803920891..42ec51d559bd6fa2b895463f446ca9b6e5e4aa72 100644
--- a/src/sakia/data/processors/blockchain.py
+++ b/src/sakia/data/processors/blockchain.py
@@ -14,7 +14,7 @@ import asyncio
 class BlockchainProcessor:
     _repo = attr.ib()  # :type sakia.data.repositories.BlockchainsRepo
     _bma_connector = attr.ib()  # :type sakia.data.connectors.bma.BmaConnector
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
@@ -23,8 +23,10 @@ class BlockchainProcessor:
         :param sakia.app.Application app: the app
         :rtype: sakia.data.processors.BlockchainProcessor
         """
-        return cls(app.db.blockchains_repo,
-                   BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters))
+        return cls(
+            app.db.blockchains_repo,
+            BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters),
+        )
 
     def initialized(self, currency):
         return self._repo.get_one(currency=currency) is not None
@@ -40,10 +42,12 @@ class BlockchainProcessor:
         try:
             if not udblocks:
                 udblocks = await self._bma_connector.get(currency, bma.blockchain.ud)
-            udblocks = udblocks['result']['blocks']
+            udblocks = udblocks["result"]["blocks"]
             ud_block_number = next(b for b in udblocks if b <= block_number)
-            block = await self._bma_connector.get(currency, bma.blockchain.block, {'number': ud_block_number})
-            return block['dividend'], block['unitbase']
+            block = await self._bma_connector.get(
+                currency, bma.blockchain.block, {"number": ud_block_number}
+            )
+            return block["dividend"], block["unitbase"]
         except StopIteration:
             self._logger.debug("No dividend generated before {0}".format(block_number))
         except NoPeerAvailable as e:
@@ -57,13 +61,15 @@ class BlockchainProcessor:
 
     def adjusted_ts(self, currency, timestamp):
         parameters = self.parameters(currency)
-        return timestamp + parameters.median_time_blocks/2 * parameters.avg_gen_time
+        return timestamp + parameters.median_time_blocks / 2 * parameters.avg_gen_time
 
     async def timestamp(self, currency, block_number):
         try:
-            block = await self._bma_connector.get(currency, bma.blockchain.block, {'number': block_number})
+            block = await self._bma_connector.get(
+                currency, bma.blockchain.block, {"number": block_number}
+            )
             if block:
-                return block['medianTime']
+                return block["medianTime"]
         except NoPeerAvailable as e:
             self._logger.debug(str(e))
         except errors.DuniterError as e:
@@ -88,7 +94,9 @@ class BlockchainProcessor:
         :param currency:
         :return:
         """
-        avg_blocks_per_month = int(30 * 24 * 3600 / self.parameters(currency).avg_gen_time)
+        avg_blocks_per_month = int(
+            30 * 24 * 3600 / self.parameters(currency).avg_gen_time
+        )
         return blockstamp.number - avg_blocks_per_month
 
     def current_buid(self, currency):
@@ -197,9 +205,13 @@ class BlockchainProcessor:
         :param int number:
         :rtype: duniterpy.documents.Block
         """
-        block = await self._bma_connector.get(currency, bma.blockchain.block, req_args={'number': number})
+        block = await self._bma_connector.get(
+            currency, bma.blockchain.block, req_args={"number": number}
+        )
         if block:
-            block_doc = Block.from_signed_raw("{0}{1}\n".format(block['raw'], block['signature']))
+            block_doc = Block.from_signed_raw(
+                "{0}{1}\n".format(block["raw"], block["signature"])
+            )
             return block_doc
 
     async def new_blocks_with_identities(self, currency):
@@ -209,11 +221,13 @@ class BlockchainProcessor:
         """
         with_identities = []
         future_requests = []
-        for req in (bma.blockchain.joiners,
-                    bma.blockchain.leavers,
-                    bma.blockchain.actives,
-                    bma.blockchain.excluded,
-                    bma.blockchain.newcomers):
+        for req in (
+            bma.blockchain.joiners,
+            bma.blockchain.leavers,
+            bma.blockchain.actives,
+            bma.blockchain.excluded,
+            bma.blockchain.newcomers,
+        ):
             future_requests.append(self._bma_connector.get(currency, req))
         results = await asyncio.gather(*future_requests)
 
@@ -249,40 +263,48 @@ class BlockchainProcessor:
             blockchain = Blockchain(currency=currency)
             self._logger.debug("Requesting blockchain parameters")
             try:
-                parameters = await self._bma_connector.get(currency, bma.blockchain.parameters)
-                blockchain.parameters.ms_validity = parameters['msValidity']
-                blockchain.parameters.avg_gen_time = parameters['avgGenTime']
-                blockchain.parameters.c = parameters['c']
-                blockchain.parameters.dt = parameters['dt']
-                blockchain.parameters.dt_diff_eval = parameters['dtDiffEval']
-                blockchain.parameters.median_time_blocks = parameters['medianTimeBlocks']
-                blockchain.parameters.percent_rot = parameters['percentRot']
-                blockchain.parameters.idty_window = parameters['idtyWindow']
-                blockchain.parameters.ms_window = parameters['msWindow']
-                blockchain.parameters.sig_window = parameters['sigWindow']
-                blockchain.parameters.sig_period = parameters['sigPeriod']
-                blockchain.parameters.sig_qty = parameters['sigQty']
-                blockchain.parameters.sig_stock = parameters['sigStock']
-                blockchain.parameters.sig_validity = parameters['sigValidity']
-                blockchain.parameters.sig_qty = parameters['sigQty']
-                blockchain.parameters.sig_period = parameters['sigPeriod']
-                blockchain.parameters.ud0 = parameters['ud0']
-                blockchain.parameters.ud_time_0 = parameters['udTime0']
-                blockchain.parameters.dt_reeval = parameters['dtReeval']
-                blockchain.parameters.ud_reeval_time_0 = parameters['udReevalTime0']
-                blockchain.parameters.xpercent = parameters['xpercent']
+                parameters = await self._bma_connector.get(
+                    currency, bma.blockchain.parameters
+                )
+                blockchain.parameters.ms_validity = parameters["msValidity"]
+                blockchain.parameters.avg_gen_time = parameters["avgGenTime"]
+                blockchain.parameters.c = parameters["c"]
+                blockchain.parameters.dt = parameters["dt"]
+                blockchain.parameters.dt_diff_eval = parameters["dtDiffEval"]
+                blockchain.parameters.median_time_blocks = parameters[
+                    "medianTimeBlocks"
+                ]
+                blockchain.parameters.percent_rot = parameters["percentRot"]
+                blockchain.parameters.idty_window = parameters["idtyWindow"]
+                blockchain.parameters.ms_window = parameters["msWindow"]
+                blockchain.parameters.sig_window = parameters["sigWindow"]
+                blockchain.parameters.sig_period = parameters["sigPeriod"]
+                blockchain.parameters.sig_qty = parameters["sigQty"]
+                blockchain.parameters.sig_stock = parameters["sigStock"]
+                blockchain.parameters.sig_validity = parameters["sigValidity"]
+                blockchain.parameters.sig_qty = parameters["sigQty"]
+                blockchain.parameters.sig_period = parameters["sigPeriod"]
+                blockchain.parameters.ud0 = parameters["ud0"]
+                blockchain.parameters.ud_time_0 = parameters["udTime0"]
+                blockchain.parameters.dt_reeval = parameters["dtReeval"]
+                blockchain.parameters.ud_reeval_time_0 = parameters["udReevalTime0"]
+                blockchain.parameters.xpercent = parameters["xpercent"]
             except errors.DuniterError as e:
                 raise
 
         self._logger.debug("Requesting current block")
         try:
-            current_block = await self._bma_connector.get(currency, bma.blockchain.current)
-            signed_raw = "{0}{1}\n".format(current_block['raw'], current_block['signature'])
+            current_block = await self._bma_connector.get(
+                currency, bma.blockchain.current
+            )
+            signed_raw = "{0}{1}\n".format(
+                current_block["raw"], current_block["signature"]
+            )
             block = Block.from_signed_raw(signed_raw)
             blockchain.current_buid = block.blockUID
             blockchain.median_time = block.mediantime
             blockchain.current_members_count = block.members_count
-            blockchain.current_mass = current_block['monetaryMass']
+            blockchain.current_mass = current_block["monetaryMass"]
         except errors.DuniterError as e:
             if e.ucode != errors.NO_CURRENT_BLOCK:
                 raise
@@ -296,54 +318,73 @@ class BlockchainProcessor:
     async def refresh_dividend_data(self, currency, blockchain):
         self._logger.debug("Requesting blocks with dividend")
         with_ud = await self._bma_connector.get(currency, bma.blockchain.ud)
-        blocks_with_ud = with_ud['result']['blocks']
+        blocks_with_ud = with_ud["result"]["blocks"]
 
         if len(blocks_with_ud) > 0:
             self._logger.debug("Requesting last block with dividend")
             try:
-                nb_previous_reevaluations = int((blockchain.median_time - blockchain.parameters.ud_reeval_time_0)
-                                                / blockchain.parameters.dt_reeval)
-
-                last_reeval_offset = (blockchain.median_time -
-                                      (blockchain.parameters.ud_reeval_time_0 +
-                                       nb_previous_reevaluations * blockchain.parameters.dt_reeval)
-                                      )
-
-                dt_reeval_block_target = max(blockchain.current_buid.number - int(last_reeval_offset
-                                                                                  / blockchain.parameters.avg_gen_time),
-                                             0)
+                nb_previous_reevaluations = int(
+                    (blockchain.median_time - blockchain.parameters.ud_reeval_time_0)
+                    / blockchain.parameters.dt_reeval
+                )
+
+                last_reeval_offset = blockchain.median_time - (
+                    blockchain.parameters.ud_reeval_time_0
+                    + nb_previous_reevaluations * blockchain.parameters.dt_reeval
+                )
+
+                dt_reeval_block_target = max(
+                    blockchain.current_buid.number
+                    - int(last_reeval_offset / blockchain.parameters.avg_gen_time),
+                    0,
+                )
                 try:
-                    last_ud_reeval_block_number = [b for b in blocks_with_ud if b <= dt_reeval_block_target][-1]
+                    last_ud_reeval_block_number = [
+                        b for b in blocks_with_ud if b <= dt_reeval_block_target
+                    ][-1]
                 except IndexError:
                     last_ud_reeval_block_number = 0
 
                 if last_ud_reeval_block_number:
-                    block_with_ud = await self._bma_connector.get(currency, bma.blockchain.block,
-                                                                  req_args={'number': last_ud_reeval_block_number})
+                    block_with_ud = await self._bma_connector.get(
+                        currency,
+                        bma.blockchain.block,
+                        req_args={"number": last_ud_reeval_block_number},
+                    )
                     if block_with_ud:
-                        blockchain.last_members_count = block_with_ud['membersCount']
-                        blockchain.last_ud = block_with_ud['dividend']
-                        blockchain.last_ud_base = block_with_ud['unitbase']
-                        blockchain.last_ud_time = block_with_ud['medianTime']
-                        blockchain.last_mass = block_with_ud['monetaryMass']
+                        blockchain.last_members_count = block_with_ud["membersCount"]
+                        blockchain.last_ud = block_with_ud["dividend"]
+                        blockchain.last_ud_base = block_with_ud["unitbase"]
+                        blockchain.last_ud_time = block_with_ud["medianTime"]
+                        blockchain.last_mass = block_with_ud["monetaryMass"]
 
                     self._logger.debug("Requesting previous block with dividend")
-                    dt_reeval_block_target = max(dt_reeval_block_target - int(blockchain.parameters.dt_reeval
-                                                                              / blockchain.parameters.avg_gen_time),
-                                                 0)
+                    dt_reeval_block_target = max(
+                        dt_reeval_block_target
+                        - int(
+                            blockchain.parameters.dt_reeval
+                            / blockchain.parameters.avg_gen_time
+                        ),
+                        0,
+                    )
 
                     try:
-                        previous_ud_reeval_block_number = [b for b in blocks_with_ud if b <= dt_reeval_block_target][-1]
+                        previous_ud_reeval_block_number = [
+                            b for b in blocks_with_ud if b <= dt_reeval_block_target
+                        ][-1]
                     except IndexError:
                         previous_ud_reeval_block_number = min(blocks_with_ud)
 
-                    block_with_ud = await self._bma_connector.get(currency, bma.blockchain.block,
-                                                                  req_args={'number': previous_ud_reeval_block_number})
-                    blockchain.previous_mass = block_with_ud['monetaryMass']
-                    blockchain.previous_members_count = block_with_ud['membersCount']
-                    blockchain.previous_ud = block_with_ud['dividend']
-                    blockchain.previous_ud_base = block_with_ud['unitbase']
-                    blockchain.previous_ud_time = block_with_ud['medianTime']
+                    block_with_ud = await self._bma_connector.get(
+                        currency,
+                        bma.blockchain.block,
+                        req_args={"number": previous_ud_reeval_block_number},
+                    )
+                    blockchain.previous_mass = block_with_ud["monetaryMass"]
+                    blockchain.previous_members_count = block_with_ud["membersCount"]
+                    blockchain.previous_ud = block_with_ud["dividend"]
+                    blockchain.previous_ud_base = block_with_ud["unitbase"]
+                    blockchain.previous_ud_time = block_with_ud["medianTime"]
             except errors.DuniterError as e:
                 if e.ucode != errors.NO_CURRENT_BLOCK:
                     raise
@@ -357,16 +398,24 @@ class BlockchainProcessor:
 
         self._logger.debug("Requesting current block")
         try:
-            current_block = await self._bma_connector.get(currency, bma.blockchain.block,
-                                                                  req_args={'number': network_blockstamp.number})
-            signed_raw = "{0}{1}\n".format(current_block['raw'], current_block['signature'])
+            current_block = await self._bma_connector.get(
+                currency,
+                bma.blockchain.block,
+                req_args={"number": network_blockstamp.number},
+            )
+            signed_raw = "{0}{1}\n".format(
+                current_block["raw"], current_block["signature"]
+            )
             block = Block.from_signed_raw(signed_raw)
             blockchain = self._repo.get_one(currency=currency)
             blockchain.current_buid = block.blockUID
             blockchain.median_time = block.mediantime
             blockchain.current_members_count = block.members_count
 
-            if blockchain.last_ud_time + blockchain.parameters.dt <= blockchain.median_time:
+            if (
+                blockchain.last_ud_time + blockchain.parameters.dt
+                <= blockchain.median_time
+            ):
                 await self.refresh_dividend_data(currency, blockchain)
 
             self._repo.update(blockchain)
@@ -375,7 +424,5 @@ class BlockchainProcessor:
             if e.ucode != errors.NO_CURRENT_BLOCK:
                 raise
 
-
     def remove_blockchain(self, currency):
         self._repo.drop(self._repo.get_one(currency=currency))
-
diff --git a/src/sakia/data/processors/certifications.py b/src/sakia/data/processors/certifications.py
index 0c956ae3f2b4c8bd27239b355349a7bd2d30009b..e274eb0c15c701187e0031523a7b84263747b48e 100644
--- a/src/sakia/data/processors/certifications.py
+++ b/src/sakia/data/processors/certifications.py
@@ -15,7 +15,7 @@ class CertificationsProcessor:
     _certifications_repo = attr.ib()  # :type sakia.data.repositories.CertificationsRepo
     _identities_repo = attr.ib()  # :type sakia.data.repositories.IdentitiesRepo
     _bma_connector = attr.ib()  # :type sakia.data.connectors.bma.BmaConnector
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
@@ -23,8 +23,11 @@ class CertificationsProcessor:
         Instanciate a blockchain processor
         :param sakia.app.Application app: the app
         """
-        return cls(app.db.certifications_repo, app.db.identities_repo,
-                   BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters))
+        return cls(
+            app.db.certifications_repo,
+            app.db.identities_repo,
+            BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters),
+        )
 
     def drop_expired(self, identity, current_ts, sig_validity, sig_window):
         """
@@ -32,11 +35,13 @@ class CertificationsProcessor:
         :param sakia.data.Identity identity:
         :rtype: List[sakia.data.entities.Certification]
         """
-        expired = self._certifications_repo.expired(currency=identity.currency,
-                                                    pubkey=identity.pubkey,
-                                                    current_ts=current_ts,
-                                                    sig_validity=sig_validity,
-                                                    sig_window=sig_window)
+        expired = self._certifications_repo.expired(
+            currency=identity.currency,
+            pubkey=identity.pubkey,
+            current_ts=current_ts,
+            sig_validity=sig_validity,
+            sig_window=sig_window,
+        )
         for cert in expired:
             self._certifications_repo.drop(cert)
         return expired
@@ -69,7 +74,9 @@ class CertificationsProcessor:
         :return: the remaining time
         :rtype: int
         """
-        certified = self._certifications_repo.get_latest_sent(currency=currency, pubkey=pubkey)
+        certified = self._certifications_repo.get_latest_sent(
+            currency=currency, pubkey=pubkey
+        )
         if certified and blockchain_time - certified.timestamp < parameters.sig_period:
             return parameters.sig_period - (blockchain_time - certified.timestamp)
         return 0
@@ -83,13 +90,15 @@ class CertificationsProcessor:
         :return: the instanciated certification
         :rtype: sakia.data.entities.Certification
         """
-        cert = Certification(currency=currency,
-                             certifier=cert.pubkey_from,
-                             certified=cert.pubkey_to,
-                             block=cert.timestamp.number,
-                             timestamp=timestamp,
-                             signature=cert.signatures[0],
-                             written_on=blockstamp.number if blockstamp else -1)
+        cert = Certification(
+            currency=currency,
+            certifier=cert.pubkey_from,
+            certified=cert.pubkey_to,
+            block=cert.timestamp.number,
+            timestamp=timestamp,
+            signature=cert.signatures[0],
+            written_on=blockstamp.number if blockstamp else -1,
+        )
         try:
             self._certifications_repo.insert(cert)
         except sqlite3.IntegrityError:
@@ -114,12 +123,16 @@ class CertificationsProcessor:
         :param List[str] connections_pubkeys: pubkeys of existing connections
         :return:
         """
-        certifiers = self._certifications_repo.get_all(currency=connection.currency, certifier=connection.pubkey)
+        certifiers = self._certifications_repo.get_all(
+            currency=connection.currency, certifier=connection.pubkey
+        )
         for c in certifiers:
             if c.certified not in connections_pubkeys:
                 self._certifications_repo.drop(c)
 
-        certified = self._certifications_repo.get_all(currency=connection.currency, certified=connection.pubkey)
+        certified = self._certifications_repo.get_all(
+            currency=connection.currency, certified=connection.pubkey
+        )
         for c in certified:
             if c.certifier not in connections_pubkeys:
-                self._certifications_repo.drop(c)
\ No newline at end of file
+                self._certifications_repo.drop(c)
diff --git a/src/sakia/data/processors/connections.py b/src/sakia/data/processors/connections.py
index 7b2ae40a747b2db510265994aefd7722f2fa9319..c9dd14beec85682a816c97cba17196e75e0320b6 100644
--- a/src/sakia/data/processors/connections.py
+++ b/src/sakia/data/processors/connections.py
@@ -12,7 +12,7 @@ class ConnectionsProcessor:
     """
 
     _connections_repo = attr.ib()  # :type
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
@@ -43,7 +43,9 @@ class ConnectionsProcessor:
 
     def connections_with_uids(self, currency=""):
         if currency:
-            return [r for r in self._connections_repo.get_all(currency=currency) if r.uid]
+            return [
+                r for r in self._connections_repo.get_all(currency=currency) if r.uid
+            ]
         else:
             return [r for r in self._connections_repo.get_all() if r.uid]
 
diff --git a/src/sakia/data/processors/contacts.py b/src/sakia/data/processors/contacts.py
index 71b484cdc7b3728de8df19d3bcb9d013c9a74573..c31a881b3ea9dbb2b43fdda9aaa994683290fcdf 100644
--- a/src/sakia/data/processors/contacts.py
+++ b/src/sakia/data/processors/contacts.py
@@ -10,8 +10,9 @@ class ContactsProcessor:
 
     :param sakia.data.repositories.ContactsRepo _contacts_repo: the repository of the contacts
     """
+
     _contacts_repo = attr.ib()
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
diff --git a/src/sakia/data/processors/dividends.py b/src/sakia/data/processors/dividends.py
index fbbc35f361191c2214a61d0633c887871db98804..138914ecb4e770ecd96b78bb55f901121fa0e9a1 100644
--- a/src/sakia/data/processors/dividends.py
+++ b/src/sakia/data/processors/dividends.py
@@ -16,10 +16,11 @@ class DividendsProcessor:
     :param sakia.data.repositories.BlockchainsRepo _blockchain_repo: the repository of the sources
     :param sakia.data.connectors.bma.BmaConnector _bma_connector: the bma connector
     """
+
     _repo = attr.ib()
     _blockchain_repo = attr.ib()
     _bma_connector = attr.ib()
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
@@ -27,8 +28,11 @@ class DividendsProcessor:
         Instanciate a blockchain processor
         :param sakia.app.Application app: the app
         """
-        return cls(app.db.dividends_repo, app.db.blockchains_repo,
-                   BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters))
+        return cls(
+            app.db.dividends_repo,
+            app.db.blockchains_repo,
+            BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters),
+        )
 
     def commit(self, dividend):
         try:
@@ -38,7 +42,9 @@ class DividendsProcessor:
             self._logger.debug("Dividend already in db")
         return False
 
-    async def initialize_dividends(self, connection, transactions, log_stream, progress):
+    async def initialize_dividends(
+        self, connection, transactions, log_stream, progress
+    ):
         """
         Request transactions from the network to initialize data for a given pubkey
         :param sakia.data.entities.Connection connection:
@@ -49,18 +55,21 @@ class DividendsProcessor:
         blockchain = self._blockchain_repo.get_one(currency=connection.currency)
         avg_blocks_per_month = int(30 * 24 * 3600 / blockchain.parameters.avg_gen_time)
         start = blockchain.current_buid.number - avg_blocks_per_month
-        history_data = await self._bma_connector.get(connection.currency, bma.ud.history,
-                                                     req_args={'pubkey': connection.pubkey})
+        history_data = await self._bma_connector.get(
+            connection.currency, bma.ud.history, req_args={"pubkey": connection.pubkey}
+        )
         block_numbers = []
         dividends = []
         for ud_data in history_data["history"]["history"]:
             if ud_data["block_number"] > start:
-                dividend = Dividend(currency=connection.currency,
-                                    pubkey=connection.pubkey,
-                                    block_number=ud_data["block_number"],
-                                    timestamp=ud_data["time"],
-                                    amount=ud_data["amount"],
-                                    base=ud_data["base"])
+                dividend = Dividend(
+                    currency=connection.currency,
+                    pubkey=connection.pubkey,
+                    block_number=ud_data["block_number"],
+                    timestamp=ud_data["time"],
+                    amount=ud_data["amount"],
+                    base=ud_data["base"],
+                )
                 log_stream("Dividend of block {0}".format(dividend.block_number))
                 block_numbers.append(dividend.block_number)
                 try:
@@ -72,16 +81,25 @@ class DividendsProcessor:
         for tx in transactions:
             txdoc = Transaction.from_signed_raw(tx.raw)
             for input in txdoc.inputs:
-                if input.source == "D" and input.origin_id == connection.pubkey \
-                        and input.index not in block_numbers and input.index > start:
+                if (
+                    input.source == "D"
+                    and input.origin_id == connection.pubkey
+                    and input.index not in block_numbers
+                    and input.index > start
+                ):
                     diff_blocks = blockchain.current_buid.number - input.index
-                    ud_mediantime = blockchain.median_time - diff_blocks*blockchain.parameters.avg_gen_time
-                    dividend = Dividend(currency=connection.currency,
-                                        pubkey=connection.pubkey,
-                                        block_number=input.index,
-                                        timestamp=ud_mediantime,
-                                        amount=input.amount,
-                                        base=input.base)
+                    ud_mediantime = (
+                        blockchain.median_time
+                        - diff_blocks * blockchain.parameters.avg_gen_time
+                    )
+                    dividend = Dividend(
+                        currency=connection.currency,
+                        pubkey=connection.pubkey,
+                        block_number=input.index,
+                        timestamp=ud_mediantime,
+                        amount=input.amount,
+                        base=input.base,
+                    )
                     log_stream("Dividend of block {0}".format(dividend.block_number))
                     try:
                         dividends.append(dividend)
@@ -99,6 +117,8 @@ class DividendsProcessor:
         :param sakia.data.entities.Connection connection:
         :return:
         """
-        dividends = self._repo.get_all(currency=connection.currency, pubkey=connection.pubkey)
+        dividends = self._repo.get_all(
+            currency=connection.currency, pubkey=connection.pubkey
+        )
         for d in dividends:
             self._repo.drop(d)
diff --git a/src/sakia/data/processors/identities.py b/src/sakia/data/processors/identities.py
index 525106a73d18d7355c090f91feedf1fa765f79ff..4e32eae9ed24c0f3305649dd62406d78df9ae299 100644
--- a/src/sakia/data/processors/identities.py
+++ b/src/sakia/data/processors/identities.py
@@ -23,11 +23,12 @@ class IdentitiesProcessor:
     :param _bma_connector: sakia.data.connectors.bma.BmaConnector
     :param _logger:
     """
+
     _identities_repo = attr.ib()  # :type sakia.data.repositories.IdentitiesRepo
     _certifications_repo = attr.ib()  # :type sakia.data.repositories.IdentitiesRepo
     _blockchain_repo = attr.ib()  # :type sakia.data.repositories.BlockchainRepo
     _bma_connector = attr.ib()  # :type sakia.data.connectors.bma.BmaConnector
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
@@ -35,8 +36,12 @@ class IdentitiesProcessor:
         Instanciate a blockchain processor
         :param sakia.app.Application app: the app
         """
-        return cls(app.db.identities_repo, app.db.certifications_repo, app.db.blockchains_repo,
-                   BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters))
+        return cls(
+            app.db.identities_repo,
+            app.db.certifications_repo,
+            app.db.blockchains_repo,
+            BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters),
+        )
 
     async def find_from_pubkey(self, currency, pubkey):
         """
@@ -53,15 +58,19 @@ class IdentitiesProcessor:
                 found_identity = idty
         if not found_identity.uid:
             try:
-                data = await self._bma_connector.get(currency, bma.wot.lookup, req_args={'search': pubkey})
-                for result in data['results']:
+                data = await self._bma_connector.get(
+                    currency, bma.wot.lookup, req_args={"search": pubkey}
+                )
+                for result in data["results"]:
                     if result["pubkey"] == pubkey:
-                        uids = result['uids']
+                        uids = result["uids"]
                         for uid_data in uids:
                             identity = Identity(currency, pubkey)
-                            identity.uid = uid_data['uid']
-                            identity.blockstamp = block_uid(uid_data['meta']['timestamp'])
-                            identity.signature = uid_data['self']
+                            identity.uid = uid_data["uid"]
+                            identity.blockstamp = block_uid(
+                                uid_data["meta"]["timestamp"]
+                            )
+                            identity.signature = uid_data["self"]
                             if identity.blockstamp >= found_identity.blockstamp:
                                 found_identity = identity
             except (errors.DuniterError, asyncio.TimeoutError, ClientError) as e:
@@ -82,16 +91,20 @@ class IdentitiesProcessor:
         tries = 0
         while tries < 3:
             try:
-                data = await self._bma_connector.get(currency, bma.wot.lookup, req_args={'search': text})
-                for result in data['results']:
-                    pubkey = result['pubkey']
-                    for uid_data in result['uids']:
-                        if not uid_data['revoked']:
-                            identity = Identity(currency=currency,
-                                                pubkey=pubkey,
-                                                uid=uid_data['uid'],
-                                                blockstamp=uid_data['meta']['timestamp'],
-                                                signature=uid_data['self'])
+                data = await self._bma_connector.get(
+                    currency, bma.wot.lookup, req_args={"search": text}
+                )
+                for result in data["results"]:
+                    pubkey = result["pubkey"]
+                    for uid_data in result["uids"]:
+                        if not uid_data["revoked"]:
+                            identity = Identity(
+                                currency=currency,
+                                pubkey=pubkey,
+                                uid=uid_data["uid"],
+                                blockstamp=uid_data["meta"]["timestamp"],
+                                signature=uid_data["self"],
+                            )
                             if identity not in identities:
                                 identities.append(identity)
                 break
@@ -139,38 +152,56 @@ class IdentitiesProcessor:
         :param function progress: callback for progressbar
         """
         log_stream("Requesting membership data")
-        progress(1/3)
+        progress(1 / 3)
         try:
-            memberships_data = await self._bma_connector.get(identity.currency, bma.blockchain.memberships,
-                                                             req_args={'search': identity.pubkey})
-            if block_uid(memberships_data['sigDate']) == identity.blockstamp \
-               and memberships_data['uid'] == identity.uid:
+            memberships_data = await self._bma_connector.get(
+                identity.currency,
+                bma.blockchain.memberships,
+                req_args={"search": identity.pubkey},
+            )
+            if (
+                block_uid(memberships_data["sigDate"]) == identity.blockstamp
+                and memberships_data["uid"] == identity.uid
+            ):
                 identity.written = True
-                for ms in memberships_data['memberships']:
-                    if ms['written'] and ms['written'] > identity.membership_written_on:
-                        identity.membership_buid = BlockUID(ms['blockNumber'], ms['blockHash'])
-                        identity.membership_type = ms['membership']
-                        identity.membership_written_on = ms['written']
+                for ms in memberships_data["memberships"]:
+                    if ms["written"] and ms["written"] > identity.membership_written_on:
+                        identity.membership_buid = BlockUID(
+                            ms["blockNumber"], ms["blockHash"]
+                        )
+                        identity.membership_type = ms["membership"]
+                        identity.membership_written_on = ms["written"]
 
                 progress(1 / 3)
                 if identity.membership_buid:
                     log_stream("Requesting membership timestamp")
-                    ms_block_data = await self._bma_connector.get(identity.currency, bma.blockchain.block,
-                                                                  req_args={'number': identity.membership_buid.number})
+                    ms_block_data = await self._bma_connector.get(
+                        identity.currency,
+                        bma.blockchain.block,
+                        req_args={"number": identity.membership_buid.number},
+                    )
                     if ms_block_data:
-                        identity.membership_timestamp = ms_block_data['medianTime']
+                        identity.membership_timestamp = ms_block_data["medianTime"]
 
                 log_stream("Requesting identity requirements status")
 
                 progress(1 / 3)
-                requirements_data = await self._bma_connector.get(identity.currency, bma.wot.requirements,
-                                                                  req_args={'search': identity.pubkey})
-                identity_data = next((data for data in requirements_data["identities"]
-                                      if data["pubkey"] == identity.pubkey))
-                identity.member = identity_data['membershipExpiresIn'] > 0
-                identity.written = identity_data['wasMember']
+                requirements_data = await self._bma_connector.get(
+                    identity.currency,
+                    bma.wot.requirements,
+                    req_args={"search": identity.pubkey},
+                )
+                identity_data = next(
+                    (
+                        data
+                        for data in requirements_data["identities"]
+                        if data["pubkey"] == identity.pubkey
+                    )
+                )
+                identity.member = identity_data["membershipExpiresIn"] > 0
+                identity.written = identity_data["wasMember"]
                 identity.sentry = identity_data["isSentry"]
-                identity.outdistanced = identity_data['outdistanced']
+                identity.outdistanced = identity_data["outdistanced"]
                 self.insert_or_update_identity(identity)
         except errors.DuniterError as e:
             if e.ucode == errors.NO_MEMBER_MATCHING_PUB_OR_UID:
@@ -185,16 +216,21 @@ class IdentitiesProcessor:
         :return: (True if found, local value, network value)
         """
         identity = Identity(connection.currency, connection.pubkey, connection.uid)
-        found_identity = Identity(connection.currency, connection.pubkey, connection.uid)
+        found_identity = Identity(
+            connection.currency, connection.pubkey, connection.uid
+        )
 
         def _parse_uid_lookup(data):
             timestamp = BlockUID.empty()
             found_uid = ""
-            for result in data['results']:
+            for result in data["results"]:
                 if result["pubkey"] == identity.pubkey:
-                    uids = result['uids']
+                    uids = result["uids"]
                     for uid_data in uids:
-                        if BlockUID.from_str(uid_data["meta"]["timestamp"]) >= timestamp:
+                        if (
+                            BlockUID.from_str(uid_data["meta"]["timestamp"])
+                            >= timestamp
+                        ):
                             timestamp = BlockUID.from_str(uid_data["meta"]["timestamp"])
                             found_identity.blockstamp = timestamp
                             found_uid = uid_data["uid"]
@@ -205,8 +241,8 @@ class IdentitiesProcessor:
             timestamp = BlockUID.empty()
             found_uid = ""
             found_result = ["", ""]
-            for result in data['results']:
-                uids = result['uids']
+            for result in data["results"]:
+                uids = result["uids"]
                 for uid_data in uids:
                     if BlockUID.from_str(uid_data["meta"]["timestamp"]) >= timestamp:
                         timestamp = BlockUID.from_str(uid_data["meta"]["timestamp"])
@@ -214,23 +250,32 @@ class IdentitiesProcessor:
                         found_uid = uid_data["uid"]
                         found_identity.signature = uid_data["self"]
                 if found_uid == identity.uid:
-                    found_result = result['pubkey'], found_uid
+                    found_result = result["pubkey"], found_uid
             if found_result[1] == identity.uid:
-                return identity.pubkey == found_result[0], identity.pubkey, found_result[0]
+                return (
+                    identity.pubkey == found_result[0],
+                    identity.pubkey,
+                    found_result[0],
+                )
             else:
                 return False, identity.pubkey, None
 
         async def execute_requests(parser, search):
             nonlocal registered
             try:
-                data = await self._bma_connector.get(connection.currency, bma.wot.lookup,
-                                                      req_args={'search': search})
+                data = await self._bma_connector.get(
+                    connection.currency, bma.wot.lookup, req_args={"search": search}
+                )
                 if data:
                     registered = parser(data)
             except errors.DuniterError as e:
                 self._logger.debug(e.ucode)
-                if e.ucode not in (errors.NO_MEMBER_MATCHING_PUB_OR_UID, errors.NO_MATCHING_IDENTITY):
+                if e.ucode not in (
+                    errors.NO_MEMBER_MATCHING_PUB_OR_UID,
+                    errors.NO_MATCHING_IDENTITY,
+                ):
                     raise
+
         # cell 0 contains True if the user is already registered
         # cell 1 contains the uid/pubkey selected locally
         # cell 2 contains the uid/pubkey found on the network
@@ -255,9 +300,11 @@ class IdentitiesProcessor:
         """
         identities = self._identities_repo.get_all(currency=connection.currency)
         for idty in identities:
-            others_certs = self._certifications_repo.get_all(currency=connection.currency,
-                                                             certifier=idty.pubkey)
-            others_certs += self._certifications_repo.get_all(currency=connection.currency,
-                                                              certified=idty.pubkey)
+            others_certs = self._certifications_repo.get_all(
+                currency=connection.currency, certifier=idty.pubkey
+            )
+            others_certs += self._certifications_repo.get_all(
+                currency=connection.currency, certified=idty.pubkey
+            )
             if not others_certs:
                 self._identities_repo.drop(idty)
diff --git a/src/sakia/data/processors/nodes.py b/src/sakia/data/processors/nodes.py
index feb2db0bf4506983179a1758de51173579c282cf..50a6dd2f0b477982fa6327893ee103f812e3d9ae 100644
--- a/src/sakia/data/processors/nodes.py
+++ b/src/sakia/data/processors/nodes.py
@@ -18,11 +18,13 @@ class NodesProcessor:
     def initialize_root_nodes(self, currency):
         if not self.nodes(currency):
             for pubkey in ROOT_SERVERS[currency]["nodes"]:
-                node = Node(currency=currency,
-                            pubkey=pubkey,
-                            endpoints=ROOT_SERVERS[currency]["nodes"][pubkey],
-                            peer_blockstamp=BlockUID.empty(),
-                            state=0)
+                node = Node(
+                    currency=currency,
+                    pubkey=pubkey,
+                    endpoints=ROOT_SERVERS[currency]["nodes"][pubkey],
+                    peer_blockstamp=BlockUID.empty(),
+                    state=0,
+                )
                 self._repo.insert(node)
 
     def current_buid(self, currency):
@@ -188,4 +190,4 @@ class NodesProcessor:
         nodes = self._repo.get_all()
         for n in nodes:
             if n.pubkey not in ROOT_SERVERS[currency].keys():
-                self._repo.drop(n)
\ No newline at end of file
+                self._repo.drop(n)
diff --git a/src/sakia/data/processors/sources.py b/src/sakia/data/processors/sources.py
index eab045c04260af07722be4f0335655c4b84e56b4..a4b02c5bb3a93acaff36e85d237f845dca55206e 100644
--- a/src/sakia/data/processors/sources.py
+++ b/src/sakia/data/processors/sources.py
@@ -13,9 +13,10 @@ class SourcesProcessor:
     :param sakia.data.repositories.SourcesRepo _repo: the repository of the sources
     :param sakia.data.connectors.bma.BmaConnector _bma_connector: the bma connector
     """
+
     _repo = attr.ib()
     _bma_connector = attr.ib()
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
@@ -23,8 +24,10 @@ class SourcesProcessor:
         Instanciate a blockchain processor
         :param sakia.app.Application app: the app
         """
-        return cls(app.db.sources_repo,
-                   BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters))
+        return cls(
+            app.db.sources_repo,
+            BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters),
+        )
 
     def commit(self, source):
         try:
@@ -40,7 +43,7 @@ class SourcesProcessor:
         :return:
         """
         sources = self._repo.get_all(currency=currency, pubkey=pubkey)
-        return sum([s.amount * (10**s.base) for s in sources])
+        return sum([s.amount * (10 ** s.base) for s in sources])
 
     def available(self, currency, pubkey):
         """"
diff --git a/src/sakia/data/processors/transactions.py b/src/sakia/data/processors/transactions.py
index f131aad88ec8fef05baa61b5d5b124950f6b7e97..6bb151421e94902f8a04b9e9393fee4ddf216cd6 100644
--- a/src/sakia/data/processors/transactions.py
+++ b/src/sakia/data/processors/transactions.py
@@ -17,7 +17,7 @@ class TransactionsProcessor:
     _blockchain_repo = attr.ib()
     _bma_connector = attr.ib()  # :type sakia.data.connectors.bma.BmaConnector
     _table_states = attr.ib(default=attr.Factory(dict))
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
@@ -25,8 +25,11 @@ class TransactionsProcessor:
         Instanciate a blockchain processor
         :param sakia.app.Application app: the app
         """
-        return cls(app.db.transactions_repo, app.db.blockchains_repo,
-                   BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters))
+        return cls(
+            app.db.transactions_repo,
+            app.db.blockchains_repo,
+            BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters),
+        )
 
     def next_txid(self, currency, block_number):
         """
@@ -64,11 +67,17 @@ class TransactionsProcessor:
             for transition in tx_lifecycle.states[transition_key]:
                 if transition[0](tx, *inputs):
                     if tx.sha_hash:
-                        self._logger.debug("{0} : {1} --> {2}".format(tx.sha_hash[:5], tx.state,
-                                                                      transition[2]))
+                        self._logger.debug(
+                            "{0} : {1} --> {2}".format(
+                                tx.sha_hash[:5], tx.state, transition[2]
+                            )
+                        )
                     else:
-                        self._logger.debug("Unsent transfer : {0} --> {1}".format(tx.state,
-                                                                                  transition[2]))
+                        self._logger.debug(
+                            "Unsent transfer : {0} --> {1}".format(
+                                tx.state, transition[2]
+                            )
+                        )
 
                     # If the transition changes data, apply changes
                     if transition[1]:
@@ -121,9 +130,13 @@ class TransactionsProcessor:
         :param currency: The community target of the transaction
         """
         self._repo.insert(tx)
-        responses = await self._bma_connector.broadcast(currency, bma.tx.process, req_args={'transaction': tx.raw})
+        responses = await self._bma_connector.broadcast(
+            currency, bma.tx.process, req_args={"transaction": tx.raw}
+        )
         result = await parse_bma_responses(responses)
-        self.run_state_transitions(tx, [r.status for r in responses if not isinstance(r, BaseException)])
+        self.run_state_transitions(
+            tx, [r.status for r in responses if not isinstance(r, BaseException)]
+        )
         return result, tx
 
     async def initialize_transactions(self, connection, log_stream, progress):
@@ -137,21 +150,31 @@ class TransactionsProcessor:
         avg_blocks_per_month = int(30 * 24 * 3600 / blockchain.parameters.avg_gen_time)
         start = blockchain.current_buid.number - avg_blocks_per_month
         end = blockchain.current_buid.number
-        history_data = await self._bma_connector.get(connection.currency, bma.tx.blocks,
-                                                     req_args={'pubkey': connection.pubkey,
-                                                               'start': start,
-                                                               'end': end})
+        history_data = await self._bma_connector.get(
+            connection.currency,
+            bma.tx.blocks,
+            req_args={"pubkey": connection.pubkey, "start": start, "end": end},
+        )
         txid = 0
-        nb_tx = len(history_data["history"]["sent"]) + len(history_data["history"]["received"])
+        nb_tx = len(history_data["history"]["sent"]) + len(
+            history_data["history"]["received"]
+        )
         log_stream("Found {0} transactions".format(nb_tx))
         transactions = []
-        for sent_data in history_data["history"]["sent"] + history_data["history"]["received"]:
+        for sent_data in (
+            history_data["history"]["sent"] + history_data["history"]["received"]
+        ):
             sent = TransactionDoc.from_bma_history(history_data["currency"], sent_data)
             log_stream("{0}/{1} transactions".format(txid, nb_tx))
             progress(1 / nb_tx)
             try:
-                tx = parse_transaction_doc(sent, connection.pubkey, sent_data["block_number"],
-                                           sent_data["time"], txid)
+                tx = parse_transaction_doc(
+                    sent,
+                    connection.pubkey,
+                    sent_data["block_number"],
+                    sent_data["time"],
+                    txid,
+                )
                 if tx:
                     transactions.append(tx)
                     self._repo.insert(tx)
@@ -170,6 +193,8 @@ class TransactionsProcessor:
         :param List[str] connections_pubkeys: pubkeys of existing connections
         :return:
         """
-        transactions = self._repo.get_all(currency=connection.currency, pubkey=connection.pubkey)
+        transactions = self._repo.get_all(
+            currency=connection.currency, pubkey=connection.pubkey
+        )
         for tx in transactions:
             self._repo.drop(tx)
diff --git a/src/sakia/data/processors/tx_lifecycle.py b/src/sakia/data/processors/tx_lifecycle.py
index d80ac4ee88009a9c9192a317f72b9fce54a68f5a..3bce1c7368a4fa8ffd4a0069a3e4306c10d0845d 100644
--- a/src/sakia/data/processors/tx_lifecycle.py
+++ b/src/sakia/data/processors/tx_lifecycle.py
@@ -74,17 +74,13 @@ def _drop(tx):
 # keys are a tuple containg (current_state, transition_parameters)
 # values are tuples containing (transition_test, transition_success, new_state)
 states = {
-            (Transaction.TO_SEND, (list,)):
-                (
-                    (_broadcast_success, None, Transaction.AWAITING),
-                    (lambda tx, l: _broadcast_failure(tx, l), None, Transaction.REFUSED),
-                ),
-            (Transaction.TO_SEND, ()):
-                ((_is_locally_created, _drop, Transaction.DROPPED),),
-
-            (Transaction.AWAITING, (str, int,)):
-                ((_found_in_block, _be_validated, Transaction.VALIDATED),),
-
-            (Transaction.REFUSED, ()):
-                ((_is_locally_created, _drop, Transaction.DROPPED),)
-        }
+    (Transaction.TO_SEND, (list,)): (
+        (_broadcast_success, None, Transaction.AWAITING),
+        (lambda tx, l: _broadcast_failure(tx, l), None, Transaction.REFUSED),
+    ),
+    (Transaction.TO_SEND, ()): ((_is_locally_created, _drop, Transaction.DROPPED),),
+    (Transaction.AWAITING, (str, int,)): (
+        (_found_in_block, _be_validated, Transaction.VALIDATED),
+    ),
+    (Transaction.REFUSED, ()): ((_is_locally_created, _drop, Transaction.DROPPED),),
+}
diff --git a/src/sakia/data/repositories/blockchains.py b/src/sakia/data/repositories/blockchains.py
index 272a5b3f8f24e7b79b54d897ad70c022d13a2813..77ebfb5143e610123a3ad088f2e514da15af1761 100644
--- a/src/sakia/data/repositories/blockchains.py
+++ b/src/sakia/data/repositories/blockchains.py
@@ -9,6 +9,7 @@ from ..entities import Blockchain, BlockchainParameters
 class BlockchainsRepo:
     """The repository for Blockchain entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Connection
     _primary_keys = (attr.fields(Blockchain).currency,)
 
@@ -17,20 +18,30 @@ class BlockchainsRepo:
         Commit a blockchain to the database
         :param sakia.data.entities.Blockchain blockchain: the blockchain to commit
         """
-        blockchain_tuple = attr.astuple(blockchain.parameters) \
-                           + attr.astuple(blockchain, filter=attr.filters.exclude(attr.fields(Blockchain).parameters))
-        values = ",".join(['?'] * len(blockchain_tuple))
-        self._conn.execute("INSERT INTO blockchains VALUES ({0})".format(values), blockchain_tuple)
+        blockchain_tuple = attr.astuple(blockchain.parameters) + attr.astuple(
+            blockchain, filter=attr.filters.exclude(attr.fields(Blockchain).parameters)
+        )
+        values = ",".join(["?"] * len(blockchain_tuple))
+        self._conn.execute(
+            "INSERT INTO blockchains VALUES ({0})".format(values), blockchain_tuple
+        )
 
     def update(self, blockchain):
         """
         Update an existing blockchain in the database
         :param sakia.data.entities.Blockchain blockchain: the blockchain to update
         """
-        updated_fields = attr.astuple(blockchain, filter=attr.filters.exclude(
-            attr.fields(Blockchain).parameters, *BlockchainsRepo._primary_keys))
-        where_fields = attr.astuple(blockchain, filter=attr.filters.include(*BlockchainsRepo._primary_keys))
-        self._conn.execute("""UPDATE blockchains SET
+        updated_fields = attr.astuple(
+            blockchain,
+            filter=attr.filters.exclude(
+                attr.fields(Blockchain).parameters, *BlockchainsRepo._primary_keys
+            ),
+        )
+        where_fields = attr.astuple(
+            blockchain, filter=attr.filters.include(*BlockchainsRepo._primary_keys)
+        )
+        self._conn.execute(
+            """UPDATE blockchains SET
                           current_buid=?,
                           current_members_count=?,
                           current_mass=?,
@@ -47,7 +58,8 @@ class BlockchainsRepo:
                           previous_ud_time=?
                            WHERE
                           currency=?""",
-                           updated_fields + where_fields)
+            updated_fields + where_fields,
+        )
 
     def get_one(self, **search):
         """
@@ -62,7 +74,9 @@ class BlockchainsRepo:
             values.append(v)
 
         if filters:
-            request = "SELECT * FROM blockchains WHERE {filters}".format(filters=" AND ".join(filters))
+            request = "SELECT * FROM blockchains WHERE {filters}".format(
+                filters=" AND ".join(filters)
+            )
         else:
             request = "SELECT * FROM blockchains"
 
@@ -71,7 +85,9 @@ class BlockchainsRepo:
         if data:
             return Blockchain(BlockchainParameters(*data[:20]), *data[20:])
 
-    def get_all(self, offset=0, limit=1000, sort_by="currency", sort_order="ASC", **search) -> List[Blockchain]:
+    def get_all(
+        self, offset=0, limit=1000, sort_by="currency", sort_order="ASC", **search
+    ) -> List[Blockchain]:
         """
         Get all existing blockchain in the database corresponding to the search
         :param int offset: offset in results to paginate
@@ -95,22 +111,22 @@ class BlockchainsRepo:
                 offset=offset,
                 limit=limit,
                 sort_by=sort_by,
-                sort_order=sort_order
+                sort_order=sort_order,
             )
             c = self._conn.execute(request, tuple(values))
         else:
             request = """SELECT * FROM blockchains
                           ORDER BY {sort_by} {sort_order}
                           LIMIT {limit} OFFSET {offset}""".format(
-                offset=offset,
-                limit=limit,
-                sort_by=sort_by,
-                sort_order=sort_order
+                offset=offset, limit=limit, sort_by=sort_by, sort_order=sort_order
             )
             c = self._conn.execute(request)
         datas = c.fetchall()
         if datas:
-            return [Blockchain(BlockchainParameters(*data[:19]), *data[20:]) for data in datas]
+            return [
+                Blockchain(BlockchainParameters(*data[:19]), *data[20:])
+                for data in datas
+            ]
         return []
 
     def drop(self, blockchain):
@@ -118,5 +134,7 @@ class BlockchainsRepo:
         Drop an existing blockchain from the database
         :param sakia.data.entities.Blockchain blockchain: the blockchain to update
         """
-        where_fields = attr.astuple(blockchain, filter=attr.filters.include(*BlockchainsRepo._primary_keys))
+        where_fields = attr.astuple(
+            blockchain, filter=attr.filters.include(*BlockchainsRepo._primary_keys)
+        )
         self._conn.execute("DELETE FROM blockchains WHERE currency=?", where_fields)
diff --git a/src/sakia/data/repositories/certifications.py b/src/sakia/data/repositories/certifications.py
index d51e5a8e9d15be2095926aa490b9c82da352421b..bb727b5e67b97dc86701f278fabd2f2292b176c4 100644
--- a/src/sakia/data/repositories/certifications.py
+++ b/src/sakia/data/repositories/certifications.py
@@ -7,9 +7,14 @@ from ..entities import Certification
 class CertificationsRepo:
     """The repository for Communities entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Connection
-    _primary_keys = (attr.fields(Certification).currency, attr.fields(Certification).certified,
-                     attr.fields(Certification).certifier, attr.fields(Certification).block,)
+    _primary_keys = (
+        attr.fields(Certification).currency,
+        attr.fields(Certification).certified,
+        attr.fields(Certification).certifier,
+        attr.fields(Certification).block,
+    )
 
     def insert(self, certification):
         """
@@ -17,17 +22,27 @@ class CertificationsRepo:
         :param sakia.data.entities.Certification certification: the certification to commit
         """
         certification_tuple = attr.astuple(certification)
-        values = ",".join(['?'] * len(certification_tuple))
-        self._conn.execute("INSERT INTO certifications VALUES ({0})".format(values), certification_tuple)
+        values = ",".join(["?"] * len(certification_tuple))
+        self._conn.execute(
+            "INSERT INTO certifications VALUES ({0})".format(values),
+            certification_tuple,
+        )
 
     def update(self, certification):
         """
         Update an existing certification in the database
         :param sakia.data.entities.Certification certification: the certification to update
         """
-        updated_fields = attr.astuple(certification, filter=attr.filters.exclude(*CertificationsRepo._primary_keys))
-        where_fields = attr.astuple(certification, filter=attr.filters.include(*CertificationsRepo._primary_keys))
-        self._conn.execute("""UPDATE certifications SET
+        updated_fields = attr.astuple(
+            certification,
+            filter=attr.filters.exclude(*CertificationsRepo._primary_keys),
+        )
+        where_fields = attr.astuple(
+            certification,
+            filter=attr.filters.include(*CertificationsRepo._primary_keys),
+        )
+        self._conn.execute(
+            """UPDATE certifications SET
                            ts=?,
                            signature=?,
                            written_on=?
@@ -36,7 +51,8 @@ class CertificationsRepo:
                            certifier=? AND
                            certified=? AND
                            block=?""",
-                           updated_fields + where_fields)
+            updated_fields + where_fields,
+        )
 
     def get_one(self, **search):
         """
@@ -50,7 +66,9 @@ class CertificationsRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM certifications WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM certifications WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         data = c.fetchone()
@@ -70,7 +88,9 @@ class CertificationsRepo:
             filters.append("{key} = ?".format(key=k))
             values.append(value)
 
-        request = "SELECT * FROM certifications WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM certifications WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         datas = c.fetchall()
@@ -92,9 +112,18 @@ class CertificationsRepo:
                   WHERE currency=? AND (certifier=? or certified=?)
                   AND ((ts + ? < ?) or (written_on == -1 and ts + ? < ?))
                   """
-        c = self._conn.execute(request, (currency, pubkey, pubkey,
-                                         sig_validity, current_ts,
-                                         sig_window, current_ts))
+        c = self._conn.execute(
+            request,
+            (
+                currency,
+                pubkey,
+                pubkey,
+                sig_validity,
+                current_ts,
+                sig_window,
+                current_ts,
+            ),
+        )
         datas = c.fetchall()
         if datas:
             return [Certification(*data) for data in datas]
@@ -123,10 +152,16 @@ class CertificationsRepo:
         Drop an existing certification from the database
         :param sakia.data.entities.Certification certification: the certification to update
         """
-        where_fields = attr.astuple(certification, filter=attr.filters.include(*CertificationsRepo._primary_keys))
-        self._conn.execute("""DELETE FROM certifications
+        where_fields = attr.astuple(
+            certification,
+            filter=attr.filters.include(*CertificationsRepo._primary_keys),
+        )
+        self._conn.execute(
+            """DELETE FROM certifications
                               WHERE
                               currency=? AND
                               certifier=? AND
                               certified=? AND
-                              block=?""", where_fields)
+                              block=?""",
+            where_fields,
+        )
diff --git a/src/sakia/data/repositories/connections.py b/src/sakia/data/repositories/connections.py
index ef9b3450d4471a5b1ac0587c0d3a80c31010b3a4..c7508413345aa2157cc88e694f7c4a20b4d94d92 100644
--- a/src/sakia/data/repositories/connections.py
+++ b/src/sakia/data/repositories/connections.py
@@ -8,6 +8,7 @@ class ConnectionsRepo:
     """
     The repository for Connections entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Connection
     _primary_keys = (attr.fields(Connection).currency, attr.fields(Connection).pubkey)
 
@@ -16,22 +17,36 @@ class ConnectionsRepo:
         Commit a connection to the database
         :param sakia.data.entities.Connection connection: the connection to commit
         """
-        connection_tuple = attr.astuple(connection, filter=attr.filters.exclude(attr.fields(Connection).password,
-                                                                                attr.fields(Connection).salt))
-        values = ",".join(['?'] * len(connection_tuple))
-        self._conn.execute("INSERT INTO connections VALUES ({0})".format(values), connection_tuple)
+        connection_tuple = attr.astuple(
+            connection,
+            filter=attr.filters.exclude(
+                attr.fields(Connection).password, attr.fields(Connection).salt
+            ),
+        )
+        values = ",".join(["?"] * len(connection_tuple))
+        self._conn.execute(
+            "INSERT INTO connections VALUES ({0})".format(values), connection_tuple
+        )
 
     def update(self, connection):
         """
         Update an existing connection in the database
         :param sakia.data.entities.Connection connection: the certification to update
         """
-        updated_fields = attr.astuple(connection, filter=attr.filters.exclude(attr.fields(Connection).password,
-                                                                              attr.fields(Connection).salt,
-                                                                              *ConnectionsRepo._primary_keys))
-        where_fields = attr.astuple(connection, filter=attr.filters.include(*ConnectionsRepo._primary_keys))
+        updated_fields = attr.astuple(
+            connection,
+            filter=attr.filters.exclude(
+                attr.fields(Connection).password,
+                attr.fields(Connection).salt,
+                *ConnectionsRepo._primary_keys
+            ),
+        )
+        where_fields = attr.astuple(
+            connection, filter=attr.filters.include(*ConnectionsRepo._primary_keys)
+        )
 
-        self._conn.execute("""UPDATE connections SET
+        self._conn.execute(
+            """UPDATE connections SET
                               uid=?,
                               scrypt_N=?,
                               scrypt_p=?,
@@ -40,7 +55,9 @@ class ConnectionsRepo:
                               WHERE
                               currency=? AND
                               pubkey=?
-                          """, updated_fields + where_fields)
+                          """,
+            updated_fields + where_fields,
+        )
 
     def get_one(self, **search):
         """
@@ -54,7 +71,9 @@ class ConnectionsRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM connections WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM connections WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         data = c.fetchone()
@@ -115,8 +134,13 @@ class ConnectionsRepo:
         Drop an existing connection from the database
         :param sakia.data.entities.Connection connection: the connection to update
         """
-        where_fields = attr.astuple(connection, filter=attr.filters.include(*ConnectionsRepo._primary_keys))
-        self._conn.execute("""DELETE FROM connections
+        where_fields = attr.astuple(
+            connection, filter=attr.filters.include(*ConnectionsRepo._primary_keys)
+        )
+        self._conn.execute(
+            """DELETE FROM connections
                               WHERE
                               currency=? AND
-                              pubkey=?""", where_fields)
+                              pubkey=?""",
+            where_fields,
+        )
diff --git a/src/sakia/data/repositories/contacts.py b/src/sakia/data/repositories/contacts.py
index 6b38e409ce65355595fa2bc75480ea173ca2c022..ea0224f5ed02a32f54224461eae8527fe19f6e2b 100644
--- a/src/sakia/data/repositories/contacts.py
+++ b/src/sakia/data/repositories/contacts.py
@@ -8,6 +8,7 @@ class ContactsRepo:
     """
     The repository for Contacts entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Contact
     _primary_keys = (attr.fields(Contact).contact_id,)
 
@@ -23,33 +24,44 @@ class ContactsRepo:
             contacts_list = contacts_list[:-1]
         else:
             col_names = ",".join([a.name for a in attr.fields(Contact)])
-        values = ",".join(['?'] * len(contacts_list))
+        values = ",".join(["?"] * len(contacts_list))
         cursor = self._conn.cursor()
-        cursor.execute("INSERT INTO contacts ({:}) VALUES ({:})".format(col_names, values), contacts_list)
+        cursor.execute(
+            "INSERT INTO contacts ({:}) VALUES ({:})".format(col_names, values),
+            contacts_list,
+        )
         contact.contact_id = cursor.lastrowid
 
-
     def update(self, contact):
         """
         Update an existing contact in the database
         :param sakia.data.entities.Contact contact: the certification to update
         """
-        updated_fields = attr.astuple(contact, tuple_factory=list,
-                                      filter=attr.filters.exclude(*ContactsRepo._primary_keys))
+        updated_fields = attr.astuple(
+            contact,
+            tuple_factory=list,
+            filter=attr.filters.exclude(*ContactsRepo._primary_keys),
+        )
 
         updated_fields[3] = "\n".join([str(n) for n in updated_fields[3]])
 
-        where_fields = attr.astuple(contact, tuple_factory=list,
-                                    filter=attr.filters.include(*ContactsRepo._primary_keys))
+        where_fields = attr.astuple(
+            contact,
+            tuple_factory=list,
+            filter=attr.filters.include(*ContactsRepo._primary_keys),
+        )
 
-        self._conn.execute("""UPDATE contacts SET
+        self._conn.execute(
+            """UPDATE contacts SET
                               currency=?,
                               name=?,
                               pubkey=?,
                               fields=?
                               WHERE
                               contact_id=?
-                          """, updated_fields + where_fields)
+                          """,
+            updated_fields + where_fields,
+        )
 
     def get_one(self, **search):
         """
@@ -63,7 +75,9 @@ class ContactsRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM contacts WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM contacts WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         data = c.fetchone()
@@ -98,7 +112,12 @@ class ContactsRepo:
         Drop an existing contact from the database
         :param sakia.data.entities.Contact contact: the contact to update
         """
-        where_fields = attr.astuple(contact, filter=attr.filters.include(*ContactsRepo._primary_keys))
-        self._conn.execute("""DELETE FROM contacts
+        where_fields = attr.astuple(
+            contact, filter=attr.filters.include(*ContactsRepo._primary_keys)
+        )
+        self._conn.execute(
+            """DELETE FROM contacts
                               WHERE
-                              contact_id=?""", where_fields)
+                              contact_id=?""",
+            where_fields,
+        )
diff --git a/src/sakia/data/repositories/dividends.py b/src/sakia/data/repositories/dividends.py
index da1a74e569d5555ffd0bad0d79284a8970132258..f0627e2e9b57b2ec3e87eff2ddf9cf8f20e4f854 100644
--- a/src/sakia/data/repositories/dividends.py
+++ b/src/sakia/data/repositories/dividends.py
@@ -7,8 +7,13 @@ from ..entities import Dividend
 class DividendsRepo:
     """The repository for Communities entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Connection
-    _primary_keys = (attr.fields(Dividend).currency, attr.fields(Dividend).pubkey, attr.fields(Dividend).block_number)
+    _primary_keys = (
+        attr.fields(Dividend).currency,
+        attr.fields(Dividend).pubkey,
+        attr.fields(Dividend).block_number,
+    )
 
     def insert(self, dividend):
         """
@@ -16,8 +21,10 @@ class DividendsRepo:
         :param sakia.data.entities.Dividend dividend: the dividend to commit
         """
         dividend_tuple = attr.astuple(dividend)
-        values = ",".join(['?'] * len(dividend_tuple))
-        self._conn.execute("INSERT INTO dividends VALUES ({0})".format(values), dividend_tuple)
+        values = ",".join(["?"] * len(dividend_tuple))
+        self._conn.execute(
+            "INSERT INTO dividends VALUES ({0})".format(values), dividend_tuple
+        )
 
     def get_one(self, **search):
         """
@@ -31,7 +38,9 @@ class DividendsRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM dividends WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM dividends WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         data = c.fetchone()
@@ -51,7 +60,9 @@ class DividendsRepo:
             filters.append("{key} = ?".format(key=k))
             values.append(value)
 
-        request = "SELECT * FROM dividends WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM dividends WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         datas = c.fetchall()
@@ -59,7 +70,15 @@ class DividendsRepo:
             return [Dividend(*data) for data in datas]
         return []
 
-    def get_dividends(self, currency, pubkey, offset=0, limit=1000, sort_by="currency", sort_order="ASC"):
+    def get_dividends(
+        self,
+        currency,
+        pubkey,
+        offset=0,
+        limit=1000,
+        sort_by="currency",
+        sort_order="ASC",
+    ):
         """
         Get all transfers in the database on a given currency from or to a pubkey
 
@@ -69,12 +88,9 @@ class DividendsRepo:
         request = """SELECT * FROM dividends
                   WHERE currency=? AND pubkey=?
                   ORDER BY {sort_by} {sort_order}
-                  LIMIT {limit} OFFSET {offset}""" \
-                    .format(offset=offset,
-                            limit=limit,
-                            sort_by=sort_by,
-                            sort_order=sort_order
-                            )
+                  LIMIT {limit} OFFSET {offset}""".format(
+            offset=offset, limit=limit, sort_by=sort_by, sort_order=sort_order
+        )
         c = self._conn.execute(request, (currency, pubkey, pubkey))
         datas = c.fetchall()
         if datas:
@@ -86,7 +102,12 @@ class DividendsRepo:
         Drop an existing dividend from the database
         :param sakia.data.entities.Dividend dividend: the dividend to update
         """
-        where_fields = attr.astuple(dividend, filter=attr.filters.include(*DividendsRepo._primary_keys))
-        self._conn.execute("""DELETE FROM dividends
+        where_fields = attr.astuple(
+            dividend, filter=attr.filters.include(*DividendsRepo._primary_keys)
+        )
+        self._conn.execute(
+            """DELETE FROM dividends
                               WHERE
-                              currency=? AND pubkey=? AND block_number=? """, where_fields)
+                              currency=? AND pubkey=? AND block_number=? """,
+            where_fields,
+        )
diff --git a/src/sakia/data/repositories/identities.py b/src/sakia/data/repositories/identities.py
index c136250b7b94999e378956705999c45ea2773398..c49f6ccf6802b7cd16c723eb35d2c5f6368899f6 100644
--- a/src/sakia/data/repositories/identities.py
+++ b/src/sakia/data/repositories/identities.py
@@ -9,8 +9,14 @@ from ..entities import Identity
 class IdentitiesRepo:
     """The repository for Identities entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Connection
-    _primary_keys = (attr.fields(Identity).currency, attr.fields(Identity).pubkey, attr.fields(Identity).uid, attr.fields(Identity).blockstamp)
+    _primary_keys = (
+        attr.fields(Identity).currency,
+        attr.fields(Identity).pubkey,
+        attr.fields(Identity).uid,
+        attr.fields(Identity).blockstamp,
+    )
 
     def insert(self, identity):
         """
@@ -18,17 +24,24 @@ class IdentitiesRepo:
         :param sakia.data.entities.Identity identity: the identity to commit
         """
         identity_tuple = attr.astuple(identity)
-        values = ",".join(['?'] * len(identity_tuple))
-        self._conn.execute("INSERT INTO identities VALUES ({0})".format(values), identity_tuple)
+        values = ",".join(["?"] * len(identity_tuple))
+        self._conn.execute(
+            "INSERT INTO identities VALUES ({0})".format(values), identity_tuple
+        )
 
     def update(self, identity):
         """
         Update an existing identity in the database
         :param sakia.data.entities.Identity identity: the identity to update
         """
-        updated_fields = attr.astuple(identity, filter=attr.filters.exclude(*IdentitiesRepo._primary_keys))
-        where_fields = attr.astuple(identity, filter=attr.filters.include(*IdentitiesRepo._primary_keys))
-        self._conn.execute("""UPDATE identities SET
+        updated_fields = attr.astuple(
+            identity, filter=attr.filters.exclude(*IdentitiesRepo._primary_keys)
+        )
+        where_fields = attr.astuple(
+            identity, filter=attr.filters.include(*IdentitiesRepo._primary_keys)
+        )
+        self._conn.execute(
+            """UPDATE identities SET
                               signature=?,
                               timestamp=?,
                               written=?,
@@ -44,8 +57,9 @@ class IdentitiesRepo:
                               currency=? AND
                               pubkey=? AND
                               uid=? AND
-                              blockstamp=?""", updated_fields + where_fields
-                           )
+                              blockstamp=?""",
+            updated_fields + where_fields,
+        )
 
     def get_one(self, **search):
         """
@@ -59,7 +73,9 @@ class IdentitiesRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM identities WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM identities WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         data = c.fetchone()
@@ -80,7 +96,9 @@ class IdentitiesRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM identities WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM identities WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         datas = c.fetchall()
@@ -96,7 +114,9 @@ class IdentitiesRepo:
         """
         request = "SELECT * FROM identities WHERE currency=? AND (UID LIKE ? or PUBKEY LIKE ?)"
 
-        c = self._conn.execute(request, (currency, "%{0}%".format(text), "%{0}%".format(text)))
+        c = self._conn.execute(
+            request, (currency, "%{0}%".format(text), "%{0}%".format(text))
+        )
         datas = c.fetchall()
         if datas:
             return [Identity(*data) for data in datas]
@@ -107,9 +127,14 @@ class IdentitiesRepo:
         Drop an existing identity from the database
         :param sakia.data.entities.Identity identity: the identity to update
         """
-        where_fields = attr.astuple(identity, filter=attr.filters.include(*IdentitiesRepo._primary_keys))
-        self._conn.execute("""DELETE FROM identities WHERE
+        where_fields = attr.astuple(
+            identity, filter=attr.filters.include(*IdentitiesRepo._primary_keys)
+        )
+        self._conn.execute(
+            """DELETE FROM identities WHERE
                            currency=? AND
                            pubkey=? AND
                            uid=? AND
-                           blockstamp=?""", where_fields)
+                           blockstamp=?""",
+            where_fields,
+        )
diff --git a/src/sakia/data/repositories/meta.py b/src/sakia/data/repositories/meta.py
index 9d91433c99adf9c9dc1f45ff8e35bbe4d9ba3562..cee8a3f6ade50fd7f8f484370830e0125ba4ab0e 100644
--- a/src/sakia/data/repositories/meta.py
+++ b/src/sakia/data/repositories/meta.py
@@ -19,6 +19,7 @@ class SakiaDatabase:
     """
     This is Sakia unique SQLite database.
     """
+
     conn = attr.ib()  # :type sqlite3.Connection
     connections_repo = attr.ib(default=None)
     identities_repo = attr.ib(default=None)
@@ -29,7 +30,7 @@ class SakiaDatabase:
     sources_repo = attr.ib(default=None)
     dividends_repo = attr.ib(default=None)
     contacts_repo = attr.ib(default=None)
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def load_or_init(cls, options, profile_name):
@@ -40,12 +41,23 @@ class SakiaDatabase:
         def total_amount(amount, amount_base):
             return amount * 10 ** amount_base
 
-        db_path = os.path.join(options.config_path, profile_name, options.currency + ".db")
+        db_path = os.path.join(
+            options.config_path, profile_name, options.currency + ".db"
+        )
         con = sqlite3.connect(db_path, detect_types=sqlite3.PARSE_DECLTYPES)
         con.create_function("total_amount", 2, total_amount)
-        meta = SakiaDatabase(con, ConnectionsRepo(con), IdentitiesRepo(con),
-                             BlockchainsRepo(con), CertificationsRepo(con), TransactionsRepo(con),
-                             NodesRepo(con), SourcesRepo(con), DividendsRepo(con), ContactsRepo(con))
+        meta = SakiaDatabase(
+            con,
+            ConnectionsRepo(con),
+            IdentitiesRepo(con),
+            BlockchainsRepo(con),
+            CertificationsRepo(con),
+            TransactionsRepo(con),
+            NodesRepo(con),
+            SourcesRepo(con),
+            DividendsRepo(con),
+            ContactsRepo(con),
+        )
 
         meta.prepare()
         meta.upgrade_database()
@@ -58,12 +70,13 @@ class SakiaDatabase:
         with self.conn:
             self._logger.debug("Initializing meta database")
             self.conn.execute("PRAGMA busy_timeout = 50000")
-            self.conn.execute("""CREATE TABLE IF NOT EXISTS meta(
+            self.conn.execute(
+                """CREATE TABLE IF NOT EXISTS meta(
                                id INTEGER NOT NULL,
                                version INTEGER NOT NULL,
                                PRIMARY KEY (id)
                                )"""
-                              )
+            )
 
     @property
     def upgrades(self):
@@ -75,7 +88,7 @@ class SakiaDatabase:
             self.add_last_state_change_property,
             self.refactor_transactions,
             self.drop_incorrect_nodes,
-            self.insert_last_mass_attribute
+            self.insert_last_mass_attribute,
         ]
 
     def upgrade_database(self, to=0):
@@ -89,7 +102,9 @@ class SakiaDatabase:
             self._logger.debug("Upgrading to version {0}...".format(v))
             self.upgrades[v]()
             with self.conn:
-                self.conn.execute("UPDATE meta SET version=? WHERE id=1", (version + 1,))
+                self.conn.execute(
+                    "UPDATE meta SET version=? WHERE id=1", (version + 1,)
+                )
             version += 1
         self._logger.debug("End upgrade of database...")
 
@@ -99,7 +114,7 @@ class SakiaDatabase:
         :return:
         """
         self._logger.debug("Initialiazing all databases")
-        sql_file = open(os.path.join(os.path.dirname(__file__), 'meta.sql'), 'r')
+        sql_file = open(os.path.join(os.path.dirname(__file__), "meta.sql"), "r")
         with self.conn:
             self.conn.executescript(sql_file.read())
 
@@ -109,7 +124,10 @@ class SakiaDatabase:
         :return:
         """
         self._logger.debug("Add ud rythm parameters to blockchains table")
-        sql_file = open(os.path.join(os.path.dirname(__file__), '000_add_ud_rythm_parameters.sql'), 'r')
+        sql_file = open(
+            os.path.join(os.path.dirname(__file__), "000_add_ud_rythm_parameters.sql"),
+            "r",
+        )
         with self.conn:
             self.conn.executescript(sql_file.read())
 
@@ -119,7 +137,9 @@ class SakiaDatabase:
         :return:
         """
         self._logger.debug("Add contacts table")
-        sql_file = open(os.path.join(os.path.dirname(__file__), '001_add_contacts.sql'), 'r')
+        sql_file = open(
+            os.path.join(os.path.dirname(__file__), "001_add_contacts.sql"), "r"
+        )
         with self.conn:
             self.conn.executescript(sql_file.read())
 
@@ -129,7 +149,9 @@ class SakiaDatabase:
         :return:
         """
         self._logger.debug("Add sentry property")
-        sql_file = open(os.path.join(os.path.dirname(__file__), '002_add_sentry_property.sql'), 'r')
+        sql_file = open(
+            os.path.join(os.path.dirname(__file__), "002_add_sentry_property.sql"), "r"
+        )
         with self.conn:
             self.conn.executescript(sql_file.read())
 
@@ -139,7 +161,12 @@ class SakiaDatabase:
         :return:
         """
         self._logger.debug("Add last state change property")
-        sql_file = open(os.path.join(os.path.dirname(__file__), '003_add_last_state_change_property.sql'), 'r')
+        sql_file = open(
+            os.path.join(
+                os.path.dirname(__file__), "003_add_last_state_change_property.sql"
+            ),
+            "r",
+        )
         with self.conn:
             self.conn.executescript(sql_file.read())
 
@@ -149,7 +176,10 @@ class SakiaDatabase:
         :return:
         """
         self._logger.debug("Refactor transactions")
-        sql_file = open(os.path.join(os.path.dirname(__file__), '004_refactor_transactions.sql'), 'r')
+        sql_file = open(
+            os.path.join(os.path.dirname(__file__), "004_refactor_transactions.sql"),
+            "r",
+        )
         with self.conn:
             self.conn.executescript(sql_file.read())
 
@@ -163,15 +193,21 @@ class SakiaDatabase:
                     Node(*data)
                 except MalformedDocumentError:
                     self._logger.debug("Dropping node {0}".format(data[1]))
-                    self.conn.execute("""DELETE FROM nodes
+                    self.conn.execute(
+                        """DELETE FROM nodes
                                          WHERE
-                                         currency=? AND pubkey=?""", (data[0], data[1]))
+                                         currency=? AND pubkey=?""",
+                        (data[0], data[1]),
+                    )
                 finally:
                     data = c.fetchone()
 
     def insert_last_mass_attribute(self):
         self._logger.debug("Insert last_mass attribute")
-        sql_file = open(os.path.join(os.path.dirname(__file__), '005_add_lass_monetary_mass.sql'), 'r')
+        sql_file = open(
+            os.path.join(os.path.dirname(__file__), "005_add_lass_monetary_mass.sql"),
+            "r",
+        )
         with self.conn:
             self.conn.executescript(sql_file.read())
 
diff --git a/src/sakia/data/repositories/nodes.py b/src/sakia/data/repositories/nodes.py
index d09ff70473178ac1466771f638ed263d96056746..73f698428b956a243ead33a0c42ab2dbc4248c76 100644
--- a/src/sakia/data/repositories/nodes.py
+++ b/src/sakia/data/repositories/nodes.py
@@ -8,6 +8,7 @@ from ..entities import Node
 class NodesRepo:
     """The repository for Communities entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Connection
     _primary_keys = (attr.fields(Node).currency, attr.fields(Node).pubkey)
 
@@ -19,7 +20,7 @@ class NodesRepo:
         node_tuple = attr.astuple(node, tuple_factory=list)
         node_tuple[2] = "\n".join([str(n) for n in node_tuple[2]])
         node_tuple[12] = "\n".join([str(n) for n in node_tuple[12]])
-        values = ",".join(['?'] * len(node_tuple))
+        values = ",".join(["?"] * len(node_tuple))
         self._conn.execute("INSERT INTO nodes VALUES ({0})".format(values), node_tuple)
 
     def update(self, node):
@@ -27,13 +28,20 @@ class NodesRepo:
         Update an existing node in the database
         :param sakia.data.entities.Node node: the node to update
         """
-        updated_fields = attr.astuple(node, tuple_factory=list,
-                                      filter=attr.filters.exclude(*NodesRepo._primary_keys))
+        updated_fields = attr.astuple(
+            node,
+            tuple_factory=list,
+            filter=attr.filters.exclude(*NodesRepo._primary_keys),
+        )
         updated_fields[0] = "\n".join([str(n) for n in updated_fields[0]])
         updated_fields[10] = "\n".join([str(n) for n in updated_fields[9]])
-        where_fields = attr.astuple(node, tuple_factory=list,
-                                    filter=attr.filters.include(*NodesRepo._primary_keys))
-        self._conn.execute("""UPDATE nodes SET
+        where_fields = attr.astuple(
+            node,
+            tuple_factory=list,
+            filter=attr.filters.include(*NodesRepo._primary_keys),
+        )
+        self._conn.execute(
+            """UPDATE nodes SET
                                     endpoints=?,
                                     peer_buid=?,
                                     uid=?,
@@ -51,7 +59,8 @@ class NodesRepo:
                                    WHERE
                                    currency=? AND
                                    pubkey=?""",
-                                   updated_fields + where_fields)
+            updated_fields + where_fields,
+        )
 
     def get_one(self, **search):
         """
@@ -67,7 +76,9 @@ class NodesRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM nodes WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM nodes WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         data = c.fetchone()
@@ -91,7 +102,9 @@ class NodesRepo:
             values.append(value)
 
         if filters:
-            request = "SELECT * FROM nodes WHERE {filters}".format(filters=" AND ".join(filters))
+            request = "SELECT * FROM nodes WHERE {filters}".format(
+                filters=" AND ".join(filters)
+            )
         else:
             request = "SELECT * FROM nodes"
 
@@ -106,86 +119,110 @@ class NodesRepo:
         Drop an existing node from the database
         :param sakia.data.entities.Node node: the node to update
         """
-        where_fields = attr.astuple(node, filter=attr.filters.include(*NodesRepo._primary_keys))
-        self._conn.execute("""DELETE FROM nodes
+        where_fields = attr.astuple(
+            node, filter=attr.filters.include(*NodesRepo._primary_keys)
+        )
+        self._conn.execute(
+            """DELETE FROM nodes
                               WHERE
-                              currency=? AND pubkey=?""", where_fields)
+                              currency=? AND pubkey=?""",
+            where_fields,
+        )
 
     def get_offline_nodes(self, currency):
-        c = self._conn.execute("SELECT * FROM nodes WHERE currency == ? AND state > ?;",
-                               (currency, Node.FAILURE_THRESHOLD))
+        c = self._conn.execute(
+            "SELECT * FROM nodes WHERE currency == ? AND state > ?;",
+            (currency, Node.FAILURE_THRESHOLD),
+        )
         datas = c.fetchall()
         if datas:
             return [Node(*data) for data in datas]
         return []
 
     def get_synced_nodes(self, currency, current_buid):
-        c = self._conn.execute("SELECT * FROM nodes "
-                               "WHERE currency == ? "
-                               "AND state <= ?"
-                               "AND current_buid == ?",
-                               (currency, Node.FAILURE_THRESHOLD, current_buid))
+        c = self._conn.execute(
+            "SELECT * FROM nodes "
+            "WHERE currency == ? "
+            "AND state <= ?"
+            "AND current_buid == ?",
+            (currency, Node.FAILURE_THRESHOLD, current_buid),
+        )
         datas = c.fetchall()
         if datas:
             return [Node(*data) for data in datas]
         return []
 
     def get_synced_members_nodes(self, currency, current_buid):
-        c = self._conn.execute("SELECT * FROM nodes "
-                               "WHERE currency == ? "
-                               "AND state <= ?"
-                               "AND current_buid == ?"
-                               "AND member == 1",
-                               (currency, Node.FAILURE_THRESHOLD, current_buid))
+        c = self._conn.execute(
+            "SELECT * FROM nodes "
+            "WHERE currency == ? "
+            "AND state <= ?"
+            "AND current_buid == ?"
+            "AND member == 1",
+            (currency, Node.FAILURE_THRESHOLD, current_buid),
+        )
         datas = c.fetchall()
         if datas:
             return [Node(*data) for data in datas]
         return []
 
     def get_online_nodes(self, currency):
-        c = self._conn.execute("SELECT * FROM nodes WHERE currency == ? AND state <= ?;",
-                               (currency, Node.FAILURE_THRESHOLD))
+        c = self._conn.execute(
+            "SELECT * FROM nodes WHERE currency == ? AND state <= ?;",
+            (currency, Node.FAILURE_THRESHOLD),
+        )
         datas = c.fetchall()
         if datas:
             return [Node(*data) for data in datas]
         return []
 
     def get_offline_synced_nodes(self, currency, current_buid):
-        c = self._conn.execute("SELECT * FROM nodes "
-                               "WHERE currency == ? "
-                               "AND state > ?"
-                               "AND current_buid == ?",
-                               (currency, Node.FAILURE_THRESHOLD, current_buid))
+        c = self._conn.execute(
+            "SELECT * FROM nodes "
+            "WHERE currency == ? "
+            "AND state > ?"
+            "AND current_buid == ?",
+            (currency, Node.FAILURE_THRESHOLD, current_buid),
+        )
         datas = c.fetchall()
         if datas:
             return [Node(*data) for data in datas]
         return []
 
     def current_buid(self, currency):
-        c = self._conn.execute("""SELECT COUNT(`uid`)
+        c = self._conn.execute(
+            """SELECT COUNT(`uid`)
         FROM `nodes`
         WHERE member == 1 AND currency == ?
-        LIMIT 1;""", (currency,))
+        LIMIT 1;""",
+            (currency,),
+        )
         data = c.fetchone()
         if data and data[0] > 3:
-            c = self._conn.execute("""SELECT `current_buid`,
+            c = self._conn.execute(
+                """SELECT `current_buid`,
                  COUNT(`current_buid`) AS `value_occurrence`
         FROM     `nodes`
         WHERE member == 1 AND currency == ?
         GROUP BY `current_buid`
         ORDER BY `value_occurrence` DESC
-        LIMIT    1;""", (currency,))
+        LIMIT    1;""",
+                (currency,),
+            )
             data = c.fetchone()
             if data:
                 return block_uid(data[0])
         else:
-            c = self._conn.execute("""SELECT `current_buid`,
+            c = self._conn.execute(
+                """SELECT `current_buid`,
              COUNT(`current_buid`) AS `value_occurrence`
     FROM     `nodes`
     WHERE currency == ?
     GROUP BY `current_buid`
     ORDER BY `value_occurrence` DESC
-    LIMIT    1;""", (currency,))
+    LIMIT    1;""",
+                (currency,),
+            )
             data = c.fetchone()
             if data:
                 return block_uid(data[0])
diff --git a/src/sakia/data/repositories/sources.py b/src/sakia/data/repositories/sources.py
index 5b346e965aa6bbbc59d078ea330fdc8447e4e70c..554c89d151b88db3e43c4759ebb14d8cafe99770 100644
--- a/src/sakia/data/repositories/sources.py
+++ b/src/sakia/data/repositories/sources.py
@@ -7,8 +7,14 @@ from ..entities import Source
 class SourcesRepo:
     """The repository for Communities entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Connection
-    _primary_keys = (attr.fields(Source).currency, attr.fields(Source).pubkey, attr.fields(Source).identifier, attr.fields(Source).noffset)
+    _primary_keys = (
+        attr.fields(Source).currency,
+        attr.fields(Source).pubkey,
+        attr.fields(Source).identifier,
+        attr.fields(Source).noffset,
+    )
 
     def insert(self, source):
         """
@@ -16,8 +22,10 @@ class SourcesRepo:
         :param sakia.data.entities.Source source: the source to commit
         """
         source_tuple = attr.astuple(source)
-        values = ",".join(['?'] * len(source_tuple))
-        self._conn.execute("INSERT INTO sources VALUES ({0})".format(values), source_tuple)
+        values = ",".join(["?"] * len(source_tuple))
+        self._conn.execute(
+            "INSERT INTO sources VALUES ({0})".format(values), source_tuple
+        )
 
     def get_one(self, **search):
         """
@@ -31,7 +39,9 @@ class SourcesRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM sources WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM sources WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         data = c.fetchone()
@@ -51,7 +61,9 @@ class SourcesRepo:
             filters.append("{key} = ?".format(key=k))
             values.append(value)
 
-        request = "SELECT * FROM sources WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM sources WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         datas = c.fetchall()
@@ -64,13 +76,18 @@ class SourcesRepo:
         Drop an existing source from the database
         :param sakia.data.entities.Source source: the source to update
         """
-        where_fields = attr.astuple(source, filter=attr.filters.include(*SourcesRepo._primary_keys))
-        self._conn.execute("""DELETE FROM sources
+        where_fields = attr.astuple(
+            source, filter=attr.filters.include(*SourcesRepo._primary_keys)
+        )
+        self._conn.execute(
+            """DELETE FROM sources
                               WHERE
                               currency=? AND
                               pubkey=? AND
                               identifier=? AND
-                              noffset=?""", where_fields)
+                              noffset=?""",
+            where_fields,
+        )
 
     def drop_all(self, **filter):
         filters = []
@@ -80,5 +97,7 @@ class SourcesRepo:
             filters.append("{key} = ?".format(key=k))
             values.append(value)
 
-        request = "DELETE FROM sources WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "DELETE FROM sources WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
         self._conn.execute(request, tuple(values))
diff --git a/src/sakia/data/repositories/transactions.py b/src/sakia/data/repositories/transactions.py
index 5607f770f0acc613364c5418b3fd6f073a39f7fa..04ba645b34d3f201029be53a3bd296923c224d18 100644
--- a/src/sakia/data/repositories/transactions.py
+++ b/src/sakia/data/repositories/transactions.py
@@ -7,8 +7,13 @@ from ..entities import Transaction, Dividend
 class TransactionsRepo:
     """The repository for Communities entities.
     """
+
     _conn = attr.ib()  # :type sqlite3.Connection
-    _primary_keys = (attr.fields(Transaction).currency, attr.fields(Transaction).pubkey, attr.fields(Transaction).sha_hash,)
+    _primary_keys = (
+        attr.fields(Transaction).currency,
+        attr.fields(Transaction).pubkey,
+        attr.fields(Transaction).sha_hash,
+    )
 
     def insert(self, transaction):
         """
@@ -21,23 +26,32 @@ class TransactionsRepo:
         transaction_tuple[7] = "\n".join([str(n) for n in transaction_tuple[7]])
         transaction_tuple[8] = "\n".join([str(n) for n in transaction_tuple[8]])
 
-        values = ",".join(['?'] * len(transaction_tuple))
-        self._conn.execute("INSERT INTO transactions VALUES ({0})".format(values), transaction_tuple)
+        values = ",".join(["?"] * len(transaction_tuple))
+        self._conn.execute(
+            "INSERT INTO transactions VALUES ({0})".format(values), transaction_tuple
+        )
 
     def update(self, transaction):
         """
         Update an existing transaction in the database
         :param sakia.data.entities.Transaction transaction: the transaction to update
         """
-        updated_fields = attr.astuple(transaction, filter=attr.filters.exclude(*TransactionsRepo._primary_keys),
-                                      tuple_factory=list)
+        updated_fields = attr.astuple(
+            transaction,
+            filter=attr.filters.exclude(*TransactionsRepo._primary_keys),
+            tuple_factory=list,
+        )
         updated_fields[3] = "\n".join([str(n) for n in updated_fields[3]])
         updated_fields[4] = "\n".join([str(n) for n in updated_fields[4]])
         updated_fields[5] = "\n".join([str(n) for n in updated_fields[5]])
 
-        where_fields = attr.astuple(transaction, filter=attr.filters.include(*TransactionsRepo._primary_keys),
-                                    tuple_factory=list)
-        self._conn.execute("""UPDATE transactions SET
+        where_fields = attr.astuple(
+            transaction,
+            filter=attr.filters.include(*TransactionsRepo._primary_keys),
+            tuple_factory=list,
+        )
+        self._conn.execute(
+            """UPDATE transactions SET
                            written_on=?,
                            blockstamp=?,
                            ts=?,
@@ -55,7 +69,8 @@ class TransactionsRepo:
                            currency=? AND
                            pubkey=? AND
                            sha_hash=?""",
-                           updated_fields + where_fields)
+            updated_fields + where_fields,
+        )
 
     def get_one(self, **search):
         """
@@ -69,7 +84,9 @@ class TransactionsRepo:
             filters.append("{k}=?".format(k=k))
             values.append(v)
 
-        request = "SELECT * FROM transactions WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM transactions WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         data = c.fetchone()
@@ -89,7 +106,9 @@ class TransactionsRepo:
             filters.append("{key} = ?".format(key=k))
             values.append(value)
 
-        request = "SELECT * FROM transactions WHERE {filters}".format(filters=" AND ".join(filters))
+        request = "SELECT * FROM transactions WHERE {filters}".format(
+            filters=" AND ".join(filters)
+        )
 
         c = self._conn.execute(request, tuple(values))
         datas = c.fetchall()
@@ -97,7 +116,15 @@ class TransactionsRepo:
             return [Transaction(*data) for data in datas]
         return []
 
-    def get_transfers(self, currency, pubkey, offset=0, limit=1000, sort_by="currency", sort_order="ASC"):
+    def get_transfers(
+        self,
+        currency,
+        pubkey,
+        offset=0,
+        limit=1000,
+        sort_by="currency",
+        sort_order="ASC",
+    ):
         """
         Get all transfers in the database on a given currency from or to a pubkey
 
@@ -107,12 +134,9 @@ class TransactionsRepo:
         request = """SELECT * FROM transactions
                   WHERE currency=? AND pubkey=?
                   ORDER BY {sort_by} {sort_order}
-                  LIMIT {limit} OFFSET {offset}""" \
-                    .format(offset=offset,
-                            limit=limit,
-                            sort_by=sort_by,
-                            sort_order=sort_order
-                            )
+                  LIMIT {limit} OFFSET {offset}""".format(
+            offset=offset, limit=limit, sort_by=sort_by, sort_order=sort_order
+        )
         c = self._conn.execute(request, (currency, pubkey))
         datas = c.fetchall()
         if datas:
@@ -124,9 +148,14 @@ class TransactionsRepo:
         Drop an existing transaction from the database
         :param sakia.data.entities.Transaction transaction: the transaction to update
         """
-        where_fields = attr.astuple(transaction, filter=attr.filters.include(*TransactionsRepo._primary_keys))
-        self._conn.execute("""DELETE FROM transactions
+        where_fields = attr.astuple(
+            transaction, filter=attr.filters.include(*TransactionsRepo._primary_keys)
+        )
+        self._conn.execute(
+            """DELETE FROM transactions
                               WHERE
                               currency=? AND
                               pubkey=? AND
-                              sha_hash=?""", where_fields)
+                              sha_hash=?""",
+            where_fields,
+        )
diff --git a/src/sakia/decorators.py b/src/sakia/decorators.py
index f9dc5f2103c04299d0d010141f8ab759f13d8c5e..1d5e6bff1fa1b8d1f44d16a0b224accea3494c24 100644
--- a/src/sakia/decorators.py
+++ b/src/sakia/decorators.py
@@ -19,9 +19,11 @@ def once_at_a_time(fn):
                 func_call = args[0].__tasks[fn.__name__]
                 args[0].__tasks.pop(fn.__name__)
                 if getattr(func_call, "_next_task", None):
-                    start_task(func_call._next_task[0],
-                               *func_call._next_task[1],
-                               **func_call._next_task[2])
+                    start_task(
+                        func_call._next_task[0],
+                        *func_call._next_task[1],
+                        **func_call._next_task[2]
+                    )
             except KeyError:
                 logging.debug("Task {0} already removed".format(fn.__name__))
 
@@ -39,6 +41,7 @@ def once_at_a_time(fn):
             start_task(fn, *args, **kwargs)
 
         return args[0].__tasks[fn.__name__]
+
     return wrapper
 
 
@@ -49,6 +52,7 @@ def asyncify(fn):
     :return: the task
     :rtype: asyncio.Task
     """
+
     @functools.wraps(fn)
     def wrapper(*args, **kwargs):
         return asyncio.ensure_future(asyncio.coroutine(fn)(*args, **kwargs))
diff --git a/src/sakia/errors.py b/src/sakia/errors.py
index 801e47dc5764ae7167520f919eb3383debe150ba..1335791e03d50ce537d7b7e144d78c16b71e843d 100644
--- a/src/sakia/errors.py
+++ b/src/sakia/errors.py
@@ -6,7 +6,6 @@ Created on 9 févr. 2014
 
 
 class Error(Exception):
-
     def __init__(self, message):
         """
         Constructor
@@ -28,12 +27,11 @@ class NotEnoughChangeError(Error):
         """
         Constructor
         """
-        super() .__init__(
-            "Only {0} {1} available in {2} sources, needs {3}"
-            .format(available,
-                    currency,
-                    nb_inputs,
-                    requested))
+        super().__init__(
+            "Only {0} {1} available in {2} sources, needs {3}".format(
+                available, currency, nb_inputs, requested
+            )
+        )
 
 
 class NoPeerAvailable(Error):
@@ -41,23 +39,29 @@ class NoPeerAvailable(Error):
     Exception raised when a community doesn't have any
     peer available.
     """
+
     def __init__(self, currency, nbpeers):
         """
         Constructor
         """
-        super() .__init__(
-            "No peer answered in {0} community ({1} peers available)"
-            .format(currency, nbpeers))
+        super().__init__(
+            "No peer answered in {0} community ({1} peers available)".format(
+                currency, nbpeers
+            )
+        )
 
 
 class InvalidNodeCurrency(Error):
     """
     Exception raised when a node doesn't use the intended currency
     """
+
     def __init__(self, currency, node_currency):
         """
         Constructor
         """
-        super() .__init__(
-            "Node is working for {0} currency, but should be {1}"
-            .format(node_currency, currency))
+        super().__init__(
+            "Node is working for {0} currency, but should be {1}".format(
+                node_currency, currency
+            )
+        )
diff --git a/src/sakia/gui/__init__.py b/src/sakia/gui/__init__.py
index 3d5bba2e32c7b314ba23fc09e9d0566c0319d4c8..dede1b6c914abc7c5d98b18488b7632ee779cd67 100644
--- a/src/sakia/gui/__init__.py
+++ b/src/sakia/gui/__init__.py
@@ -3,4 +3,4 @@ Created on 11 mars 2014
 
 @author: inso
 """
-from PyQt5 import QtSvg
\ No newline at end of file
+from PyQt5 import QtSvg
diff --git a/src/sakia/gui/dialogs/connection_cfg/__init__.py b/src/sakia/gui/dialogs/connection_cfg/__init__.py
index 28a47ef45ea3b576216d2009ecd3fd877d27b4f0..6a8bc758e5238b8aaf5d849c76b0ac6a69733b9e 100644
--- a/src/sakia/gui/dialogs/connection_cfg/__init__.py
+++ b/src/sakia/gui/dialogs/connection_cfg/__init__.py
@@ -1 +1 @@
-from .controller import ConnectionConfigController
\ No newline at end of file
+from .controller import ConnectionConfigController
diff --git a/src/sakia/gui/dialogs/connection_cfg/controller.py b/src/sakia/gui/dialogs/connection_cfg/controller.py
index 3771100975c9cee0d97490ffd4beb23d9806064c..3fb9fc391457705dfb93f381ee64d72d26a86c19 100644
--- a/src/sakia/gui/dialogs/connection_cfg/controller.py
+++ b/src/sakia/gui/dialogs/connection_cfg/controller.py
@@ -43,16 +43,24 @@ class ConnectionConfigController(QObject):
         self.step_licence = asyncio.Future()
         self.step_key = asyncio.Future()
         self.view.button_connect.clicked.connect(
-            lambda: self.step_node.set_result(ConnectionConfigController.CONNECT))
+            lambda: self.step_node.set_result(ConnectionConfigController.CONNECT)
+        )
         self.view.button_register.clicked.connect(
-            lambda: self.step_node.set_result(ConnectionConfigController.REGISTER))
+            lambda: self.step_node.set_result(ConnectionConfigController.REGISTER)
+        )
         self.view.button_wallet.clicked.connect(
-            lambda: self.step_node.set_result(ConnectionConfigController.WALLET))
+            lambda: self.step_node.set_result(ConnectionConfigController.WALLET)
+        )
         self.view.button_pubkey.clicked.connect(
-            lambda: self.step_node.set_result(ConnectionConfigController.PUBKEY))
-        self.view.values_changed.connect(lambda: self.view.button_next.setEnabled(self.check_key()))
-        self.view.values_changed.connect(lambda: self.view.button_generate.setEnabled(self.check_key()))
-        self._logger = logging.getLogger('sakia')
+            lambda: self.step_node.set_result(ConnectionConfigController.PUBKEY)
+        )
+        self.view.values_changed.connect(
+            lambda: self.view.button_next.setEnabled(self.check_key())
+        )
+        self.view.values_changed.connect(
+            lambda: self.view.button_generate.setEnabled(self.check_key())
+        )
+        self._logger = logging.getLogger("sakia")
 
     @classmethod
     def create(cls, parent, app):
@@ -64,8 +72,9 @@ class ConnectionConfigController(QObject):
         :rtype: AccountConfigController
         """
         view = ConnectionConfigView(parent.view if parent else None)
-        model = ConnectionConfigModel(None, app, None,
-                                      IdentitiesProcessor.instanciate(app))
+        model = ConnectionConfigModel(
+            None, app, None, IdentitiesProcessor.instanciate(app)
+        )
         account_cfg = cls(parent, view, model)
         model.setParent(account_cfg)
         view.set_license(app.currency)
@@ -118,17 +127,28 @@ class ConnectionConfigController(QObject):
                     self.view.button_connect.setEnabled(False)
                     self.view.button_register.setEnabled(False)
                     await self.model.create_connection()
-                except (ClientError, MalformedDocumentError, ValueError, TimeoutError) as e:
+                except (
+                    ClientError,
+                    MalformedDocumentError,
+                    ValueError,
+                    TimeoutError,
+                ) as e:
                     self._logger.debug(str(e))
-                    self.view.display_info(self.tr("Could not connect. Check hostname, ip address or port : <br/>"
-                                                   + str(e)))
+                    self.view.display_info(
+                        self.tr(
+                            "Could not connect. Check hostname, ip address or port : <br/>"
+                            + str(e)
+                        )
+                    )
                     self.step_node = asyncio.Future()
                     self.view.button_connect.setEnabled(True)
                     self.view.button_register.setEnabled(True)
 
         self._logger.debug("Licence step")
         self.view.stacked_pages.setCurrentWidget(self.view.page_licence)
-        self.view.button_accept.clicked.connect(lambda: self.step_licence.set_result(True))
+        self.view.button_accept.clicked.connect(
+            lambda: self.step_licence.set_result(True)
+        )
         await self.step_licence
         self.view.button_accept.disconnect()
         self._logger.debug("Key step")
@@ -163,7 +183,9 @@ class ConnectionConfigController(QObject):
             self.view.button_next.setText(self.tr("Next"))
             self.view.button_next.clicked.connect(self.check_pubkey)
             if not self.view.label_action.text().endswith(self.tr(" (Optional)")):
-                self.view.label_action.setText(self.view.label_action.text() + self.tr(" (Optional)"))
+                self.view.label_action.setText(
+                    self.view.label_action.text() + self.tr(" (Optional)")
+                )
             self.view.groupbox_key.hide()
             self.view.stacked_pages.setCurrentWidget(self.view.page_connection)
             connection_identity = await self.step_key
@@ -183,37 +205,53 @@ class ConnectionConfigController(QObject):
 
             self.view.set_step(1)
 
-            if self.mode in (ConnectionConfigController.REGISTER,
-                             ConnectionConfigController.CONNECT,
-                             ConnectionConfigController.PUBKEY) and connection_identity:
+            if (
+                self.mode
+                in (
+                    ConnectionConfigController.REGISTER,
+                    ConnectionConfigController.CONNECT,
+                    ConnectionConfigController.PUBKEY,
+                )
+                and connection_identity
+            ):
                 self.view.stream_log("Saving identity...")
                 self.model.connection.blockstamp = connection_identity.blockstamp
                 self.model.insert_or_update_connection()
                 self.model.insert_or_update_identity(connection_identity)
                 self.view.stream_log("Initializing identity informations...")
-                await self.model.initialize_identity(connection_identity,
-                                                     log_stream=self.view.stream_log,
-                                                     progress=self.view.progress)
+                await self.model.initialize_identity(
+                    connection_identity,
+                    log_stream=self.view.stream_log,
+                    progress=self.view.progress,
+                )
                 self.view.stream_log("Initializing certifications informations...")
                 self.view.set_step(2)
-                await self.model.initialize_certifications(connection_identity,
-                                                           log_stream=self.view.stream_log,
-                                                           progress=self.view.progress)
+                await self.model.initialize_certifications(
+                    connection_identity,
+                    log_stream=self.view.stream_log,
+                    progress=self.view.progress,
+                )
 
             self.view.set_step(3)
             self.view.stream_log("Initializing transactions history...")
-            transactions = await self.model.initialize_transactions(self.model.connection,
-                                                                    log_stream=self.view.stream_log,
-                                                                    progress=self.view.progress)
+            transactions = await self.model.initialize_transactions(
+                self.model.connection,
+                log_stream=self.view.stream_log,
+                progress=self.view.progress,
+            )
             self.view.set_step(4)
             self.view.stream_log("Initializing dividends history...")
-            dividends = await self.model.initialize_dividends(self.model.connection, transactions,
-                                                              log_stream=self.view.stream_log,
-                                                              progress=self.view.progress)
+            dividends = await self.model.initialize_dividends(
+                self.model.connection,
+                transactions,
+                log_stream=self.view.stream_log,
+                progress=self.view.progress,
+            )
 
             self.view.set_step(5)
-            await self.model.initialize_sources(log_stream=self.view.stream_log,
-                                                progress=self.view.progress)
+            await self.model.initialize_sources(
+                log_stream=self.view.stream_log, progress=self.view.progress
+            )
 
             self.view.set_step(6)
             self._logger.debug("Validate changes")
@@ -221,7 +259,9 @@ class ConnectionConfigController(QObject):
             self.model.app.db.commit()
 
             if self.mode == ConnectionConfigController.REGISTER:
-                await self.view.show_register_message(self.model.blockchain_parameters())
+                await self.view.show_register_message(
+                    self.model.blockchain_parameters()
+                )
         except (NoPeerAvailable, DuniterError, StopIteration) as e:
             if not isinstance(e, StopIteration):
                 self.view.show_error(self.model.notification(), str(e))
@@ -245,28 +285,30 @@ class ConnectionConfigController(QObject):
                 self.view.label_info.setText(self.tr("Forbidden : pubkey is too long"))
                 return False
         else:
-            if self.view.edit_password.text() != \
-                    self.view.edit_password_repeat.text():
+            if self.view.edit_password.text() != self.view.edit_password_repeat.text():
                 self.view.label_info.setText(self.tr("Error : passwords are different"))
                 return False
 
-            if self.view.edit_salt.text() != \
-                    self.view.edit_salt_bis.text():
-                self.view.label_info.setText(self.tr("Error : secret keys are different"))
+            if self.view.edit_salt.text() != self.view.edit_salt_bis.text():
+                self.view.label_info.setText(
+                    self.tr("Error : secret keys are different")
+                )
                 return False
 
             if detect_non_printable(self.view.edit_salt.text()):
-                self.view.label_info.setText(self.tr("Forbidden : Invalid characters in salt field"))
+                self.view.label_info.setText(
+                    self.tr("Forbidden : Invalid characters in salt field")
+                )
                 return False
 
             if detect_non_printable(self.view.edit_password.text()):
                 self.view.label_info.setText(
-                    self.tr("Forbidden : Invalid characters in password field"))
+                    self.tr("Forbidden : Invalid characters in password field")
+                )
                 return False
 
             if self.model.app.parameters.expert_mode:
-                self.view.label_info.setText(
-                    self.tr(""))
+                self.view.label_info.setText(self.tr(""))
                 return True
 
             if len(self.view.edit_salt.text()) < 6:
@@ -274,7 +316,9 @@ class ConnectionConfigController(QObject):
                 return False
 
             if len(self.view.edit_password.text()) < 6:
-                self.view.label_info.setText(self.tr("Forbidden : password is too short"))
+                self.view.label_info.setText(
+                    self.tr("Forbidden : password is too short")
+                )
                 return False
 
         self.view.label_info.setText("")
@@ -283,19 +327,29 @@ class ConnectionConfigController(QObject):
     async def action_save_revocation(self):
         raw_document, identity = self.model.generate_revocation()
         # Testable way of using a QFileDialog
-        selected_files = await QAsyncFileDialog.get_save_filename(self.view, self.tr("Save a revocation document"),
-                                                                  "", self.tr("All text files (*.txt)"))
+        selected_files = await QAsyncFileDialog.get_save_filename(
+            self.view,
+            self.tr("Save a revocation document"),
+            "",
+            self.tr("All text files (*.txt)"),
+        )
         if selected_files:
             path = selected_files[0]
-            if not path.endswith('.txt'):
+            if not path.endswith(".txt"):
                 path = "{0}.txt".format(path)
-            with open(path, 'w') as save_file:
+            with open(path, "w") as save_file:
                 save_file.write(raw_document)
 
-            dialog = QMessageBox(QMessageBox.Information, self.tr("Revokation file"),
-                                 self.tr("""<div>Your revocation document has been saved.</div>
+            dialog = QMessageBox(
+                QMessageBox.Information,
+                self.tr("Revokation file"),
+                self.tr(
+                    """<div>Your revocation document has been saved.</div>
 <div><b>Please keep it in a safe place.</b></div>
-The publication of this document will remove your identity from the network.</p>"""), QMessageBox.Ok)
+The publication of this document will remove your identity from the network.</p>"""
+                ),
+                QMessageBox.Ok,
+            )
             dialog.setTextFormat(Qt.RichText)
             return True, identity
         return False, identity
@@ -314,10 +368,18 @@ The publication of this document will remove your identity from the network.</p>
                     self.view.button_register.setEnabled(True)
                     if self.view.edit_uid.text():
                         if registered[0] is False and registered[2] is None:
-                            self.view.display_info(self.tr("Could not find your identity on the network."))
+                            self.view.display_info(
+                                self.tr("Could not find your identity on the network.")
+                            )
                         elif registered[0] is False and registered[2]:
-                            self.view.display_info(self.tr("""Your pubkey or UID is different on the network.
-Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
+                            self.view.display_info(
+                                self.tr(
+                                    """Your pubkey or UID is different on the network.
+Yours : {0}, the network : {1}""".format(
+                                        registered[1], registered[2]
+                                    )
+                                )
+                            )
                         else:
                             self.step_key.set_result(found_identity)
                     else:
@@ -328,10 +390,14 @@ Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
                 except NoPeerAvailable as e:
                     self.view.display_info(str(e))
             else:
-                self.view.display_info(self.tr("A connection already exists using this key."))
+                self.view.display_info(
+                    self.tr("A connection already exists using this key.")
+                )
 
         except NoPeerAvailable:
-            self.config_dialog.label_error.setText(self.tr("Could not connect. Check node peering entry"))
+            self.config_dialog.label_error.setText(
+                self.tr("Could not connect. Check node peering entry")
+            )
 
     @asyncify
     async def check_wallet(self, checked=False):
@@ -350,17 +416,27 @@ Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
                     if registered[0] is False and registered[2] is None:
                         self.step_key.set_result(None)
                     elif registered[2]:
-                        self.view.display_info(self.tr("""Your pubkey is associated to an identity.
-Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
+                        self.view.display_info(
+                            self.tr(
+                                """Your pubkey is associated to an identity.
+Yours : {0}, the network : {1}""".format(
+                                    registered[1], registered[2]
+                                )
+                            )
+                        )
                 except DuniterError as e:
                     self.view.display_info(e.message)
                 except NoPeerAvailable as e:
                     self.view.display_info(str(e))
             else:
-                self.view.display_info(self.tr("A connection already exists using this key."))
+                self.view.display_info(
+                    self.tr("A connection already exists using this key.")
+                )
 
         except NoPeerAvailable:
-            self.config_dialog.label_error.setText(self.tr("Could not connect. Check node peering entry"))
+            self.config_dialog.label_error.setText(
+                self.tr("Could not connect. Check node peering entry")
+            )
 
     @asyncify
     async def check_connect(self, checked=False):
@@ -377,10 +453,18 @@ Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
                     self.view.button_connect.setEnabled(True)
                     self.view.button_register.setEnabled(True)
                     if registered[0] is False and registered[2] is None:
-                        self.view.display_info(self.tr("Could not find your identity on the network."))
+                        self.view.display_info(
+                            self.tr("Could not find your identity on the network.")
+                        )
                     elif registered[0] is False and registered[2]:
-                        self.view.display_info(self.tr("""Your pubkey or UID is different on the network.
-        Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
+                        self.view.display_info(
+                            self.tr(
+                                """Your pubkey or UID is different on the network.
+        Yours : {0}, the network : {1}""".format(
+                                    registered[1], registered[2]
+                                )
+                            )
+                        )
                     else:
                         self.step_key.set_result(found_identity)
                 except DuniterError as e:
@@ -388,10 +472,14 @@ Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
                 except NoPeerAvailable as e:
                     self.view.display_info(str(e))
             else:
-                self.view.display_info(self.tr("A connection already exists using this key."))
+                self.view.display_info(
+                    self.tr("A connection already exists using this key.")
+                )
 
         except NoPeerAvailable:
-            self.config_dialog.label_error.setText(self.tr("Could not connect. Check node peering entry"))
+            self.config_dialog.label_error.setText(
+                self.tr("Could not connect. Check node peering entry")
+            )
 
     @asyncify
     async def check_register(self, checked=False):
@@ -410,20 +498,34 @@ Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
                         if result:
                             self.step_key.set_result(identity)
                         else:
-                            self.view.display_info("Saving your revocation document on your disk is mandatory.")
+                            self.view.display_info(
+                                "Saving your revocation document on your disk is mandatory."
+                            )
                     elif registered[0] is False and registered[2]:
-                        self.view.display_info(self.tr("""Your pubkey or UID was already found on the network.
-        Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
+                        self.view.display_info(
+                            self.tr(
+                                """Your pubkey or UID was already found on the network.
+        Yours : {0}, the network : {1}""".format(
+                                    registered[1], registered[2]
+                                )
+                            )
+                        )
                     else:
-                        self.view.display_info("Your account already exists on the network")
+                        self.view.display_info(
+                            "Your account already exists on the network"
+                        )
                 except DuniterError as e:
                     self.view.display_info(e.message)
                 except NoPeerAvailable as e:
                     self.view.display_info(str(e))
             else:
-                self.view.display_info(self.tr("A connection already exists using this key."))
+                self.view.display_info(
+                    self.tr("A connection already exists using this key.")
+                )
         except NoPeerAvailable:
-            self.view.display_info(self.tr("Could not connect. Check node peering entry"))
+            self.view.display_info(
+                self.tr("Could not connect. Check node peering entry")
+            )
 
     @asyncify
     async def accept(self):
@@ -436,4 +538,4 @@ Yours : {0}, the network : {1}""".format(registered[1], registered[2])))
         return future
 
     def exec(self):
-        return self.view.exec()
\ No newline at end of file
+        return self.view.exec()
diff --git a/src/sakia/gui/dialogs/connection_cfg/model.py b/src/sakia/gui/dialogs/connection_cfg/model.py
index 081e584cdbf14b6dfffadd36cc1c9d89aefc155e..9d8e8c734ac0f8f53b50be1e998d481b9744e700 100644
--- a/src/sakia/gui/dialogs/connection_cfg/model.py
+++ b/src/sakia/gui/dialogs/connection_cfg/model.py
@@ -2,8 +2,14 @@ import aiohttp
 from PyQt5.QtCore import QObject
 from duniterpy.key import SigningKey
 from sakia.data.entities import Connection
-from sakia.data.processors import ConnectionsProcessor, BlockchainProcessor, \
-    SourcesProcessor, TransactionsProcessor, DividendsProcessor, IdentitiesProcessor
+from sakia.data.processors import (
+    ConnectionsProcessor,
+    BlockchainProcessor,
+    SourcesProcessor,
+    TransactionsProcessor,
+    DividendsProcessor,
+    IdentitiesProcessor,
+)
 
 
 class ConnectionConfigModel(QObject):
@@ -11,7 +17,9 @@ class ConnectionConfigModel(QObject):
     The model of AccountConfig component
     """
 
-    def __init__(self, parent, app, connection, identities_processor, node_connector=None):
+    def __init__(
+        self, parent, app, connection, identities_processor, node_connector=None
+    ):
         """
 
         :param sakia.gui.dialogs.account_cfg.controller.AccountConfigController parent:
@@ -40,7 +48,9 @@ class ConnectionConfigModel(QObject):
         self.connection.scrypt_r = scrypt_params.r
         self.connection.scrypt_p = scrypt_params.p
         self.connection.password = password
-        self.connection.pubkey = SigningKey(self.connection.salt, password, scrypt_params).pubkey
+        self.connection.pubkey = SigningKey(
+            self.connection.salt, password, scrypt_params
+        ).pubkey
 
     def set_pubkey(self, pubkey, scrypt_params):
         self.connection.salt = ""
@@ -51,15 +61,17 @@ class ConnectionConfigModel(QObject):
         self.connection.pubkey = pubkey
 
     def insert_or_update_connection(self):
-        ConnectionsProcessor(self.app.db.connections_repo).commit_connection(self.connection)
+        ConnectionsProcessor(self.app.db.connections_repo).commit_connection(
+            self.connection
+        )
 
     def insert_or_update_identity(self, identity):
         self.identities_processor.insert_or_update_identity(identity)
 
     def generate_revocation(self):
-        return self.app.documents_service.generate_revocation(self.connection,
-                                                              self.connection.salt,
-                                                              self.connection.password)
+        return self.app.documents_service.generate_revocation(
+            self.connection, self.connection.salt, self.connection.password
+        )
 
     def generate_identity(self):
         return self.app.documents_service.generate_identity(self.connection)
@@ -81,7 +93,9 @@ class ConnectionConfigModel(QObject):
         :return:
         """
         log_stream("Parsing sources...")
-        await self.app.sources_service.initialize_sources(self.connection.pubkey, log_stream, progress)
+        await self.app.sources_service.initialize_sources(
+            self.connection.pubkey, log_stream, progress
+        )
         log_stream("Sources parsed succefully !")
 
     async def initialize_identity(self, identity, log_stream, progress):
@@ -91,7 +105,9 @@ class ConnectionConfigModel(QObject):
         :param function log_stream: a method to log data in the screen
         :return:
         """
-        await self.identities_processor.initialize_identity(identity, log_stream, progress)
+        await self.identities_processor.initialize_identity(
+            identity, log_stream, progress
+        )
 
     async def initialize_certifications(self, identity, log_stream, progress):
         """
@@ -100,7 +116,9 @@ class ConnectionConfigModel(QObject):
         :param function log_stream: a method to log data in the screen
         :return:
         """
-        await self.app.identities_service.initialize_certifications(identity, log_stream, progress)
+        await self.app.identities_service.initialize_certifications(
+            identity, log_stream, progress
+        )
 
     async def initialize_transactions(self, identity, log_stream, progress):
         """
@@ -110,7 +128,9 @@ class ConnectionConfigModel(QObject):
         :return:
         """
         transactions_processor = TransactionsProcessor.instanciate(self.app)
-        return await transactions_processor.initialize_transactions(identity, log_stream, progress)
+        return await transactions_processor.initialize_transactions(
+            identity, log_stream, progress
+        )
 
     async def initialize_dividends(self, identity, transactions, log_stream, progress):
         """
@@ -121,13 +141,17 @@ class ConnectionConfigModel(QObject):
         :return:
         """
         dividends_processor = DividendsProcessor.instanciate(self.app)
-        return await dividends_processor.initialize_dividends(identity, transactions, log_stream, progress)
+        return await dividends_processor.initialize_dividends(
+            identity, transactions, log_stream, progress
+        )
 
     async def publish_selfcert(self, identity):
         """"
         Publish the self certification of the connection identity
         """
-        result = await self.app.documents_service.broadcast_identity(self.connection, identity.document())
+        result = await self.app.documents_service.broadcast_identity(
+            self.connection, identity.document()
+        )
         return result
 
     async def check_registered(self):
@@ -135,7 +159,10 @@ class ConnectionConfigModel(QObject):
         return await identities_processor.check_registered(self.connection)
 
     def key_exists(self):
-        return self.connection.pubkey in ConnectionsProcessor.instanciate(self.app).pubkeys()
+        return (
+            self.connection.pubkey
+            in ConnectionsProcessor.instanciate(self.app).pubkeys()
+        )
 
     def blockchain_parameters(self):
         blockchain_processor = BlockchainProcessor.instanciate(self.app)
diff --git a/src/sakia/gui/dialogs/connection_cfg/view.py b/src/sakia/gui/dialogs/connection_cfg/view.py
index bd76efd0dd6ed74934d823233ff9fe698b11c6d2..a84efe1711f9eab0c22e181f9f720b38865ef0a7 100644
--- a/src/sakia/gui/dialogs/connection_cfg/view.py
+++ b/src/sakia/gui/dialogs/connection_cfg/view.py
@@ -16,6 +16,7 @@ class ConnectionConfigView(QDialog, Ui_ConnectionConfigurationDialog):
     """
     Connection config view
     """
+
     values_changed = pyqtSignal()
 
     def __init__(self, parent):
@@ -71,15 +72,21 @@ class ConnectionConfigView(QDialog, Ui_ConnectionConfigurationDialog):
 
     def handle_n_change(self, value):
         spinbox = self.sender()
-        self.scrypt_params.N = ConnectionConfigView.compute_power_of_2(spinbox, value, self.scrypt_params.N)
+        self.scrypt_params.N = ConnectionConfigView.compute_power_of_2(
+            spinbox, value, self.scrypt_params.N
+        )
 
     def handle_r_change(self, value):
         spinbox = self.sender()
-        self.scrypt_params.r = ConnectionConfigView.compute_power_of_2(spinbox, value, self.scrypt_params.r)
+        self.scrypt_params.r = ConnectionConfigView.compute_power_of_2(
+            spinbox, value, self.scrypt_params.r
+        )
 
     def handle_p_change(self, value):
         spinbox = self.sender()
-        self.scrypt_params.p = ConnectionConfigView.compute_power_of_2(spinbox, value, self.scrypt_params.p)
+        self.scrypt_params.p = ConnectionConfigView.compute_power_of_2(
+            spinbox, value, self.scrypt_params.p
+        )
 
     @staticmethod
     def compute_power_of_2(spinbox, value, param):
@@ -111,10 +118,15 @@ class ConnectionConfigView(QDialog, Ui_ConnectionConfigurationDialog):
 
     async def show_success(self, notification):
         if notification:
-            toast.display(self.tr("UID broadcast"), self.tr("Identity broadcasted to the network"))
+            toast.display(
+                self.tr("UID broadcast"), self.tr("Identity broadcasted to the network")
+            )
         else:
-            await QAsyncMessageBox.information(self, self.tr("UID broadcast"),
-                                               self.tr("Identity broadcasted to the network"))
+            await QAsyncMessageBox.information(
+                self,
+                self.tr("UID broadcast"),
+                self.tr("Identity broadcasted to the network"),
+            )
 
     def show_error(self, notification, error_txt):
         if notification:
@@ -128,7 +140,11 @@ class ConnectionConfigView(QDialog, Ui_ConnectionConfigurationDialog):
         """
         Hide unecessary buttons and display correct title
         """
-        self.setWindowTitle(self.tr("New connection to {0} network").format(ROOT_SERVERS[currency]["display"]))
+        self.setWindowTitle(
+            self.tr("New connection to {0} network").format(
+                ROOT_SERVERS[currency]["display"]
+            )
+        )
 
     def action_show_pubkey(self):
         salt = self.edit_salt.text()
@@ -162,20 +178,27 @@ class ConnectionConfigView(QDialog, Ui_ConnectionConfigurationDialog):
         SMOOTHING_FACTOR = 0.005
         if self.timer.elapsed() > 0:
             value = self.progress_bar.value()
-            next_value = value + 1000000*step_ratio
+            next_value = value + 1000000 * step_ratio
             speed_percent_by_ms = (next_value - value) / self.timer.elapsed()
-            self.average_speed = SMOOTHING_FACTOR * self.last_speed + (1 - SMOOTHING_FACTOR) * self.average_speed
+            self.average_speed = (
+                SMOOTHING_FACTOR * self.last_speed
+                + (1 - SMOOTHING_FACTOR) * self.average_speed
+            )
             remaining = (self.progress_bar.maximum() - next_value) / self.average_speed
             self.last_speed = speed_percent_by_ms
-            displayed_remaining_time = QDateTime.fromTime_t(remaining).toUTC().toString("hh:mm:ss")
-            self.progress_bar.setFormat(self.tr("{0} remaining...".format(displayed_remaining_time)))
+            displayed_remaining_time = (
+                QDateTime.fromTime_t(remaining).toUTC().toString("hh:mm:ss")
+            )
+            self.progress_bar.setFormat(
+                self.tr("{0} remaining...".format(displayed_remaining_time))
+            )
             self.progress_bar.setValue(next_value)
             self.timer.restart()
 
     def set_progress_steps(self, steps):
         self.progress_bar.setValue(0)
         self.timer.start()
-        self.progress_bar.setMaximum(steps*1000000)
+        self.progress_bar.setMaximum(steps * 1000000)
 
     def set_step(self, step):
         self.progress_bar.setValue(step * 1000000)
@@ -186,16 +209,20 @@ class ConnectionConfigView(QDialog, Ui_ConnectionConfigurationDialog):
         :param sakia.data.entities.BlockchainParameters blockchain_parameters:
         :return:
         """
-        days, hours, minutes, seconds = timestamp_to_dhms(blockchain_parameters.idty_window)
-        expiration_time_str = self.tr("{days} days, {hours}h  and {min}min").format(days=days,
-                                                                                    hours=hours,
-                                                                                    min=minutes)
+        days, hours, minutes, seconds = timestamp_to_dhms(
+            blockchain_parameters.idty_window
+        )
+        expiration_time_str = self.tr("{days} days, {hours}h  and {min}min").format(
+            days=days, hours=hours, min=minutes
+        )
 
         dialog = QDialog(self)
         about_dialog = Ui_CongratulationPopup()
         about_dialog.setupUi(dialog)
         dialog.setWindowTitle("Registration")
-        about_dialog.label.setText(self.tr("""
+        about_dialog.label.setText(
+            self.tr(
+                """
 <p><b>Congratulations !</b><br>
 <br>
 You just published your identity to the network.<br>
@@ -208,6 +235,11 @@ Please notice that your identity document <br>
 <b>will expire in {expiration_time_str}.</b><br>
 If you failed to get {certs} certifications before this time, <br>
 the process will have to be restarted from scratch.</p>
-""".format(certs=blockchain_parameters.sig_qty, expiration_time_str=expiration_time_str)))
+""".format(
+                    certs=blockchain_parameters.sig_qty,
+                    expiration_time_str=expiration_time_str,
+                )
+            )
+        )
 
         await dialog_async_exec(dialog)
diff --git a/src/sakia/gui/dialogs/contact/model.py b/src/sakia/gui/dialogs/contact/model.py
index c7c381653c424fffdf407dc37791bd2f92af32f3..0ccce7de6c858f69a5a911a2c643a2e29f6971a6 100644
--- a/src/sakia/gui/dialogs/contact/model.py
+++ b/src/sakia/gui/dialogs/contact/model.py
@@ -1,7 +1,11 @@
 from PyQt5.QtCore import QObject, Qt
 from sakia.data.entities import Contact
-from sakia.data.processors import IdentitiesProcessor, ContactsProcessor, \
-    BlockchainProcessor, ConnectionsProcessor
+from sakia.data.processors import (
+    IdentitiesProcessor,
+    ContactsProcessor,
+    BlockchainProcessor,
+    ConnectionsProcessor,
+)
 from sakia.helpers import timestamp_to_dhms
 from .table_model import ContactsTableModel, ContactsFilterProxyModel
 import attr
diff --git a/src/sakia/gui/dialogs/contact/table_model.py b/src/sakia/gui/dialogs/contact/table_model.py
index 9a6f987b31d9e736bf37e23b7940403ccad8a3bf..8eef60d1e1342f0f72bd16692b2095768684bf58 100644
--- a/src/sakia/gui/dialogs/contact/table_model.py
+++ b/src/sakia/gui/dialogs/contact/table_model.py
@@ -1,6 +1,11 @@
-
-from PyQt5.QtCore import QAbstractTableModel, Qt, QVariant, QSortFilterProxyModel,\
-    QModelIndex, QT_TRANSLATE_NOOP
+from PyQt5.QtCore import (
+    QAbstractTableModel,
+    Qt,
+    QVariant,
+    QSortFilterProxyModel,
+    QModelIndex,
+    QT_TRANSLATE_NOOP,
+)
 from sakia.data.processors import ContactsProcessor
 
 
@@ -28,7 +33,7 @@ class ContactsFilterProxyModel(QSortFilterProxyModel):
         left_data = source_model.data(left, Qt.DisplayRole)
         right_data = source_model.data(right, Qt.DisplayRole)
         if left_data == right_data:
-            txid_col = source_model.columns_types.index('contact_id')
+            txid_col = source_model.columns_types.index("contact_id")
             txid_left = source_model.index(left.row(), txid_col)
             txid_right = source_model.index(right.row(), txid_col)
             return txid_left < txid_right
@@ -43,8 +48,10 @@ class ContactsFilterProxyModel(QSortFilterProxyModel):
         """
         if index.isValid() and index.row() < self.rowCount(QModelIndex()):
             source_index = self.mapToSource(index)
-            contact_id_col = ContactsTableModel.columns_types.index('contact_id')
-            contact_id = self.sourceModel().contacts_data[source_index.row()][contact_id_col]
+            contact_id_col = ContactsTableModel.columns_types.index("contact_id")
+            contact_id = self.sourceModel().contacts_data[source_index.row()][
+                contact_id_col
+            ]
             return contact_id
         return -1
 
@@ -60,15 +67,11 @@ class ContactsTableModel(QAbstractTableModel):
     A Qt abstract item model to display contacts in a table view
     """
 
-    columns_types = (
-        'name',
-        'pubkey',
-        'contact_id'
-    )
+    columns_types = ("name", "pubkey", "contact_id")
 
     columns_headers = (
-        QT_TRANSLATE_NOOP("ContactsTableModel", 'Name'),
-        QT_TRANSLATE_NOOP("ContactsTableModel", 'Public key'),
+        QT_TRANSLATE_NOOP("ContactsTableModel", "Name"),
+        QT_TRANSLATE_NOOP("ContactsTableModel", "Public key"),
     )
 
     def __init__(self, parent, app):
@@ -85,18 +88,29 @@ class ContactsTableModel(QAbstractTableModel):
     def add_or_edit_contact(self, contact):
 
         for i, data in enumerate(self.contacts_data):
-            if data[ContactsTableModel.columns_types.index('contact_id')] == contact.contact_id:
+            if (
+                data[ContactsTableModel.columns_types.index("contact_id")]
+                == contact.contact_id
+            ):
                 self.contacts_data[i] = self.data_contact(contact)
-                self.dataChanged.emit(self.index(i, 0), self.index(i, len(ContactsTableModel.columns_types)))
+                self.dataChanged.emit(
+                    self.index(i, 0),
+                    self.index(i, len(ContactsTableModel.columns_types)),
+                )
                 return
         else:
-            self.beginInsertRows(QModelIndex(), len(self.contacts_data), len(self.contacts_data))
+            self.beginInsertRows(
+                QModelIndex(), len(self.contacts_data), len(self.contacts_data)
+            )
             self.contacts_data.append(self.data_contact(contact))
             self.endInsertRows()
 
     def remove_contact(self, contact):
         for i, data in enumerate(self.contacts_data):
-            if data[ContactsTableModel.columns_types.index('contact_id')] == contact.contact_id:
+            if (
+                data[ContactsTableModel.columns_types.index("contact_id")]
+                == contact.contact_id
+            ):
                 self.beginRemoveRows(QModelIndex(), i, i)
                 self.contacts_data.pop(i)
                 self.endRemoveRows()
@@ -140,4 +154,3 @@ class ContactsTableModel(QAbstractTableModel):
 
     def flags(self, index):
         return Qt.ItemIsSelectable | Qt.ItemIsEnabled
-
diff --git a/src/sakia/gui/dialogs/contact/view.py b/src/sakia/gui/dialogs/contact/view.py
index a3ba9658e54b166eaaa351bddbb947a4773d3d03..169fb09e9664bc8dc49f1a718d0cfe3a3f266a33 100644
--- a/src/sakia/gui/dialogs/contact/view.py
+++ b/src/sakia/gui/dialogs/contact/view.py
@@ -1,4 +1,10 @@
-from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QMessageBox, QAbstractItemView, QHeaderView
+from PyQt5.QtWidgets import (
+    QDialog,
+    QDialogButtonBox,
+    QMessageBox,
+    QAbstractItemView,
+    QHeaderView,
+)
 from PyQt5.QtCore import QT_TRANSLATE_NOOP, Qt, QModelIndex
 from .contact_uic import Ui_ContactDialog
 from duniterpy.documents.constants import pubkey_regex
@@ -32,9 +38,13 @@ class ContactView(QDialog, Ui_ContactDialog):
         self.table_contacts.setModel(model)
         self.table_contacts.setSelectionBehavior(QAbstractItemView.SelectRows)
         self.table_contacts.setSortingEnabled(True)
-        self.table_contacts.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
+        self.table_contacts.horizontalHeader().setSectionResizeMode(
+            QHeaderView.Interactive
+        )
         self.table_contacts.resizeRowsToContents()
-        self.table_contacts.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
+        self.table_contacts.verticalHeader().setSectionResizeMode(
+            QHeaderView.ResizeToContents
+        )
 
     def selected_contact_index(self):
         indexes = self.table_contacts.selectedIndexes()
diff --git a/src/sakia/gui/dialogs/plugins_manager/controller.py b/src/sakia/gui/dialogs/plugins_manager/controller.py
index b9d474c62c10142bf02b157cd6b607bb13adfe97..3453fd7ccea8374b4079639dd63953293d1a8796 100644
--- a/src/sakia/gui/dialogs/plugins_manager/controller.py
+++ b/src/sakia/gui/dialogs/plugins_manager/controller.py
@@ -57,8 +57,9 @@ class PluginsManagerController(QObject):
 
     def install_plugin(self):
 
-        filename = QFileDialog.getOpenFileName(self.view, self.tr("Open File"),"",
-                                               self.tr("Sakia module (*.zip)"))
+        filename = QFileDialog.getOpenFileName(
+            self.view, self.tr("Open File"), "", self.tr("Sakia module (*.zip)")
+        )
         if filename[0]:
             self.model.install_plugin(filename[0])
 
diff --git a/src/sakia/gui/dialogs/plugins_manager/model.py b/src/sakia/gui/dialogs/plugins_manager/model.py
index 9a01cc045188dae13832c857876080011c0692e7..67d4c3e24d1ecae6c3270ee8b3d8bfeb7dec05d4 100644
--- a/src/sakia/gui/dialogs/plugins_manager/model.py
+++ b/src/sakia/gui/dialogs/plugins_manager/model.py
@@ -37,7 +37,9 @@ class PluginsManagerModel(QObject):
         plugin_name = self._proxy.plugin_name(index)
         if plugin_name:
             try:
-                return next(p for p in self.app.plugins_dir.plugins if p.name == plugin_name)
+                return next(
+                    p for p in self.app.plugins_dir.plugins if p.name == plugin_name
+                )
             except StopIteration:
                 pass
         return None
diff --git a/src/sakia/gui/dialogs/plugins_manager/table_model.py b/src/sakia/gui/dialogs/plugins_manager/table_model.py
index beba841cd75ca99f7fa8b788370c67c667267eef..ef7bdfd471e1db69547d4c61251aae7fbe6eca1e 100644
--- a/src/sakia/gui/dialogs/plugins_manager/table_model.py
+++ b/src/sakia/gui/dialogs/plugins_manager/table_model.py
@@ -1,5 +1,11 @@
-from PyQt5.QtCore import QAbstractTableModel, Qt, QVariant, QSortFilterProxyModel,\
-    QModelIndex, QT_TRANSLATE_NOOP
+from PyQt5.QtCore import (
+    QAbstractTableModel,
+    Qt,
+    QVariant,
+    QSortFilterProxyModel,
+    QModelIndex,
+    QT_TRANSLATE_NOOP,
+)
 from sakia.data.entities import Plugin
 
 
@@ -36,11 +42,13 @@ class PluginsFilterProxyModel(QSortFilterProxyModel):
         """
         if index.isValid() and index.row() < self.rowCount(QModelIndex()):
             source_index = self.mapToSource(index)
-            plugin_name_col = PluginsTableModel.columns_types.index('name')
-            plugin_name = self.sourceModel().plugins_data[source_index.row()][plugin_name_col]
+            plugin_name_col = PluginsTableModel.columns_types.index("name")
+            plugin_name = self.sourceModel().plugins_data[source_index.row()][
+                plugin_name_col
+            ]
             return plugin_name
         return None
-    
+
     def data(self, index, role):
         source_index = self.mapToSource(index)
         model = self.sourceModel()
@@ -53,18 +61,13 @@ class PluginsTableModel(QAbstractTableModel):
     A Qt abstract item model to display plugins in a table view
     """
 
-    columns_types = (
-        'name',
-        'description',
-        'version',
-        'imported'
-    )
+    columns_types = ("name", "description", "version", "imported")
 
     columns_headers = (
-        QT_TRANSLATE_NOOP("PluginsTableModel", 'Name'),
-        QT_TRANSLATE_NOOP("PluginsTableModel", 'Description'),
-        QT_TRANSLATE_NOOP("PluginsTableModel", 'Version'),
-        QT_TRANSLATE_NOOP("PluginsTableModel", 'Imported'),
+        QT_TRANSLATE_NOOP("PluginsTableModel", "Name"),
+        QT_TRANSLATE_NOOP("PluginsTableModel", "Description"),
+        QT_TRANSLATE_NOOP("PluginsTableModel", "Version"),
+        QT_TRANSLATE_NOOP("PluginsTableModel", "Imported"),
     )
 
     def __init__(self, parent, app):
@@ -78,13 +81,15 @@ class PluginsTableModel(QAbstractTableModel):
         self.plugins_data = []
 
     def add_plugin(self, plugin):
-        self.beginInsertRows(QModelIndex(), len(self.plugins_data), len(self.plugins_data))
+        self.beginInsertRows(
+            QModelIndex(), len(self.plugins_data), len(self.plugins_data)
+        )
         self.plugins_data.append(self.data_plugin(plugin))
         self.endInsertRows()
 
     def remove_plugin(self, plugin):
         for i, data in enumerate(self.plugins_data):
-            if data[PluginsTableModel.columns_types.index('name')] == plugin.name:
+            if data[PluginsTableModel.columns_types.index("name")] == plugin.name:
                 self.beginRemoveRows(QModelIndex(), i, i)
                 self.plugins_data.pop(i)
                 self.endRemoveRows()
@@ -127,4 +132,3 @@ class PluginsTableModel(QAbstractTableModel):
 
     def flags(self, index):
         return Qt.ItemIsSelectable | Qt.ItemIsEnabled
-
diff --git a/src/sakia/gui/dialogs/plugins_manager/view.py b/src/sakia/gui/dialogs/plugins_manager/view.py
index a2eee1ec95addc23d837294fb3f04d66324ef70f..d021276d6ca43d626898382552893f4e63e90def 100644
--- a/src/sakia/gui/dialogs/plugins_manager/view.py
+++ b/src/sakia/gui/dialogs/plugins_manager/view.py
@@ -25,9 +25,13 @@ class PluginsManagerView(QDialog, Ui_PluginDialog):
         self.table_plugins.setModel(model)
         self.table_plugins.setSelectionBehavior(QAbstractItemView.SelectRows)
         self.table_plugins.setSortingEnabled(True)
-        self.table_plugins.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
+        self.table_plugins.horizontalHeader().setSectionResizeMode(
+            QHeaderView.Interactive
+        )
         self.table_plugins.resizeRowsToContents()
-        self.table_plugins.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
+        self.table_plugins.verticalHeader().setSectionResizeMode(
+            QHeaderView.ResizeToContents
+        )
 
     def selected_plugin_index(self):
         indexes = self.table_plugins.selectedIndexes()
@@ -36,5 +40,8 @@ class PluginsManagerView(QDialog, Ui_PluginDialog):
         return QModelIndex()
 
     def show_error(self, error_txt):
-        QMessageBox.critical(self, self.tr("Plugin import"),
-                             self.tr("CCould not import plugin : {0}".format(error_txt)))
+        QMessageBox.critical(
+            self,
+            self.tr("Plugin import"),
+            self.tr("CCould not import plugin : {0}".format(error_txt)),
+        )
diff --git a/src/sakia/gui/dialogs/revocation/controller.py b/src/sakia/gui/dialogs/revocation/controller.py
index 23d5c3de4047505a58d0f3be174c755558ad080a..eb5886ec6e26976e78f28105f60c09b06b84a074 100644
--- a/src/sakia/gui/dialogs/revocation/controller.py
+++ b/src/sakia/gui/dialogs/revocation/controller.py
@@ -23,7 +23,9 @@ class RevocationController(QObject):
         self.view = view
         self.model = model
 
-        self.view.button_next.clicked.connect(lambda checked: self.handle_next_step(False))
+        self.view.button_next.clicked.connect(
+            lambda checked: self.handle_next_step(False)
+        )
         self.view.button_load.clicked.connect(self.load_from_file)
         self.view.spinbox_port.valueChanged.connect(self.refresh_revocation_info)
         self.view.edit_address.textChanged.connect(self.refresh_revocation_info)
@@ -32,15 +34,15 @@ class RevocationController(QObject):
 
         self._steps = (
             {
-                'page': self.view.page_load_file,
-                'init': lambda: None,
-                'next': lambda: None
+                "page": self.view.page_load_file,
+                "init": lambda: None,
+                "next": lambda: None,
             },
             {
-                'page': self.view.page_destination,
-                'init': self.init_publication_page,
-                'next': self.publish
-            }
+                "page": self.view.page_destination,
+                "init": self.init_publication_page,
+                "next": self.publish,
+            },
         )
         self._current_step = 0
 
@@ -73,11 +75,17 @@ class RevocationController(QObject):
     def handle_next_step(self, init=False):
         if self._current_step < len(self._steps) - 1:
             if not init:
-                self.view.button_next.clicked.disconnect(self._steps[self._current_step]['next'])
+                self.view.button_next.clicked.disconnect(
+                    self._steps[self._current_step]["next"]
+                )
                 self._current_step += 1
-            self._steps[self._current_step]['init']()
-            self.view.stackedWidget.setCurrentWidget(self._steps[self._current_step]['page'])
-            self.view.button_next.clicked.connect(self._steps[self._current_step]['next'])
+            self._steps[self._current_step]["init"]()
+            self.view.stackedWidget.setCurrentWidget(
+                self._steps[self._current_step]["page"]
+            )
+            self.view.button_next.clicked.connect(
+                self._steps[self._current_step]["next"]
+            )
 
     def load_from_file(self):
         selected_file = self.view.select_revocation_file()
diff --git a/src/sakia/gui/dialogs/revocation/model.py b/src/sakia/gui/dialogs/revocation/model.py
index a3f64118bb95e0d8c99e2ff4072dfff43ad6b6a9..49c7bfaede07f13f6be9076505991bc33e0bca25 100644
--- a/src/sakia/gui/dialogs/revocation/model.py
+++ b/src/sakia/gui/dialogs/revocation/model.py
@@ -21,14 +21,14 @@ class RevocationModel(QObject):
 
         self.revocation_document = None
         self.revoked_identity = None
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
 
     def load_revocation(self, path):
         """
         Load a revocation document from a file
         :param str path:
         """
-        with open(path, 'r') as file:
+        with open(path, "r") as file:
             file_content = file.read()
             self.revocation_document = Revocation.from_signed_raw(file_content)
             self.revoked_identity = Revocation.extract_self_cert(file_content)
@@ -38,17 +38,25 @@ class RevocationModel(QObject):
 
     async def broadcast_to_network(self, index):
         currency = self.currencies_names()[index]
-        return await self.app.documents_service.broadcast_revocation(currency, self.revoked_identity,
-                                                               self.revocation_document)
+        return await self.app.documents_service.broadcast_revocation(
+            currency, self.revoked_identity, self.revocation_document
+        )
 
     async def send_to_node(self, server, port, secured):
         signed_raw = self.revocation_document.signed_raw(self.revoked_identity)
-        node_connector = await NodeConnector.from_address(None, secured, server, port, self.app.parameters)
-        for endpoint in [e for e in node_connector.node.endpoints
-                         if isinstance(e, BMAEndpoint) or isinstance(e, SecuredBMAEndpoint)]:
+        node_connector = await NodeConnector.from_address(
+            None, secured, server, port, self.app.parameters
+        )
+        for endpoint in [
+            e
+            for e in node_connector.node.endpoints
+            if isinstance(e, BMAEndpoint) or isinstance(e, SecuredBMAEndpoint)
+        ]:
             try:
                 self._logger.debug("Broadcasting : \n" + signed_raw)
-                conn_handler = endpoint.conn_handler(node_connector.session, proxy=self.app.parameters.proxy())
+                conn_handler = endpoint.conn_handler(
+                    node_connector.session, proxy=self.app.parameters.proxy()
+                )
                 result = await bma.wot.revoke(conn_handler, signed_raw)
                 if result.status == 200:
                     return True, ""
@@ -56,8 +64,14 @@ class RevocationModel(QObject):
                     return False, bma.api.parse_error(await result.text())["message"]
             except errors.DuniterError as e:
                 return False, e.message
-            except (jsonschema.ValidationError, ClientError, gaierror,
-                    TimeoutError, ConnectionRefusedError, ValueError) as e:
+            except (
+                jsonschema.ValidationError,
+                ClientError,
+                gaierror,
+                TimeoutError,
+                ConnectionRefusedError,
+                ValueError,
+            ) as e:
                 return False, str(e)
             finally:
                 node_connector.session.close()
diff --git a/src/sakia/gui/dialogs/revocation/view.py b/src/sakia/gui/dialogs/revocation/view.py
index 4483a3d8c07c6b7770e2ba9a240b6803a38930c0..2477a1908919bfddcc75a6c638df8daec5e7fcee 100644
--- a/src/sakia/gui/dialogs/revocation/view.py
+++ b/src/sakia/gui/dialogs/revocation/view.py
@@ -25,53 +25,87 @@ class RevocationView(QDialog, Ui_RevocationDialog):
 
         self.button_next.setEnabled(False)
 
-        self.radio_address.toggled.connect(lambda c: self.publication_mode_changed(RevocationView.PublicationMode.ADDRESS))
-        self.radio_currency.toggled.connect(lambda c: self.publication_mode_changed(RevocationView.PublicationMode.COMMUNITY))
+        self.radio_address.toggled.connect(
+            lambda c: self.publication_mode_changed(
+                RevocationView.PublicationMode.ADDRESS
+            )
+        )
+        self.radio_currency.toggled.connect(
+            lambda c: self.publication_mode_changed(
+                RevocationView.PublicationMode.COMMUNITY
+            )
+        )
 
     def publication_mode_changed(self, radio):
         self.edit_address.setEnabled(radio == RevocationView.PublicationMode.ADDRESS)
         self.spinbox_port.setEnabled(radio == RevocationView.PublicationMode.ADDRESS)
-        self.combo_currency.setEnabled(radio == RevocationView.PublicationMode.COMMUNITY)
+        self.combo_currency.setEnabled(
+            radio == RevocationView.PublicationMode.COMMUNITY
+        )
 
     def refresh_target(self):
         if self.radio_currency.isChecked():
             target = self.tr(
-                "All nodes of currency {name}".format(name=self.combo_currency.currentText()))
+                "All nodes of currency {name}".format(
+                    name=self.combo_currency.currentText()
+                )
+            )
         elif self.radio_address.isChecked():
-            target = self.tr("Address {address}:{port}".format(address=self.edit_address.text(),
-                                                               port=self.spinbox_port.value()))
+            target = self.tr(
+                "Address {address}:{port}".format(
+                    address=self.edit_address.text(), port=self.spinbox_port.value()
+                )
+            )
         else:
             target = ""
-        self.label_target.setText("""
+        self.label_target.setText(
+            """
 <h4>Publication address</h4>
 <div>{target}</div>
-""".format(target=target))
+""".format(
+                target=target
+            )
+        )
 
     def refresh_revocation_label(self, revoked_identity):
         if revoked_identity:
-            text = self.tr("""
+            text = self.tr(
+                """
 <div>Identity revoked : {uid} (public key : {pubkey}...)</div>
 <div>Identity signed on block : {timestamp}</div>
-    """.format(uid=revoked_identity.uid,
-               pubkey=revoked_identity.pubkey[:12],
-               timestamp=revoked_identity.timestamp))
+    """.format(
+                    uid=revoked_identity.uid,
+                    pubkey=revoked_identity.pubkey[:12],
+                    timestamp=revoked_identity.timestamp,
+                )
+            )
 
             self.label_revocation_content.setText(text)
 
             if self.radio_currency.isChecked():
-                target = self.tr("All nodes of currency {name}".format(name=self.combo_currency.currentText()))
+                target = self.tr(
+                    "All nodes of currency {name}".format(
+                        name=self.combo_currency.currentText()
+                    )
+                )
             elif self.radio_address.isChecked():
-                target = self.tr("Address {address}:{port}".format(address=self.edit_address.text(),
-                                                                   port=self.spinbox_port.value()))
+                target = self.tr(
+                    "Address {address}:{port}".format(
+                        address=self.edit_address.text(), port=self.spinbox_port.value()
+                    )
+                )
             else:
                 target = ""
-            self.label_revocation_info.setText("""
+            self.label_revocation_info.setText(
+                """
 <h4>Revocation document</h4>
 <div>{text}</div>
 <h4>Publication address</h4>
 <div>{target}</div>
-""".format(text=text,
-           target=target))
+""".format(
+                    text=text, target=target
+                )
+            )
         else:
             self.label_revocation_content.setText("")
 
@@ -80,29 +114,39 @@ class RevocationView(QDialog, Ui_RevocationDialog):
         Get a revocation file using a file dialog
         :rtype: str
         """
-        selected_files = QFileDialog.getOpenFileName(self,
-                                    self.tr("Load a revocation file"),
-                                    "",
-                                    self.tr("All text files (*.txt)"))
+        selected_files = QFileDialog.getOpenFileName(
+            self,
+            self.tr("Load a revocation file"),
+            "",
+            self.tr("All text files (*.txt)"),
+        )
         selected_file = selected_files[0]
         return selected_file
 
     def malformed_file_error(self):
-        QMessageBox.critical(self, self.tr("Error loading document"),
-                             self.tr("Loaded document is not a revocation document"),
-                             buttons=QMessageBox.Ok)
+        QMessageBox.critical(
+            self,
+            self.tr("Error loading document"),
+            self.tr("Loaded document is not a revocation document"),
+            buttons=QMessageBox.Ok,
+        )
 
     async def revocation_broadcast_error(self, error):
-        await QAsyncMessageBox.critical(self, self.tr("Error broadcasting document"),
-                                        error)
+        await QAsyncMessageBox.critical(
+            self, self.tr("Error broadcasting document"), error
+        )
 
     def show_revoked_selfcert(self, selfcert):
-        text = self.tr("""
+        text = self.tr(
+            """
         <div>Identity revoked : {uid} (public key : {pubkey}...)</div>
         <div>Identity signed on block : {timestamp}</div>
-            """.format(uid=selfcert.uid,
-                       pubkey=selfcert.pubkey[:12],
-                       timestamp=selfcert.timestamp))
+            """.format(
+                uid=selfcert.uid,
+                pubkey=selfcert.pubkey[:12],
+                timestamp=selfcert.timestamp,
+            )
+        )
         self.label_revocation_content.setText(text)
 
     def set_currencies_names(self, names):
@@ -112,19 +156,28 @@ class RevocationView(QDialog, Ui_RevocationDialog):
         self.radio_currency.setChecked(True)
 
     def ask_for_confirmation(self):
-        answer = QMessageBox.warning(self, self.tr("Revocation"),
-                                     self.tr("""<h4>The publication of this document will remove your identity from the network.</h4>
+        answer = QMessageBox.warning(
+            self,
+            self.tr("Revocation"),
+            self.tr(
+                """<h4>The publication of this document will remove your identity from the network.</h4>
         <li>
             <li> <b>This identity won't be able to join the targeted currency anymore.</b> </li>
             <li> <b>This identity won't be able to generate Universal Dividends anymore.</b> </li>
             <li> <b>This identity won't be able to certify individuals anymore.</b> </li>
         </li>
         Please think twice before publishing this document.
-        """), QMessageBox.Ok | QMessageBox.Cancel)
+        """
+            ),
+            QMessageBox.Ok | QMessageBox.Cancel,
+        )
         return answer == QMessageBox.Ok
 
     @asyncify
     async def accept(self):
-        await QAsyncMessageBox.information(self, self.tr("Revocation broadcast"),
-                                     self.tr("The document was successfully broadcasted."))
+        await QAsyncMessageBox.information(
+            self,
+            self.tr("Revocation broadcast"),
+            self.tr("The document was successfully broadcasted."),
+        )
         super().accept()
diff --git a/src/sakia/gui/main_window/controller.py b/src/sakia/gui/main_window/controller.py
index b9848b110f6fbf6605eab03a54683196fef7f6c8..eed71422c76281940d6de6d43a8ccc0977c9cba1 100644
--- a/src/sakia/gui/main_window/controller.py
+++ b/src/sakia/gui/main_window/controller.py
@@ -72,17 +72,19 @@ class MainWindowController(QObject):
         """
         navigation = NavigationController.create(None, app)
         toolbar = ToolbarController.create(app, navigation)
-        main_window = cls.create(app, status_bar=StatusBarController.create(app),
-                                 navigation=navigation,
-                                 toolbar=toolbar
-                                 )
+        main_window = cls.create(
+            app,
+            status_bar=StatusBarController.create(app),
+            navigation=navigation,
+            toolbar=toolbar,
+        )
         toolbar.view.button_network.clicked.connect(navigation.open_network_view)
         toolbar.view.button_identity.clicked.connect(navigation.open_identities_view)
         toolbar.view.button_explore.clicked.connect(navigation.open_wot_view)
         toolbar.exit_triggered.connect(main_window.view.close)
-        #app.version_requested.connect(main_window.latest_version_requested)
-        #app.account_imported.connect(main_window.import_account_accepted)
-        #app.account_changed.connect(main_window.change_account)
+        # app.version_requested.connect(main_window.latest_version_requested)
+        # app.account_imported.connect(main_window.import_account_accepted)
+        # app.account_changed.connect(main_window.change_account)
         if app.parameters.maximized:
             main_window.view.showMaximized()
         else:
@@ -95,9 +97,7 @@ class MainWindowController(QObject):
 
     @pyqtSlot(str)
     def display_error(self, error):
-        QMessageBox.critical(self, ":(",
-                             error,
-                             QMessageBox.Ok)
+        QMessageBox.critical(self, ":(", error, QMessageBox.Ok)
 
     @pyqtSlot(int)
     def referential_changed(self, index):
@@ -108,14 +108,18 @@ class MainWindowController(QObject):
         latest = self.app.available_version
         logging.debug("Latest version requested")
         if not latest[0]:
-            version_info = self.tr("Please get the latest release {version}") \
-                .format(version=latest[1])
+            version_info = self.tr("Please get the latest release {version}").format(
+                version=latest[1]
+            )
             version_url = latest[2]
 
-            if self.app.preferences['notifications']:
-                toast.display("sakia", """{version_info}""".format(
-                version_info=version_info,
-                version_url=version_url))
+            if self.app.preferences["notifications"]:
+                toast.display(
+                    "sakia",
+                    """{version_info}""".format(
+                        version_info=version_info, version_url=version_url
+                    ),
+                )
 
     def refresh(self, currency):
         """
@@ -125,7 +129,9 @@ class MainWindowController(QObject):
         """
         self.status_bar.refresh()
         display_name = ROOT_SERVERS[currency]["display"]
-        self.view.setWindowTitle(self.tr("sakia {0} - {1}").format(__version__, display_name))
+        self.view.setWindowTitle(
+            self.tr("sakia {0} - {1}").format(__version__, display_name)
+        )
 
     def eventFilter(self, target, event):
         """
@@ -140,4 +146,3 @@ class MainWindowController(QObject):
                 self.refresh()
             return self.widget.eventFilter(target, event)
         return False
-
diff --git a/src/sakia/gui/main_window/status_bar/controller.py b/src/sakia/gui/main_window/status_bar/controller.py
index ffd20c19d3a867e0b16388d01d528eea539d9be0..bf9c9307df3c434a232c308aed4996d73a686cfe 100644
--- a/src/sakia/gui/main_window/status_bar/controller.py
+++ b/src/sakia/gui/main_window/status_bar/controller.py
@@ -20,7 +20,9 @@ class StatusBarController(QObject):
         super().__init__()
         self.view = view
         self.model = model
-        view.combo_referential.currentIndexChanged[int].connect(self.referential_changed)
+        view.combo_referential.currentIndexChanged[int].connect(
+            self.referential_changed
+        )
         self.update_time()
 
     @classmethod
@@ -44,11 +46,15 @@ class StatusBarController(QObject):
     @pyqtSlot()
     def update_time(self):
         dateTime = QDateTime.currentDateTime()
-        self.view.label_time.setText("{0}".format(QLocale.toString(
-                        QLocale(),
-                        QDateTime.currentDateTime(),
-                        QLocale.dateTimeFormat(QLocale(), QLocale.NarrowFormat)
-                    )))
+        self.view.label_time.setText(
+            "{0}".format(
+                QLocale.toString(
+                    QLocale(),
+                    QDateTime.currentDateTime(),
+                    QLocale.dateTimeFormat(QLocale(), QLocale.NarrowFormat),
+                )
+            )
+        )
         timer = QTimer()
         timer.timeout.connect(self.update_time)
         timer.start(1000)
@@ -63,11 +69,15 @@ class StatusBarController(QObject):
         current_block = self.model.current_block()
         current_time = self.model.current_time()
         str_time = QLocale.toString(
-                        QLocale(),
-                        QDateTime.fromTime_t(current_time),
-                        QLocale.dateTimeFormat(QLocale(), QLocale.NarrowFormat)
-                    )
-        self.view.status_label.setText(self.tr("Blockchain sync : {0} BAT ({1})").format(str_time, str(current_block)[:15]))
+            QLocale(),
+            QDateTime.fromTime_t(current_time),
+            QLocale.dateTimeFormat(QLocale(), QLocale.NarrowFormat),
+        )
+        self.view.status_label.setText(
+            self.tr("Blockchain sync : {0} BAT ({1})").format(
+                str_time, str(current_block)[:15]
+            )
+        )
 
     def refresh(self):
         """
@@ -83,4 +93,4 @@ class StatusBarController(QObject):
 
     @pyqtSlot(int)
     def referential_changed(self, index):
-        self.model.app.change_referential(index)
\ No newline at end of file
+        self.model.app.change_referential(index)
diff --git a/src/sakia/gui/main_window/status_bar/model.py b/src/sakia/gui/main_window/status_bar/model.py
index 4e3b4f82d7d596b9caaf9cdff2f5fe5cfadd2fc8..792d9242b53fac3764a730126a9bcacfb8245986 100644
--- a/src/sakia/gui/main_window/status_bar/model.py
+++ b/src/sakia/gui/main_window/status_bar/model.py
@@ -30,4 +30,3 @@ class StatusBarModel(QObject):
     def current_time(self):
         time = self.blockchain_processor.time(self.app.currency)
         return self.blockchain_processor.adjusted_ts(self.app.currency, time)
-
diff --git a/src/sakia/gui/main_window/toolbar/controller.py b/src/sakia/gui/main_window/toolbar/controller.py
index 6ed122225fba8ad6c63ff68e735b689656f87cdb..0eb7f7b5cca3c6ce44d809e2a7819cf2c1903d65 100644
--- a/src/sakia/gui/main_window/toolbar/controller.py
+++ b/src/sakia/gui/main_window/toolbar/controller.py
@@ -27,13 +27,17 @@ class ToolbarController(QObject):
         super().__init__()
         self.view = view
         self.model = model
-        self.view.action_add_connection.triggered.connect(self.open_add_connection_dialog)
+        self.view.action_add_connection.triggered.connect(
+            self.open_add_connection_dialog
+        )
         self.view.action_parameters.triggered.connect(self.open_settings_dialog)
         self.view.action_plugins.triggered.connect(self.open_plugins_manager_dialog)
         self.view.action_about.triggered.connect(self.open_about_dialog)
         self.view.action_about_wot.triggered.connect(self.open_about_wot_dialog)
         self.view.action_about_money.triggered.connect(self.open_about_money_dialog)
-        self.view.action_about_referentials.triggered.connect(self.open_about_referentials_dialog)
+        self.view.action_about_referentials.triggered.connect(
+            self.open_about_referentials_dialog
+        )
         self.view.action_revoke_uid.triggered.connect(self.open_revocation_dialog)
         self.view.button_contacts.clicked.connect(self.open_contacts_dialog)
         self.view.action_exit.triggered.connect(self.exit_triggered)
@@ -48,7 +52,12 @@ class ToolbarController(QObject):
         :rtype: NavigationController
         """
         view = ToolbarView(None)
-        model = ToolbarModel(app, navigation.model, app.blockchain_service, BlockchainProcessor.instanciate(app))
+        model = ToolbarModel(
+            app,
+            navigation.model,
+            app.blockchain_service,
+            BlockchainProcessor.instanciate(app),
+        )
         toolbar = cls(view, model)
         return toolbar
 
@@ -56,7 +65,9 @@ class ToolbarController(QObject):
         ContactController.open_dialog(self, self.model.app)
 
     def open_revocation_dialog(self):
-        RevocationController.open_dialog(self, self.model.app, self.model.navigation_model.current_connection())
+        RevocationController.open_dialog(
+            self, self.model.app, self.model.navigation_model.current_connection()
+        )
 
     def open_settings_dialog(self):
         PreferencesDialog(self.model.app).exec()
@@ -65,7 +76,9 @@ class ToolbarController(QObject):
         PluginsManagerController.open_dialog(self, self.model.app)
 
     def open_add_connection_dialog(self):
-        connection_config = ConnectionConfigController.create_connection(self, self.model.app)
+        connection_config = ConnectionConfigController.create_connection(
+            self, self.model.app
+        )
         connection_config.exec()
         if connection_config.view.result() == QDialog.Accepted:
             self.model.app.instanciate_services()
@@ -97,7 +110,11 @@ class ToolbarController(QObject):
         :param widget:
         :return:
         """
-        self.action_publish_uid.setText(self.tr(ToolbarController.action_publish_uid_text))
-        self.action_revoke_uid.setText(self.tr(ToolbarController.action_revoke_uid_text))
+        self.action_publish_uid.setText(
+            self.tr(ToolbarController.action_publish_uid_text)
+        )
+        self.action_revoke_uid.setText(
+            self.tr(ToolbarController.action_revoke_uid_text)
+        )
         self.action_showinfo.setText(self.tr(ToolbarController.action_showinfo_text))
         super().retranslateUi(self)
diff --git a/src/sakia/gui/main_window/toolbar/model.py b/src/sakia/gui/main_window/toolbar/model.py
index 977cae4305b0ddc334e6702a91b5d5b214ac1ff3..34add96da0894a21a6442f8e1d39de58d9c23028 100644
--- a/src/sakia/gui/main_window/toolbar/model.py
+++ b/src/sakia/gui/main_window/toolbar/model.py
@@ -40,15 +40,15 @@ class ToolbarModel(QObject):
         version_info = ""
         version_url = ""
         if not latest[0]:
-            version_info = "Latest release : {version}" \
-                            .format(version=latest[1])
+            version_info = "Latest release : {version}".format(version=latest[1])
             version_url = latest[2]
 
         new_version_text = """
             <p><b>{version_info}</b></p>
             <p><a href={version_url}>Download link</a></p>
-            """.format(version_info=version_info,
-                       version_url=version_url)
+            """.format(
+            version_info=version_info, version_url=version_url
+        )
         return """
         <h1>Sakia</h1>
 
@@ -65,94 +65,117 @@ class ToolbarModel(QObject):
         <p>vit</p>
         <p>canercandan</p>
         <p>Moul</p>
-        """.format(__version__,
-                   new_version_text=new_version_text)
+        """.format(
+            __version__, new_version_text=new_version_text
+        )
 
     def get_localized_data(self):
         localized_data = {}
         #  try to request money parameters
         params = self.blockchain_service.parameters()
 
-        localized_data['currency'] = ROOT_SERVERS[self.app.currency]["display"]
-        localized_data['growth'] = params.c
-        localized_data['days_per_dividend'] = QLocale().toString(params.dt / 86400, 'f', 2)
+        localized_data["currency"] = ROOT_SERVERS[self.app.currency]["display"]
+        localized_data["growth"] = params.c
+        localized_data["days_per_dividend"] = QLocale().toString(
+            params.dt / 86400, "f", 2
+        )
 
         last_mass = self.blockchain_service.last_monetary_mass()
         last_ud, last_ud_base = self.blockchain_service.last_ud()
         last_members_count = self.blockchain_service.last_members_count()
         last_ud_time = self.blockchain_service.last_ud_time()
 
-        localized_data['units'] = self.app.current_ref.instance(0,
-                                                                self.app.currency,
-                                                                self.app, None).units
-        localized_data['diff_units'] = self.app.current_ref.instance(0,
-                                                                     self.app.currency,
-                                                                     self.app, None).diff_units
+        localized_data["units"] = self.app.current_ref.instance(
+            0, self.app.currency, self.app, None
+        ).units
+        localized_data["diff_units"] = self.app.current_ref.instance(
+            0, self.app.currency, self.app, None
+        ).diff_units
 
         if last_ud:
             # display float values
-            localized_data['ud'] = self.app.current_ref.instance(last_ud * math.pow(10, last_ud_base),
-                                              self.app.currency,
-                                              self.app).diff_localized(False, True)
+            localized_data["ud"] = self.app.current_ref.instance(
+                last_ud * math.pow(10, last_ud_base), self.app.currency, self.app
+            ).diff_localized(False, True)
 
-            localized_data['members_count'] = self.blockchain_service.current_members_count()
+            localized_data[
+                "members_count"
+            ] = self.blockchain_service.current_members_count()
 
             computed_dividend = self.blockchain_service.computed_dividend()
             # display float values
-            localized_data['ud_plus_1'] = self.app.current_ref.instance(computed_dividend,
-                                              self.app.currency, self.app).diff_localized(False, True)
+            localized_data["ud_plus_1"] = self.app.current_ref.instance(
+                computed_dividend, self.app.currency, self.app
+            ).diff_localized(False, True)
 
-            localized_data['mass'] = self.app.current_ref.instance(self.blockchain_service.current_mass(),
-                                              self.app.currency, self.app).localized(False, True)
+            localized_data["mass"] = self.app.current_ref.instance(
+                self.blockchain_service.current_mass(), self.app.currency, self.app
+            ).localized(False, True)
 
             ud_median_time = self.blockchain_service.last_ud_time()
-            ud_median_time = self.blockchain_processor.adjusted_ts(self.app.currency, ud_median_time)
+            ud_median_time = self.blockchain_processor.adjusted_ts(
+                self.app.currency, ud_median_time
+            )
 
-            localized_data['ud_median_time'] = QLocale.toString(
+            localized_data["ud_median_time"] = QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(ud_median_time),
-                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
             )
 
             next_ud_median_time = self.blockchain_service.last_ud_time() + params.dt
-            next_ud_median_time = self.blockchain_processor.adjusted_ts(self.app.currency, next_ud_median_time)
+            next_ud_median_time = self.blockchain_processor.adjusted_ts(
+                self.app.currency, next_ud_median_time
+            )
 
-            localized_data['next_ud_median_time'] = QLocale.toString(
+            localized_data["next_ud_median_time"] = QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(next_ud_median_time),
-                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
             )
 
             next_ud_reeval = self.blockchain_service.next_ud_reeval()
-            next_ud_reeval = self.blockchain_processor.adjusted_ts(self.app.currency, next_ud_reeval)
-            localized_data['next_ud_reeval'] = QLocale.toString(
+            next_ud_reeval = self.blockchain_processor.adjusted_ts(
+                self.app.currency, next_ud_reeval
+            )
+            localized_data["next_ud_reeval"] = QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(next_ud_reeval),
-                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
             )
 
             if last_ud:
-                mass_minus_1_per_member = (float(0) if last_ud == 0 or last_members_count == 0 else
-                                           last_mass / last_members_count)
-                localized_data['members_count_minus_1'] = last_members_count
-                localized_data['mass_minus_1_per_member'] = self.app.current_ref.instance(mass_minus_1_per_member,
-                                                  self.app.currency, self.app) \
-                                                  .localized(False, True)
-                localized_data['mass_minus_1'] = self.app.current_ref.instance(last_mass,
-                                                  self.app.currency, self.app) \
-                                                  .localized(False, True)
+                mass_minus_1_per_member = (
+                    float(0)
+                    if last_ud == 0 or last_members_count == 0
+                    else last_mass / last_members_count
+                )
+                localized_data["members_count_minus_1"] = last_members_count
+                localized_data[
+                    "mass_minus_1_per_member"
+                ] = self.app.current_ref.instance(
+                    mass_minus_1_per_member, self.app.currency, self.app
+                ).localized(
+                    False, True
+                )
+                localized_data["mass_minus_1"] = self.app.current_ref.instance(
+                    last_mass, self.app.currency, self.app
+                ).localized(False, True)
                 # avoid divide by zero !
                 if last_members_count == 0:
-                    localized_data['actual_growth'] = float(0)
+                    localized_data["actual_growth"] = float(0)
                 else:
-                    localized_data['actual_growth'] = (last_ud * math.pow(10, last_ud_base)) / (
-                    last_mass / last_members_count)
+                    localized_data["actual_growth"] = (
+                        last_ud * math.pow(10, last_ud_base)
+                    ) / (last_mass / last_members_count)
 
-                last_ud_time = self.blockchain_processor.adjusted_ts(self.app.currency, last_ud_time)
-                localized_data['ud_median_time_minus_1'] = QLocale.toString(
+                last_ud_time = self.blockchain_processor.adjusted_ts(
+                    self.app.currency, last_ud_time
+                )
+                localized_data["ud_median_time_minus_1"] = QLocale.toString(
                     QLocale(),
                     QDateTime.fromTime_t(last_ud_time),
-                    QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                    QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
                 )
         return localized_data
 
@@ -170,5 +193,5 @@ class ToolbarModel(QObject):
         """
         refs_instances = []
         for ref_class in Referentials:
-             refs_instances.append(ref_class(0, self.app.currency, self.app, None))
-        return refs_instances
\ No newline at end of file
+            refs_instances.append(ref_class(0, self.app.currency, self.app, None))
+        return refs_instances
diff --git a/src/sakia/gui/main_window/toolbar/view.py b/src/sakia/gui/main_window/toolbar/view.py
index ac0c38d85f2b687cc0fbc481e18ca81097d39173..60bb65bfadd6d12386a92a5f7e3e134e6b737407 100644
--- a/src/sakia/gui/main_window/toolbar/view.py
+++ b/src/sakia/gui/main_window/toolbar/view.py
@@ -1,5 +1,15 @@
-from PyQt5.QtWidgets import QFrame, QAction, QMenu, QSizePolicy, QInputDialog, QDialog, \
-    QVBoxLayout, QTabWidget, QWidget, QLabel
+from PyQt5.QtWidgets import (
+    QFrame,
+    QAction,
+    QMenu,
+    QSizePolicy,
+    QInputDialog,
+    QDialog,
+    QVBoxLayout,
+    QTabWidget,
+    QWidget,
+    QLabel,
+)
 from sakia.gui.widgets.dialogs import dialog_async_exec
 from PyQt5.QtCore import QObject, QT_TRANSLATE_NOOP, Qt, QLocale
 from .toolbar_uic import Ui_SakiaToolbar
@@ -13,7 +23,10 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
     """
     The model of Navigation component
     """
-    _action_revoke_uid_text = QT_TRANSLATE_NOOP("ToolbarView", "Publish a revocation document")
+
+    _action_revoke_uid_text = QT_TRANSLATE_NOOP(
+        "ToolbarView", "Publish a revocation document"
+    )
 
     def __init__(self, parent):
         super().__init__(parent)
@@ -25,7 +38,9 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
         self.action_add_connection = QAction(self.tr("Add a connection"), tool_menu)
         tool_menu.addAction(self.action_add_connection)
 
-        self.action_revoke_uid = QAction(self.tr(ToolbarView._action_revoke_uid_text), self)
+        self.action_revoke_uid = QAction(
+            self.tr(ToolbarView._action_revoke_uid_text), self
+        )
         tool_menu.addAction(self.action_revoke_uid)
 
         self.action_parameters = QAction(self.tr("Settings"), tool_menu)
@@ -42,7 +57,9 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
         self.action_about_money = QAction(self.tr("About Money"), about_menu)
         about_menu.addAction(self.action_about_money)
 
-        self.action_about_referentials = QAction(self.tr("About Referentials"), about_menu)
+        self.action_about_referentials = QAction(
+            self.tr("About Referentials"), about_menu
+        )
         about_menu.addAction(self.action_about_referentials)
 
         self.action_about_wot = QAction(self.tr("About Web of Trust"), about_menu)
@@ -56,16 +73,26 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
 
         self.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
         self.setMaximumHeight(60)
-        self.button_network.setIconSize(self.button_network.iconSize()*dpi_ratio())
-        self.button_contacts.setIconSize(self.button_contacts.iconSize()*dpi_ratio())
-        self.button_identity.setIconSize(self.button_identity.iconSize()*dpi_ratio())
-        self.button_explore.setIconSize(self.button_explore.iconSize()*dpi_ratio())
-        self.toolbutton_menu.setIconSize(self.toolbutton_menu.iconSize()*dpi_ratio())
-        self.button_network.setFixedHeight(self.button_network.height()*dpi_ratio()+5*dpi_ratio())
-        self.button_contacts.setFixedHeight(self.button_contacts.height()*dpi_ratio()+5*dpi_ratio())
-        self.button_identity.setFixedHeight(self.button_identity.height()*dpi_ratio()+5*dpi_ratio())
-        self.button_explore.setFixedHeight(self.button_explore.height()*dpi_ratio()+5*dpi_ratio())
-        self.toolbutton_menu.setFixedHeight(self.toolbutton_menu.height()*dpi_ratio()+5*dpi_ratio())
+        self.button_network.setIconSize(self.button_network.iconSize() * dpi_ratio())
+        self.button_contacts.setIconSize(self.button_contacts.iconSize() * dpi_ratio())
+        self.button_identity.setIconSize(self.button_identity.iconSize() * dpi_ratio())
+        self.button_explore.setIconSize(self.button_explore.iconSize() * dpi_ratio())
+        self.toolbutton_menu.setIconSize(self.toolbutton_menu.iconSize() * dpi_ratio())
+        self.button_network.setFixedHeight(
+            self.button_network.height() * dpi_ratio() + 5 * dpi_ratio()
+        )
+        self.button_contacts.setFixedHeight(
+            self.button_contacts.height() * dpi_ratio() + 5 * dpi_ratio()
+        )
+        self.button_identity.setFixedHeight(
+            self.button_identity.height() * dpi_ratio() + 5 * dpi_ratio()
+        )
+        self.button_explore.setFixedHeight(
+            self.button_explore.height() * dpi_ratio() + 5 * dpi_ratio()
+        )
+        self.toolbutton_menu.setFixedHeight(
+            self.toolbutton_menu.height() * dpi_ratio() + 5 * dpi_ratio()
+        )
 
     async def ask_for_connection(self, connections):
         connections_titles = [c.title() for c in connections]
@@ -93,7 +120,8 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
 
         # set infos in label
         about_dialog.label_wot.setText(
-            self.tr("""
+            self.tr(
+                """
             <table cellpadding="5">
 <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
 <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
@@ -104,23 +132,28 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
 <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
 <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
 </table>
-""").format(
-                QLocale().toString(params.sig_period / 86400, 'f', 2),
-                self.tr('Minimum delay between 2 certifications (in days)'),
-                QLocale().toString(params.sig_validity / 86400, 'f', 2),
-                self.tr('Maximum age of a valid signature (in days)'),
+"""
+            ).format(
+                QLocale().toString(params.sig_period / 86400, "f", 2),
+                self.tr("Minimum delay between 2 certifications (in days)"),
+                QLocale().toString(params.sig_validity / 86400, "f", 2),
+                self.tr("Maximum age of a valid signature (in days)"),
                 params.sig_qty,
-                self.tr('Minimum quantity of signatures to be part of the WoT'),
+                self.tr("Minimum quantity of signatures to be part of the WoT"),
                 params.sig_stock,
-                self.tr('Maximum quantity of active certifications made by member.'),
+                self.tr("Maximum quantity of active certifications made by member."),
                 params.sig_window,
-                self.tr('Maximum delay a certification can wait before being expired for non-writing.'),
+                self.tr(
+                    "Maximum delay a certification can wait before being expired for non-writing."
+                ),
                 params.xpercent,
-                self.tr('Minimum percent of sentries to reach to match the distance rule'),
+                self.tr(
+                    "Minimum percent of sentries to reach to match the distance rule"
+                ),
                 params.ms_validity / 86400,
-                self.tr('Maximum age of a valid membership (in days)'),
+                self.tr("Maximum age of a valid membership (in days)"),
                 params.step_max,
-                self.tr('Maximum distance between each WoT member and a newcomer'),
+                self.tr("Maximum distance between each WoT member and a newcomer"),
             )
         )
         dialog.setWindowTitle(self.tr("Web of Trust rules"))
@@ -157,7 +190,8 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
         :return:
         """
         # set infos in label
-        return self.tr("""
+        return self.tr(
+            """
             <table cellpadding="5">
             <tr><td align="right"><b>{:}</b></div></td><td>{:} {:}</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:} {:}</td></tr>
@@ -169,30 +203,31 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
             </table>
-            """).format(
-                localized_data.get('ud', '####'),
-                self.tr('Universal Dividend UD(t) in'),
-                localized_data['diff_units'],
-                localized_data.get('mass', "###"),
-                self.tr('Monetary Mass M in'),
-                localized_data['units'],
-                localized_data.get('members_count', '####'),
-                self.tr('Members N'),
-                localized_data.get('mass_minus_1_per_member', '####'),
-                self.tr('Monetary Mass per member M(t-1)/N(t-1) in'),
-                localized_data['diff_units'],
-                localized_data.get('actual_growth', 0),
-                localized_data.get('days_per_dividend', '####'),
-                self.tr('Actual growth c = UD(t)/[M(t-1)/N(t)]'),
-                localized_data.get('ud_median_time_minus_1', '####'),
-                self.tr('Penultimate UD date and time (t-1)'),
-                localized_data.get('ud_median_time', '####') + " BAT",
-                self.tr('Last UD date and time (t)'),
-                localized_data.get('next_ud_median_time', '####') + " BAT",
-                self.tr('Next UD date and time (t+1)'),
-                localized_data.get('next_ud_reeval', '####') + " BAT",
-                self.tr('Next UD reevaluation (t+1)')
-            )
+            """
+        ).format(
+            localized_data.get("ud", "####"),
+            self.tr("Universal Dividend UD(t) in"),
+            localized_data["diff_units"],
+            localized_data.get("mass", "###"),
+            self.tr("Monetary Mass M in"),
+            localized_data["units"],
+            localized_data.get("members_count", "####"),
+            self.tr("Members N"),
+            localized_data.get("mass_minus_1_per_member", "####"),
+            self.tr("Monetary Mass per member M(t-1)/N(t-1) in"),
+            localized_data["diff_units"],
+            localized_data.get("actual_growth", 0),
+            localized_data.get("days_per_dividend", "####"),
+            self.tr("Actual growth c = UD(t)/[M(t-1)/N(t)]"),
+            localized_data.get("ud_median_time_minus_1", "####"),
+            self.tr("Penultimate UD date and time (t-1)"),
+            localized_data.get("ud_median_time", "####") + " BAT",
+            self.tr("Last UD date and time (t)"),
+            localized_data.get("next_ud_median_time", "####") + " BAT",
+            self.tr("Next UD date and time (t+1)"),
+            localized_data.get("next_ud_reeval", "####") + " BAT",
+            self.tr("Next UD reevaluation (t+1)"),
+        )
 
     def rules_text(self, localized_data):
         """
@@ -201,26 +236,30 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
         :return:
         """
         # set infos in label
-        return self.tr("""
+        return self.tr(
+            """
             <table cellpadding="5">
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
             </table>
-            """).format(
-                self.tr('{:2.2%} / {:} days').format(localized_data['growth'], localized_data['days_per_dividend']),
-                self.tr('Fundamental growth (c) / Delta time (dt)'),
-                self.tr('UDĞ(t) = UDĞ(t-1) + c²*M(t-1)/N(t-1)'),
-                self.tr('Universal Dividend (formula)'),
-                self.tr('{:} = {:} + {:2.2%}² * {:} / {:}').format(
-                    localized_data.get('ud_plus_1', '####'),
-                    localized_data.get('ud', '####'),
-                    localized_data.get('growth', '####'),
-                    localized_data.get('mass_minus_1', '####'),
-                    localized_data.get('members_count_minus_1', '####')
-                ),
-                self.tr('Universal Dividend (computed)')
-            )
+            """
+        ).format(
+            self.tr("{:2.2%} / {:} days").format(
+                localized_data["growth"], localized_data["days_per_dividend"]
+            ),
+            self.tr("Fundamental growth (c) / Delta time (dt)"),
+            self.tr("UDĞ(t) = UDĞ(t-1) + c²*M(t-1)/N(t-1)"),
+            self.tr("Universal Dividend (formula)"),
+            self.tr("{:} = {:} + {:2.2%}² * {:} / {:}").format(
+                localized_data.get("ud_plus_1", "####"),
+                localized_data.get("ud", "####"),
+                localized_data.get("growth", "####"),
+                localized_data.get("mass_minus_1", "####"),
+                localized_data.get("members_count_minus_1", "####"),
+            ),
+            self.tr("Universal Dividend (computed)"),
+        )
 
     def text_referential(self, ref):
         """
@@ -235,11 +274,16 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
                 <tr><th>{:}</th><td>{:}</td></tr>
                 </table>
                 """
-        return ref_template.format(self.tr('Name'), ref.translated_name(),
-                                                 self.tr('Units'), ref.units,
-                                                 self.tr('Formula'), ref.formula,
-                                                 self.tr('Description'), ref.description
-                                                 )
+        return ref_template.format(
+            self.tr("Name"),
+            ref.translated_name(),
+            self.tr("Units"),
+            ref.units,
+            self.tr("Formula"),
+            ref.formula,
+            self.tr("Description"),
+            ref.description,
+        )
 
     def money_text(self, params, currency):
         """
@@ -259,7 +303,8 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
         dt_reeval_as_str = self.tr("{:} day(s) {:} hour(s)").format(*dt_reeval_dhms)
 
         # set infos in label
-        return self.tr("""
+        return self.tr(
+            """
             <table cellpadding="5">
             <tr><td align="right"><b>{:2.2%} / {:} days</b></td><td>{:}</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:} {:}</td></tr>
@@ -270,26 +315,29 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
             <tr><td align="right"><b>{:2.0%}</b></td><td>{:}</td></tr>
             </table>
-            """).format(
-                params.c,
-                QLocale().toString(params.dt / 86400, 'f', 2),
-                self.tr('Fundamental growth (c)'),
-                params.ud0,
-                self.tr('Initial Universal Dividend UD(0) in'),
-                currency,
-                dt_as_str,
-                self.tr('Time period between two UD'),
-                dt_reeval_as_str,
-                self.tr('Time period between two UD reevaluation'),
-                params.median_time_blocks,
-                self.tr('Number of blocks used for calculating median time'),
-                params.avg_gen_time,
-                self.tr('The average time in seconds for writing 1 block (wished time)'),
-                params.dt_diff_eval,
-                self.tr('The number of blocks required to evaluate again PoWMin value'),
-                params.percent_rot,
-                self.tr('The percent of previous issuers to reach for personalized difficulty')
-            )
+            """
+        ).format(
+            params.c,
+            QLocale().toString(params.dt / 86400, "f", 2),
+            self.tr("Fundamental growth (c)"),
+            params.ud0,
+            self.tr("Initial Universal Dividend UD(0) in"),
+            currency,
+            dt_as_str,
+            self.tr("Time period between two UD"),
+            dt_reeval_as_str,
+            self.tr("Time period between two UD reevaluation"),
+            params.median_time_blocks,
+            self.tr("Number of blocks used for calculating median time"),
+            params.avg_gen_time,
+            self.tr("The average time in seconds for writing 1 block (wished time)"),
+            params.dt_diff_eval,
+            self.tr("The number of blocks required to evaluate again PoWMin value"),
+            params.percent_rot,
+            self.tr(
+                "The percent of previous issuers to reach for personalized difficulty"
+            ),
+        )
 
     def show_about(self, text):
         dialog = QDialog(self)
diff --git a/src/sakia/gui/main_window/view.py b/src/sakia/gui/main_window/view.py
index 024a392eabe5ec46580a1084c58aa25674210443..9ab91913cc567e64504f5d1ca07f2064f3ffaddf 100644
--- a/src/sakia/gui/main_window/view.py
+++ b/src/sakia/gui/main_window/view.py
@@ -10,4 +10,3 @@ class MainWindowView(QMainWindow, Ui_MainWindow):
     def __init__(self):
         super().__init__(None)
         self.setupUi(self)
-
diff --git a/src/sakia/gui/navigation/controller.py b/src/sakia/gui/navigation/controller.py
index 14f359340b07562f9066b0d73365458abc662cad..1210084b8f91c0dc70c8295f95fa5e433e9317df 100644
--- a/src/sakia/gui/navigation/controller.py
+++ b/src/sakia/gui/navigation/controller.py
@@ -7,7 +7,11 @@ from sakia.data.entities import Connection
 from sakia.decorators import asyncify
 from sakia.gui.sub.password_input import PasswordInputController
 from sakia.gui.widgets import toast
-from sakia.gui.widgets.dialogs import QAsyncMessageBox, dialog_async_exec, QAsyncFileDialog
+from sakia.gui.widgets.dialogs import (
+    QAsyncMessageBox,
+    dialog_async_exec,
+    QAsyncFileDialog,
+)
 from sakia.models.generic_tree import GenericTreeModel
 from .graphs.wot.controller import WotController
 from .homescreen.controller import HomeScreenController
@@ -23,6 +27,7 @@ class NavigationController(QObject):
     """
     The navigation panel
     """
+
     currency_changed = pyqtSignal(str)
     connection_changed = pyqtSignal(Connection)
 
@@ -37,12 +42,12 @@ class NavigationController(QObject):
         self.view = view
         self.model = model
         self.components = {
-            'TxHistory': TxHistoryController,
-            'HomeScreen': HomeScreenController,
-            'Network': NetworkController,
-            'Identities': IdentitiesController,
-            'Informations': IdentityController,
-            'Wot': WotController
+            "TxHistory": TxHistoryController,
+            "HomeScreen": HomeScreenController,
+            "Network": NetworkController,
+            "Identities": IdentitiesController,
+            "Informations": IdentityController,
+            "Wot": WotController,
         }
         self.view.current_view_changed.connect(self.handle_view_change)
         self.view.setContextMenuPolicy(Qt.CustomContextMenu)
@@ -68,41 +73,43 @@ class NavigationController(QObject):
         return navigation
 
     def open_network_view(self, _):
-        raw_data = self.model.get_raw_data('Network')
+        raw_data = self.model.get_raw_data("Network")
         if raw_data:
-            widget = raw_data['widget']
+            widget = raw_data["widget"]
             if self.view.stacked_widget.indexOf(widget) != -1:
                 self.view.stacked_widget.setCurrentWidget(widget)
                 self.view.current_view_changed.emit(raw_data)
                 return
 
     def open_wot_view(self, _):
-        raw_data = self.model.get_raw_data('Wot')
+        raw_data = self.model.get_raw_data("Wot")
         if raw_data:
-            widget = raw_data['widget']
+            widget = raw_data["widget"]
             if self.view.stacked_widget.indexOf(widget) != -1:
                 self.view.stacked_widget.setCurrentWidget(widget)
                 self.view.current_view_changed.emit(raw_data)
                 return
 
     def open_identities_view(self, _):
-        raw_data = self.model.get_raw_data('Identities')
+        raw_data = self.model.get_raw_data("Identities")
         if raw_data:
-            widget = raw_data['widget']
+            widget = raw_data["widget"]
             if self.view.stacked_widget.indexOf(widget) != -1:
                 self.view.stacked_widget.setCurrentWidget(widget)
                 self.view.current_view_changed.emit(raw_data)
                 return
 
     def parse_node(self, node_data):
-        if 'component' in node_data:
-            component_class = self.components[node_data['component']]
-            component = component_class.create(self, self.model.app, **node_data['dependencies'])
+        if "component" in node_data:
+            component_class = self.components[node_data["component"]]
+            component = component_class.create(
+                self, self.model.app, **node_data["dependencies"]
+            )
             self._components_controllers.append(component)
             widget = self.view.add_widget(component.view)
-            node_data['widget'] = widget
-        if 'children' in node_data:
-            for child in node_data['children']:
+            node_data["widget"] = widget
+        if "children" in node_data:
+            for child in node_data["children"]:
                 self.parse_node(child)
 
     def init_navigation(self):
@@ -124,11 +131,11 @@ class NavigationController(QObject):
         :param dict raw_data:
         :return:
         """
-        user_identity = raw_data.get('user_identity', None)
-        currency = raw_data.get('currency', None)
-        if user_identity != self.model.current_data('user_identity'):
+        user_identity = raw_data.get("user_identity", None)
+        currency = raw_data.get("currency", None)
+        if user_identity != self.model.current_data("user_identity"):
             self.account_changed.emit(user_identity)
-        if currency != self.model.current_data('currency'):
+        if currency != self.model.current_data("currency"):
             self.currency_changed.emit(currency)
         self.model.set_current_data(raw_data)
 
@@ -140,52 +147,80 @@ class NavigationController(QObject):
     def tree_context_menu(self, point):
         mapped = self.view.splitter.mapFromParent(point)
         index = self.view.tree_view.indexAt(mapped)
-        raw_data = self.view.tree_view.model().data(index, GenericTreeModel.ROLE_RAW_DATA)
+        raw_data = self.view.tree_view.model().data(
+            index, GenericTreeModel.ROLE_RAW_DATA
+        )
         if raw_data:
             menu = QMenu(self.view)
-            if raw_data['misc']['connection'].uid:
+            if raw_data["misc"]["connection"].uid:
                 action_view_in_wot = QAction(self.tr("View in Web of Trust"), menu)
                 menu.addAction(action_view_in_wot)
-                action_view_in_wot.triggered.connect(lambda c:
-                                                        self.model.view_in_wot(raw_data['misc']['connection']))
+                action_view_in_wot.triggered.connect(
+                    lambda c: self.model.view_in_wot(raw_data["misc"]["connection"])
+                )
 
-                action_gen_revokation = QAction(self.tr("Save revokation document"), menu)
+                action_gen_revokation = QAction(
+                    self.tr("Save revokation document"), menu
+                )
                 menu.addAction(action_gen_revokation)
-                action_gen_revokation.triggered.connect(lambda c:
-                                                        self.action_save_revokation(raw_data['misc']['connection']))
+                action_gen_revokation.triggered.connect(
+                    lambda c: self.action_save_revokation(
+                        raw_data["misc"]["connection"]
+                    )
+                )
 
                 action_publish_uid = QAction(self.tr("Publish UID"), menu)
                 menu.addAction(action_publish_uid)
-                action_publish_uid.triggered.connect(lambda c:
-                                                        self.publish_uid(raw_data['misc']['connection']))
-                identity_published = self.model.identity_published(raw_data['misc']['connection'])
+                action_publish_uid.triggered.connect(
+                    lambda c: self.publish_uid(raw_data["misc"]["connection"])
+                )
+                identity_published = self.model.identity_published(
+                    raw_data["misc"]["connection"]
+                )
                 action_publish_uid.setEnabled(not identity_published)
 
-                action_export_identity = QAction(self.tr("Export identity document"), menu)
+                action_export_identity = QAction(
+                    self.tr("Export identity document"), menu
+                )
                 menu.addAction(action_export_identity)
-                action_export_identity.triggered.connect(lambda c:
-                                                        self.export_identity_document(raw_data['misc']['connection']))
+                action_export_identity.triggered.connect(
+                    lambda c: self.export_identity_document(
+                        raw_data["misc"]["connection"]
+                    )
+                )
 
                 action_leave = QAction(self.tr("Leave the currency"), menu)
                 menu.addAction(action_leave)
-                action_leave.triggered.connect(lambda c: self.send_leave(raw_data['misc']['connection']))
-                action_leave.setEnabled(self.model.identity_is_member(raw_data['misc']['connection']))
+                action_leave.triggered.connect(
+                    lambda c: self.send_leave(raw_data["misc"]["connection"])
+                )
+                action_leave.setEnabled(
+                    self.model.identity_is_member(raw_data["misc"]["connection"])
+                )
 
             copy_pubkey = QAction(menu.tr("Copy pubkey to clipboard"), menu.parent())
-            copy_pubkey.triggered.connect(lambda checked,
-                                                 c=raw_data['misc']['connection']: \
-                                                 NavigationModel.copy_pubkey_to_clipboard(c))
+            copy_pubkey.triggered.connect(
+                lambda checked, c=raw_data["misc"][
+                    "connection"
+                ]: NavigationModel.copy_pubkey_to_clipboard(c)
+            )
             menu.addAction(copy_pubkey)
 
-            copy_pubkey_crc = QAction(menu.tr("Copy pubkey to clipboard (with CRC)"), menu.parent())
-            copy_pubkey_crc.triggered.connect(lambda checked,
-                                                     c=raw_data['misc']['connection']: \
-                                              NavigationModel.copy_pubkey_to_clipboard_with_crc(c))
+            copy_pubkey_crc = QAction(
+                menu.tr("Copy pubkey to clipboard (with CRC)"), menu.parent()
+            )
+            copy_pubkey_crc.triggered.connect(
+                lambda checked, c=raw_data["misc"][
+                    "connection"
+                ]: NavigationModel.copy_pubkey_to_clipboard_with_crc(c)
+            )
             menu.addAction(copy_pubkey_crc)
 
             action_remove = QAction(self.tr("Remove the connection"), menu)
             menu.addAction(action_remove)
-            action_remove.triggered.connect(lambda c: self.remove_connection(raw_data['misc']['connection']))
+            action_remove.triggered.connect(
+                lambda c: self.remove_connection(raw_data["misc"]["connection"])
+            )
             # Show the context menu.
 
             menu.popup(QCursor.pos())
@@ -195,7 +230,9 @@ class NavigationController(QObject):
         identity = self.model.generate_identity(connection)
         identity_doc = identity.document()
         if not identity_doc.signatures:
-            secret_key, password = await PasswordInputController.open_dialog(self, connection)
+            secret_key, password = await PasswordInputController.open_dialog(
+                self, connection
+            )
             if not password or not secret_key:
                 return
             key = SigningKey(secret_key, password, connection.scrypt_params)
@@ -208,71 +245,102 @@ class NavigationController(QObject):
             if self.model.notifications():
                 toast.display(self.tr("UID"), self.tr("Success publishing your UID"))
             else:
-                await QAsyncMessageBox.information(self.view, self.tr("UID"),
-                                                        self.tr("Success publishing your UID"))
+                await QAsyncMessageBox.information(
+                    self.view, self.tr("UID"), self.tr("Success publishing your UID")
+                )
         else:
             if not self.model.notifications():
                 toast.display(self.tr("UID"), result[1])
             else:
-                await QAsyncMessageBox.critical(self.view, self.tr("UID"),
-                                                        result[1])
+                await QAsyncMessageBox.critical(self.view, self.tr("UID"), result[1])
 
     @asyncify
     async def send_leave(self):
-        reply = await QAsyncMessageBox.warning(self, self.tr("Warning"),
-                                               self.tr("""Are you sure ?
+        reply = await QAsyncMessageBox.warning(
+            self,
+            self.tr("Warning"),
+            self.tr(
+                """Are you sure ?
 Sending a leaving demand  cannot be canceled.
-The process to join back the community later will have to be done again.""")
-                                               .format(self.account.pubkey), QMessageBox.Ok | QMessageBox.Cancel)
+The process to join back the community later will have to be done again."""
+            ).format(self.account.pubkey),
+            QMessageBox.Ok | QMessageBox.Cancel,
+        )
         if reply == QMessageBox.Ok:
             connection = self.model.navigation_model.navigation.current_connection()
-            secret_key, password = await PasswordInputController.open_dialog(self, connection)
+            secret_key, password = await PasswordInputController.open_dialog(
+                self, connection
+            )
             if not password or not secret_key:
                 return
             result = await self.model.send_leave(connection, secret_key, password)
             if result[0]:
-                if self.app.preferences['notifications']:
-                    toast.display(self.tr("Revoke"), self.tr("Success sending Revoke demand"))
+                if self.app.preferences["notifications"]:
+                    toast.display(
+                        self.tr("Revoke"), self.tr("Success sending Revoke demand")
+                    )
                 else:
-                    await QAsyncMessageBox.information(self, self.tr("Revoke"),
-                                                       self.tr("Success sending Revoke demand"))
+                    await QAsyncMessageBox.information(
+                        self,
+                        self.tr("Revoke"),
+                        self.tr("Success sending Revoke demand"),
+                    )
             else:
-                if self.app.preferences['notifications']:
+                if self.app.preferences["notifications"]:
                     toast.display(self.tr("Revoke"), result[1])
                 else:
-                    await QAsyncMessageBox.critical(self, self.tr("Revoke"),
-                                                    result[1])
+                    await QAsyncMessageBox.critical(self, self.tr("Revoke"), result[1])
 
     @asyncify
     async def remove_connection(self, connection):
-        reply = await QAsyncMessageBox.question(self.view, self.tr("Removing the connection"),
-                                                self.tr("""Are you sure ? This won't remove your money"
-neither your identity from the network."""), QMessageBox.Ok | QMessageBox.Cancel)
+        reply = await QAsyncMessageBox.question(
+            self.view,
+            self.tr("Removing the connection"),
+            self.tr(
+                """Are you sure ? This won't remove your money"
+neither your identity from the network."""
+            ),
+            QMessageBox.Ok | QMessageBox.Cancel,
+        )
         if reply == QMessageBox.Ok:
             await self.model.remove_connection(connection)
             self.init_navigation()
 
     @asyncify
     async def action_save_revokation(self, connection):
-        secret_key, password = await PasswordInputController.open_dialog(self, connection)
+        secret_key, password = await PasswordInputController.open_dialog(
+            self, connection
+        )
         if not password or not secret_key:
             return
 
-        raw_document, _ = self.model.generate_revocation(connection, secret_key, password)
+        raw_document, _ = self.model.generate_revocation(
+            connection, secret_key, password
+        )
         # Testable way of using a QFileDialog
-        selected_files = await QAsyncFileDialog.get_save_filename(self.view, self.tr("Save a revokation document"),
-                                                                  "", self.tr("All text files (*.txt)"))
+        selected_files = await QAsyncFileDialog.get_save_filename(
+            self.view,
+            self.tr("Save a revokation document"),
+            "",
+            self.tr("All text files (*.txt)"),
+        )
         if selected_files:
             path = selected_files[0]
-            if not path.endswith('.txt'):
+            if not path.endswith(".txt"):
                 path = "{0}.txt".format(path)
-            with open(path, 'w') as save_file:
+            with open(path, "w") as save_file:
                 save_file.write(raw_document)
 
-            dialog = QMessageBox(QMessageBox.Information, self.tr("Revokation file"),
-                                 self.tr("""<div>Your revokation document has been saved.</div>
+            dialog = QMessageBox(
+                QMessageBox.Information,
+                self.tr("Revokation file"),
+                self.tr(
+                    """<div>Your revokation document has been saved.</div>
 <div><b>Please keep it in a safe place.</b></div>
-The publication of this document will remove your identity from the network.</p>"""), QMessageBox.Ok)
+The publication of this document will remove your identity from the network.</p>"""
+                ),
+                QMessageBox.Ok,
+            )
             dialog.setTextFormat(Qt.RichText)
             await dialog_async_exec(dialog)
 
@@ -281,7 +349,9 @@ The publication of this document will remove your identity from the network.</p>
         identity = self.model.generate_identity(connection)
         identity_doc = identity.document()
         if not identity_doc.signatures[0]:
-            secret_key, password = await PasswordInputController.open_dialog(self, connection)
+            secret_key, password = await PasswordInputController.open_dialog(
+                self, connection
+            )
             if not password or not secret_key:
                 return
             key = SigningKey(secret_key, password, connection.scrypt_params)
@@ -289,17 +359,27 @@ The publication of this document will remove your identity from the network.</p>
             identity.signature = identity_doc.signatures[0]
             self.model.update_identity(identity)
 
-        selected_files = await QAsyncFileDialog.get_save_filename(self.view, self.tr("Save an identity document"),
-                                                                  "", self.tr("All text files (*.txt)"))
+        selected_files = await QAsyncFileDialog.get_save_filename(
+            self.view,
+            self.tr("Save an identity document"),
+            "",
+            self.tr("All text files (*.txt)"),
+        )
         if selected_files:
             path = selected_files[0]
-            if not path.endswith('.txt'):
+            if not path.endswith(".txt"):
                 path = "{0}.txt".format(path)
-            with open(path, 'w') as save_file:
+            with open(path, "w") as save_file:
                 save_file.write(identity_doc.signed_raw())
 
-            dialog = QMessageBox(QMessageBox.Information, self.tr("Identity file"),
-                                 self.tr("""<div>Your identity document has been saved.</div>
-Share this document to your friends for them to certify you.</p>"""), QMessageBox.Ok)
+            dialog = QMessageBox(
+                QMessageBox.Information,
+                self.tr("Identity file"),
+                self.tr(
+                    """<div>Your identity document has been saved.</div>
+Share this document to your friends for them to certify you.</p>"""
+                ),
+                QMessageBox.Ok,
+            )
             dialog.setTextFormat(Qt.RichText)
             await dialog_async_exec(dialog)
diff --git a/src/sakia/gui/navigation/graphs/base/controller.py b/src/sakia/gui/navigation/graphs/base/controller.py
index 7c3c818623a8395347f4fb61d3a780f519286135..ba4df2b6c52f972e287bb20c516b04a73229c767 100644
--- a/src/sakia/gui/navigation/graphs/base/controller.py
+++ b/src/sakia/gui/navigation/graphs/base/controller.py
@@ -36,7 +36,7 @@ class BaseGraphController(QObject):
 
     @pyqtSlot(str, dict)
     def handle_node_click(self, pubkey, metadata):
-        asyncio.ensure_future(self.draw_graph(metadata['identity']))
+        asyncio.ensure_future(self.draw_graph(metadata["identity"]))
 
     async def draw_graph(self, identity):
         """
diff --git a/src/sakia/gui/navigation/graphs/base/edge.py b/src/sakia/gui/navigation/graphs/base/edge.py
index 1a2ceb32870bfa6c2ffe421b62c4034e5150b21c..5790e2c13dc9a515372254c16d6984c86426310e 100644
--- a/src/sakia/gui/navigation/graphs/base/edge.py
+++ b/src/sakia/gui/navigation/graphs/base/edge.py
@@ -18,9 +18,11 @@ class BaseEdge(QGraphicsLineItem):
         self.source = source_node
         self.destination = destination_node
 
-        self.status = self.metadata['status']
+        self.status = self.metadata["status"]
 
         self.source_point = QPointF(nx_pos[self.source][0], nx_pos[self.source][1])
-        self.destination_point = QPointF(nx_pos[self.destination][0], nx_pos[self.destination][1])
+        self.destination_point = QPointF(
+            nx_pos[self.destination][0], nx_pos[self.destination][1]
+        )
 
         self.setAcceptedMouseButtons(Qt.NoButton)
diff --git a/src/sakia/gui/navigation/graphs/base/model.py b/src/sakia/gui/navigation/graphs/base/model.py
index fbc41f13c765788c7cdc1856111fcf831604de62..f88f0ea05f3835d152d80945512afe6acc89d264 100644
--- a/src/sakia/gui/navigation/graphs/base/model.py
+++ b/src/sakia/gui/navigation/graphs/base/model.py
@@ -1,5 +1,6 @@
 from PyQt5.QtCore import QObject
 
+
 class BaseGraphModel(QObject):
     """
     The model of Navigation component
diff --git a/src/sakia/gui/navigation/graphs/base/node.py b/src/sakia/gui/navigation/graphs/base/node.py
index 5dc64a2a5a0be64381b0fad2d100409da3d07577..7a95b69083e5d5af08c92add3c86340369672350 100644
--- a/src/sakia/gui/navigation/graphs/base/node.py
+++ b/src/sakia/gui/navigation/graphs/base/node.py
@@ -1,7 +1,10 @@
 from PyQt5.QtCore import Qt
 from PyQt5.QtGui import QMouseEvent
-from PyQt5.QtWidgets import QGraphicsEllipseItem, QGraphicsSceneHoverEvent, \
-    QGraphicsSceneContextMenuEvent
+from PyQt5.QtWidgets import (
+    QGraphicsEllipseItem,
+    QGraphicsSceneHoverEvent,
+    QGraphicsSceneContextMenuEvent,
+)
 
 from sakia.data.graphs.constants import NodeStatus
 
@@ -17,15 +20,15 @@ class BaseNode(QGraphicsEllipseItem):
 
         super().__init__()
 
-        self.metadata = nx_node[1]['attr_dict']
+        self.metadata = nx_node[1]["attr_dict"]
         self.id = nx_node[0]
         # unpack tuple
         x, y = pos[nx_node[0]]
         self.setPos(x, y)
-        self.status_wallet = self.metadata['status'] & NodeStatus.HIGHLIGHTED
-        self.status_member = not self.metadata['status'] & NodeStatus.OUT
-        self.text = self.metadata['text']
-        self.setToolTip(self.text + " - " + self.metadata['tooltip'])
+        self.status_wallet = self.metadata["status"] & NodeStatus.HIGHLIGHTED
+        self.status_member = not self.metadata["status"] & NodeStatus.OUT
+        self.text = self.metadata["text"]
+        self.setToolTip(self.text + " - " + self.metadata["tooltip"])
         self.arcs = []
         self.menu = None
         self.action_sign = None
@@ -35,10 +38,10 @@ class BaseNode(QGraphicsEllipseItem):
 
     def update_metadata(self, metadata):
         self.metadata = metadata
-        self.status_wallet = self.metadata['status'] & NodeStatus.HIGHLIGHTED
-        self.status_member = not self.metadata['status'] & NodeStatus.OUT
-        self.text = self.metadata['text']
-        self.setToolTip(self.text + " - " + self.metadata['tooltip'])
+        self.status_wallet = self.metadata["status"] & NodeStatus.HIGHLIGHTED
+        self.status_member = not self.metadata["status"] & NodeStatus.OUT
+        self.text = self.metadata["text"]
+        self.setToolTip(self.text + " - " + self.metadata["tooltip"])
 
     def mousePressEvent(self, event: QMouseEvent):
         """
@@ -66,5 +69,4 @@ class BaseNode(QGraphicsEllipseItem):
 
         :param event: scene context menu event
         """
-        self.scene().node_context_menu_requested.emit(self.metadata['identity'])
-
+        self.scene().node_context_menu_requested.emit(self.metadata["identity"])
diff --git a/src/sakia/gui/navigation/graphs/base/view.py b/src/sakia/gui/navigation/graphs/base/view.py
index 3908124859578d54c41e34d1f116358a53b6c80d..62669e5305f6e0176973869f13bfeda9d2274257 100644
--- a/src/sakia/gui/navigation/graphs/base/view.py
+++ b/src/sakia/gui/navigation/graphs/base/view.py
@@ -21,4 +21,4 @@ class BaseGraphView(QWidget):
         """
         if event.type() == QEvent.LanguageChange:
             self.retranslateUi(self)
-        return super().changeEvent(event)
\ No newline at end of file
+        return super().changeEvent(event)
diff --git a/src/sakia/gui/navigation/graphs/wot/edge.py b/src/sakia/gui/navigation/graphs/wot/edge.py
index 29053a06f7522e2b0a107f02d11ef3d64f4c384c..3a03d27b12d2a24319ee5593eccbc0cadcd8b329 100644
--- a/src/sakia/gui/navigation/graphs/wot/edge.py
+++ b/src/sakia/gui/navigation/graphs/wot/edge.py
@@ -1,7 +1,6 @@
 import math
 
-from PyQt5.QtCore import Qt, QRectF, QLineF, QPointF, QSizeF, \
-                        qFuzzyCompare
+from PyQt5.QtCore import Qt, QRectF, QLineF, QPointF, QSizeF, qFuzzyCompare
 from PyQt5.QtGui import QColor, QPen, QPolygonF
 
 from sakia.data.graphs.constants import EdgeStatus
@@ -23,13 +22,10 @@ class WotEdge(BaseEdge):
         #  cursor change on hover
         self.setAcceptHoverEvents(True)
         self.setZValue(0)
-        self._colors = {
-            EdgeStatus.STRONG: 'blue',
-            EdgeStatus.WEAK: 'salmon'
-        }
+        self._colors = {EdgeStatus.STRONG: "blue", EdgeStatus.WEAK: "salmon"}
         self._line_styles = {
             EdgeStatus.STRONG: Qt.SolidLine,
-            EdgeStatus.WEAK: Qt.DashLine
+            EdgeStatus.WEAK: Qt.DashLine,
         }
 
     @property
@@ -52,16 +48,16 @@ class WotEdge(BaseEdge):
         pen_width = 1.0
         extra = (pen_width + self.arrow_size) / 2.0
 
-        return QRectF(
-            self.source_point, QSizeF(
-                self.destination_point.x() - self.source_point.x(),
-                self.destination_point.y() - self.source_point.y()
+        return (
+            QRectF(
+                self.source_point,
+                QSizeF(
+                    self.destination_point.x() - self.source_point.x(),
+                    self.destination_point.y() - self.source_point.y(),
+                ),
             )
-        ).normalized().adjusted(
-            -extra,
-            -extra,
-            extra,
-            extra
+            .normalized()
+            .adjusted(-extra, -extra, extra, extra)
         )
 
     def paint(self, painter, option, widget):
@@ -100,13 +96,17 @@ class WotEdge(BaseEdge):
         painter.setPen(QPen(color, 1, Qt.SolidLine, Qt.RoundCap, Qt.RoundJoin))
         destination_arrow_p1 = head_point + QPointF(
             math.sin(angle - math.pi / 3) * self.arrow_size,
-            math.cos(angle - math.pi / 3) * self.arrow_size)
+            math.cos(angle - math.pi / 3) * self.arrow_size,
+        )
         destination_arrow_p2 = head_point + QPointF(
             math.sin(angle - math.pi + math.pi / 3) * self.arrow_size,
-            math.cos(angle - math.pi + math.pi / 3) * self.arrow_size)
+            math.cos(angle - math.pi + math.pi / 3) * self.arrow_size,
+        )
 
         painter.setBrush(color)
-        painter.drawPolygon(QPolygonF([head_point, destination_arrow_p1, destination_arrow_p2]))
+        painter.drawPolygon(
+            QPolygonF([head_point, destination_arrow_p1, destination_arrow_p2])
+        )
 
         if self.metadata["confirmation_text"]:
             painter.drawText(head_point, self.metadata["confirmation_text"])
diff --git a/src/sakia/gui/navigation/graphs/wot/graphics_view.py b/src/sakia/gui/navigation/graphs/wot/graphics_view.py
index 95aaae1bde9224aad4539dc1b6d311de9bc1a0c7..9a096dfaf92b1eb5b485530254b15ae21b8fa4c1 100644
--- a/src/sakia/gui/navigation/graphs/wot/graphics_view.py
+++ b/src/sakia/gui/navigation/graphs/wot/graphics_view.py
@@ -40,4 +40,4 @@ class WotGraphicsView(QGraphicsView):
         #  act normally on scrollbar
         else:
             # transmit event to parent class wheelevent
-            super().wheelEvent(event)
\ No newline at end of file
+            super().wheelEvent(event)
diff --git a/src/sakia/gui/navigation/graphs/wot/model.py b/src/sakia/gui/navigation/graphs/wot/model.py
index 92e567c12c6d8be1286705140501e5d87ad4ac49..c845ea6f2e3ad2f9d51d0bcf0deb3ba9ad6de03d 100644
--- a/src/sakia/gui/navigation/graphs/wot/model.py
+++ b/src/sakia/gui/navigation/graphs/wot/model.py
@@ -22,7 +22,9 @@ class WotModel(BaseGraphModel):
         self._connections_processor = ConnectionsProcessor.instanciate(self.app)
         self.blockchain_service = blockchain_service
         self.identities_service = identities_service
-        self.wot_graph = WoTGraph(self.app, self.blockchain_service, self.identities_service)
+        self.wot_graph = WoTGraph(
+            self.app, self.blockchain_service, self.identities_service
+        )
         self.identity = None
 
     async def set_identity(self, identity=None):
diff --git a/src/sakia/gui/navigation/graphs/wot/node.py b/src/sakia/gui/navigation/graphs/wot/node.py
index 0d99b01eb9540b26cd70864637eb34a975bd7010..a72e5ceee248e2fdc15a70fc100b4d41b268daec 100644
--- a/src/sakia/gui/navigation/graphs/wot/node.py
+++ b/src/sakia/gui/navigation/graphs/wot/node.py
@@ -17,42 +17,49 @@ class WotNode(BaseNode):
         super().__init__(nx_node, pos)
 
         # color around ellipse
-        outline_color = QColor('grey')
+        outline_color = QColor("grey")
         outline_style = Qt.SolidLine
         outline_width = 1
         if self.status_wallet:
-            outline_color = QColor('black')
+            outline_color = QColor("black")
             outline_width = 2
         if not self.status_member:
-            outline_color = QColor('red')
+            outline_color = QColor("red")
             outline_style = Qt.SolidLine
         self.setPen(QPen(outline_color, outline_width, outline_style))
 
         # text inside ellipse
         self.text_item = QGraphicsSimpleTextItem(self)
         self.text_item.setText(self.text)
-        text_color = QColor('grey')
+        text_color = QColor("grey")
         if self.status_wallet == NodeStatus.HIGHLIGHTED:
-            text_color = QColor('black')
+            text_color = QColor("black")
         self.text_item.setBrush(QBrush(text_color))
         # center ellipse around text
         self.setRect(
             0,
             0,
             self.text_item.boundingRect().width() * 2,
-            self.text_item.boundingRect().height() * 2
+            self.text_item.boundingRect().height() * 2,
         )
 
         #  set anchor to the center
         self.setTransform(
-            QTransform().translate(-self.boundingRect().width() / 2.0, -self.boundingRect().height() / 2.0))
+            QTransform().translate(
+                -self.boundingRect().width() / 2.0, -self.boundingRect().height() / 2.0
+            )
+        )
         # center text in ellipse
-        self.text_item.setPos(self.boundingRect().width() / 4.0, self.boundingRect().height() / 4.0)
+        self.text_item.setPos(
+            self.boundingRect().width() / 4.0, self.boundingRect().height() / 4.0
+        )
 
         # create gradient inside the ellipse
-        gradient = QRadialGradient(QPointF(0, self.boundingRect().height() / 4), self.boundingRect().width())
-        gradient.setColorAt(0, QColor('white'))
-        gradient.setColorAt(1, QColor('darkgrey'))
+        gradient = QRadialGradient(
+            QPointF(0, self.boundingRect().height() / 4), self.boundingRect().width()
+        )
+        gradient.setColorAt(0, QColor("white"))
+        gradient.setColorAt(1, QColor("darkgrey"))
         self.setBrush(QBrush(gradient))
 
         # cursor change on hover
diff --git a/src/sakia/gui/navigation/graphs/wot/scene.py b/src/sakia/gui/navigation/graphs/wot/scene.py
index 03c65b2651064d4fbe16abd1f68542cb0a0e760b..937577e058521181b7922e99c760439d5bb64a9c 100644
--- a/src/sakia/gui/navigation/graphs/wot/scene.py
+++ b/src/sakia/gui/navigation/graphs/wot/scene.py
@@ -41,13 +41,19 @@ class WotScene(BaseScene):
 
         certified = [n for n in nx_graph.nodes(data=True) if n[0] in certified_edge]
 
-        pos = {center: (0, max(len(certified_edge),
-                            len(certifier_edge))/2*0.12*scale)}
+        pos = {
+            center: (
+                0,
+                max(len(certified_edge), len(certifier_edge)) / 2 * 0.12 * scale,
+            )
+        }
 
         y = 0
         x = 1 * scale
         # sort by text
-        sort_certified = sorted(certified, key=lambda node_: node_[1]['attr_dict']['text'].lower())
+        sort_certified = sorted(
+            certified, key=lambda node_: node_[1]["attr_dict"]["text"].lower()
+        )
         # add nodes and arcs
         for n in sort_certified:
             y += 0.25 * scale
@@ -72,12 +78,16 @@ class WotScene(BaseScene):
 
         certifier = [n for n in nx_graph.nodes(data=True) if n[0] in certifier_edge]
 
-        pos = {center: WotScene.center_pos(len(certified_edge), len(certifier_edge), scale)}
+        pos = {
+            center: WotScene.center_pos(len(certified_edge), len(certifier_edge), scale)
+        }
 
         y = 0
         x = -1 * scale
         # sort by text
-        sort_certifier = sorted(certifier, key=lambda node_: node_[1]['attr_dict']['text'].lower())
+        sort_certifier = sorted(
+            certifier, key=lambda node_: node_[1]["attr_dict"]["text"].lower()
+        )
         # add nodes and arcs
         for n in sort_certifier:
             y += 0.25 * scale
@@ -99,12 +109,16 @@ class WotScene(BaseScene):
 
         certified = [n for n in nx_graph.nodes(data=True) if n[0] in certified_edge]
 
-        pos = {center: WotScene.center_pos(len(certified_edge), len(certifier_edge), scale)}
+        pos = {
+            center: WotScene.center_pos(len(certified_edge), len(certifier_edge), scale)
+        }
 
         y = 0
         x = 1 * scale
         # sort by text
-        sort_certified = sorted(certified, key=lambda node_: node_[1]['attr_dict']['text'].lower())
+        sort_certified = sorted(
+            certified, key=lambda node_: node_[1]["attr_dict"]["text"].lower()
+        )
         # add nodes and arcs
         for n in sort_certified:
             y += 0.25 * scale
@@ -143,8 +157,12 @@ class WotScene(BaseScene):
             #  clear scene
             self.clear()
 
-            certifiers_graph_pos = WotScene.certifiers_partial_layout(nx_graph, identity.pubkey, scale=200*dpi_ratio())
-            certified_graph_pos = WotScene.certified_partial_layout(nx_graph, identity.pubkey, scale=200*dpi_ratio())
+            certifiers_graph_pos = WotScene.certifiers_partial_layout(
+                nx_graph, identity.pubkey, scale=200 * dpi_ratio()
+            )
+            certified_graph_pos = WotScene.certified_partial_layout(
+                nx_graph, identity.pubkey, scale=200 * dpi_ratio()
+            )
 
             # create networkx graph
             for node in nx_graph.nodes(data=True):
@@ -157,14 +175,24 @@ class WotScene(BaseScene):
 
             for edge in nx_graph.edges(data=True):
                 if edge[0] in certifiers_graph_pos and edge[1] == identity.pubkey:
-                    self.addItem(WotEdge(edge[0], edge[1], edge[2]['attr_dict'], certifiers_graph_pos))
+                    self.addItem(
+                        WotEdge(
+                            edge[0], edge[1], edge[2]["attr_dict"], certifiers_graph_pos
+                        )
+                    )
                 if edge[0] == identity.pubkey and edge[1] in certified_graph_pos:
-                    self.addItem(WotEdge(edge[0], edge[1], edge[2]['attr_dict'], certified_graph_pos))
+                    self.addItem(
+                        WotEdge(
+                            edge[0], edge[1], edge[2]["attr_dict"], certified_graph_pos
+                        )
+                    )
 
             self.update()
 
     def update_path(self, nx_graph, path):
-        path_graph_pos = WotScene.path_partial_layout(nx_graph, path, scale=200*dpi_ratio())
+        path_graph_pos = WotScene.path_partial_layout(
+            nx_graph, path, scale=200 * dpi_ratio()
+        )
         nodes_path = [n for n in nx_graph.nodes(data=True) if n[0] in path[1:]]
         for node in nodes_path:
             v = WotNode(node, path_graph_pos)
diff --git a/src/sakia/gui/navigation/homescreen/model.py b/src/sakia/gui/navigation/homescreen/model.py
index a9dbae61066814536fbac80e12b5fcf2e15837cb..14aa6513a1361e3eedb4d6e457da585273f5da8e 100644
--- a/src/sakia/gui/navigation/homescreen/model.py
+++ b/src/sakia/gui/navigation/homescreen/model.py
@@ -12,4 +12,4 @@ class HomeScreenModel(QObject):
 
     @property
     def account(self):
-        return self.app.current_account
\ No newline at end of file
+        return self.app.current_account
diff --git a/src/sakia/gui/navigation/identities/controller.py b/src/sakia/gui/navigation/identities/controller.py
index f45d05bb82875ace7dd3e016d876f66f71ca798e..ef8f71bb5dd54a168cf4110f7d65376744573242 100644
--- a/src/sakia/gui/navigation/identities/controller.py
+++ b/src/sakia/gui/navigation/identities/controller.py
@@ -16,6 +16,7 @@ class IdentitiesController(QObject):
     """
     The navigation panel
     """
+
     view_in_wot = pyqtSignal(Identity)
 
     def __init__(self, parent, view, model, password_asker=None):
@@ -30,8 +31,12 @@ class IdentitiesController(QObject):
         self.model = model
         self.password_asker = password_asker
         self.view.search_by_text_requested.connect(self.search_text)
-        self.view.search_directly_connected_requested.connect(self.search_direct_connections)
-        self.view.table_identities.customContextMenuRequested.connect(self.identity_context_menu)
+        self.view.search_directly_connected_requested.connect(
+            self.search_direct_connections
+        )
+        self.view.table_identities.customContextMenuRequested.connect(
+            self.identity_context_menu
+        )
         table_model = self.model.init_table_model()
         self.view.set_table_identities_model(table_model)
 
@@ -50,7 +55,9 @@ class IdentitiesController(QObject):
         if valid:
             menu = ContextMenu.from_data(self.view, self.model.app, None, (identities,))
             menu.view_identity_in_wot.connect(self.view_in_wot)
-            menu.identity_information_loaded.connect(self.model.table_model.sourceModel().identity_loaded)
+            menu.identity_information_loaded.connect(
+                self.model.table_model.sourceModel().identity_loaded
+            )
 
             # Show the context menu.
             menu.qmenu.popup(QCursor.pos())
diff --git a/src/sakia/gui/navigation/identities/model.py b/src/sakia/gui/navigation/identities/model.py
index 203c768b40006f1be9b7e4e8308eb0d66c6546d5..461fbf9439c60c55ed927910cf4f94e04a8faa37 100644
--- a/src/sakia/gui/navigation/identities/model.py
+++ b/src/sakia/gui/navigation/identities/model.py
@@ -28,7 +28,9 @@ class IdentitiesModel(QObject):
         """
         Instanciate the table model of the view
         """
-        identities_model = IdentitiesTableModel(self, self.blockchain_service, self.identities_service)
+        identities_model = IdentitiesTableModel(
+            self, self.blockchain_service, self.identities_service
+        )
         proxy = IdentitiesFilterProxyModel(self.app)
         proxy.setSourceModel(identities_model)
         self.table_model = proxy
@@ -42,9 +44,13 @@ class IdentitiesModel(QObject):
         """
         if index.isValid() and index.row() < self.table_model.rowCount():
             source_index = self.table_model.mapToSource(index)
-            identity_col = self.table_model.sourceModel().columns_ids.index('identity')
-            identity_index = self.table_model.sourceModel().index(source_index.row(), identity_col)
-            identity = self.table_model.sourceModel().data(identity_index, Qt.DisplayRole)
+            identity_col = self.table_model.sourceModel().columns_ids.index("identity")
+            identity_index = self.table_model.sourceModel().index(
+                source_index.row(), identity_col
+            )
+            identity = self.table_model.sourceModel().data(
+                identity_index, Qt.DisplayRole
+            )
             return True, identity
         return False, None
 
@@ -65,13 +71,19 @@ class IdentitiesModel(QObject):
     def linked_identities(self):
 
         # create Identity from node metadata
-        connection_identity = self.identities_service.get_identity(self.connection.pubkey)
+        connection_identity = self.identities_service.get_identity(
+            self.connection.pubkey
+        )
         linked = []
-        certifier_list = self.identities_service.certifications_received(connection_identity.pubkey)
+        certifier_list = self.identities_service.certifications_received(
+            connection_identity.pubkey
+        )
         for certification in tuple(certifier_list):
             linked.append(self.identities_service.get_identity(certification.certifier))
 
-        certified_list = self.identities_service.certifications_sent(connection_identity.pubkey)
+        certified_list = self.identities_service.certifications_sent(
+            connection_identity.pubkey
+        )
         for certification in tuple(certified_list):
             linked.append(self.identities_service.get_identity(certification.certified))
 
diff --git a/src/sakia/gui/navigation/identities/table_model.py b/src/sakia/gui/navigation/identities/table_model.py
index 9aea3a8deef26b609a23474965e4abb2724f7885..e8b6d07afb17f2e61912ed6395edcaa80088cf13 100644
--- a/src/sakia/gui/navigation/identities/table_model.py
+++ b/src/sakia/gui/navigation/identities/table_model.py
@@ -1,7 +1,14 @@
 from sakia.errors import NoPeerAvailable
 from sakia.data.processors import BlockchainProcessor
-from PyQt5.QtCore import QAbstractTableModel, QSortFilterProxyModel, Qt, \
-                        QDateTime, QModelIndex, QLocale, QT_TRANSLATE_NOOP
+from PyQt5.QtCore import (
+    QAbstractTableModel,
+    QSortFilterProxyModel,
+    Qt,
+    QDateTime,
+    QModelIndex,
+    QLocale,
+    QT_TRANSLATE_NOOP,
+)
 from PyQt5.QtGui import QColor, QIcon, QFont
 import logging
 import asyncio
@@ -15,7 +22,7 @@ class IdentitiesFilterProxyModel(QSortFilterProxyModel):
 
     def columnCount(self, parent):
         return len(IdentitiesTableModel.columns_ids) - 1
-    
+
     def lessThan(self, left, right):
         """
         Sort table by given column number.
@@ -31,8 +38,10 @@ class IdentitiesFilterProxyModel(QSortFilterProxyModel):
         source_index = self.mapToSource(index)
         if source_index.isValid():
             source_data = self.sourceModel().data(source_index, role)
-            expiration_col = IdentitiesTableModel.columns_ids.index('expiration')
-            expiration_index = self.sourceModel().index(source_index.row(), expiration_col)
+            expiration_col = IdentitiesTableModel.columns_ids.index("expiration")
+            expiration_index = self.sourceModel().index(
+                source_index.row(), expiration_col
+            )
 
             STATUS_NOT_MEMBER = 0
             STATUS_MEMBER = 1
@@ -43,42 +52,62 @@ class IdentitiesFilterProxyModel(QSortFilterProxyModel):
             current_time = QDateTime().currentDateTime().toMSecsSinceEpoch()
             sig_validity = self.sourceModel().sig_validity()
             warning_expiration_time = int(sig_validity / 3)
-            #logging.debug("{0} > {1}".format(current_time, expiration_data))
+            # logging.debug("{0} > {1}".format(current_time, expiration_data))
 
             if expiration_data == 0:
                 status = STATUS_UNKNOWN
             elif expiration_data is not None:
                 status = STATUS_MEMBER
-                if current_time > (expiration_data*1000):
+                if current_time > (expiration_data * 1000):
                     status = STATUS_NOT_MEMBER
-                elif current_time > ((expiration_data*1000) - (warning_expiration_time*1000)):
+                elif current_time > (
+                    (expiration_data * 1000) - (warning_expiration_time * 1000)
+                ):
                     status = STATUS_EXPIRE_SOON
 
             if role == Qt.DisplayRole:
-                if source_index.column() in (IdentitiesTableModel.columns_ids.index('renewed'),
-                                             IdentitiesTableModel.columns_ids.index('expiration')):
+                if source_index.column() in (
+                    IdentitiesTableModel.columns_ids.index("renewed"),
+                    IdentitiesTableModel.columns_ids.index("expiration"),
+                ):
                     if source_data:
-                        ts = self.blockchain_processor.adjusted_ts(self.app.currency, source_data)
-                        return QLocale.toString(
-                            QLocale(),
-                            QDateTime.fromTime_t(ts).date(),
-                            QLocale.dateFormat(QLocale(), QLocale.ShortFormat)
-                        ) + " BAT"
+                        ts = self.blockchain_processor.adjusted_ts(
+                            self.app.currency, source_data
+                        )
+                        return (
+                            QLocale.toString(
+                                QLocale(),
+                                QDateTime.fromTime_t(ts).date(),
+                                QLocale.dateFormat(QLocale(), QLocale.ShortFormat),
+                            )
+                            + " BAT"
+                        )
                     else:
                         return ""
-                if source_index.column() == IdentitiesTableModel.columns_ids.index('publication'):
+                if source_index.column() == IdentitiesTableModel.columns_ids.index(
+                    "publication"
+                ):
                     if source_data:
-                        ts = self.blockchain_processor.adjusted_ts(self.app.currency, source_data)
-                        return QLocale.toString(
-                            QLocale(),
-                            QDateTime.fromTime_t(ts),
-                            QLocale.dateTimeFormat(QLocale(), QLocale.LongFormat)
-                        ) + " BAT"
+                        ts = self.blockchain_processor.adjusted_ts(
+                            self.app.currency, source_data
+                        )
+                        return (
+                            QLocale.toString(
+                                QLocale(),
+                                QDateTime.fromTime_t(ts),
+                                QLocale.dateTimeFormat(QLocale(), QLocale.LongFormat),
+                            )
+                            + " BAT"
+                        )
                     else:
                         return ""
-                if source_index.column() == IdentitiesTableModel.columns_ids.index('pubkey'):
+                if source_index.column() == IdentitiesTableModel.columns_ids.index(
+                    "pubkey"
+                ):
                     return source_data
-                if source_index.column() == IdentitiesTableModel.columns_ids.index('block'):
+                if source_index.column() == IdentitiesTableModel.columns_ids.index(
+                    "block"
+                ):
                     return str(source_data)[:20]
 
             if role == Qt.ForegroundRole:
@@ -96,7 +125,9 @@ class IdentitiesFilterProxyModel(QSortFilterProxyModel):
                 font.setItalic(True)
                 return font
 
-            if role == Qt.DecorationRole and source_index.column() == IdentitiesTableModel.columns_ids.index('uid'):
+            if role == Qt.DecorationRole and source_index.column() == IdentitiesTableModel.columns_ids.index(
+                "uid"
+            ):
                 if status == STATUS_NOT_MEMBER:
                     return QIcon(":/icons/not_member")
                 elif status == STATUS_MEMBER:
@@ -113,13 +144,25 @@ class IdentitiesTableModel(QAbstractTableModel):
     A Qt abstract item model to display communities in a tree
     """
 
-    columns_titles = {'uid': lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", 'UID'),
-                           'pubkey': lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", 'Pubkey'),
-                           'renewed': lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", 'Renewed'),
-                           'expiration': lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", 'Expiration'),
-                           'publication': lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", 'Publication Date'),
-                           'block': lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", 'Publication Block'), }
-    columns_ids = ('uid', 'pubkey', 'renewed', 'expiration', 'publication', 'block', 'identity')
+    columns_titles = {
+        "uid": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "UID"),
+        "pubkey": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Pubkey"),
+        "renewed": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Renewed"),
+        "expiration": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Expiration"),
+        "publication": lambda: QT_TRANSLATE_NOOP(
+            "IdentitiesTableModel", "Publication Date"
+        ),
+        "block": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Publication Block"),
+    }
+    columns_ids = (
+        "uid",
+        "pubkey",
+        "renewed",
+        "expiration",
+        "publication",
+        "block",
+        "identity",
+    )
 
     def __init__(self, parent, blockchain_service, identities_service):
         """
@@ -136,7 +179,7 @@ class IdentitiesTableModel(QAbstractTableModel):
 
     def sig_validity(self):
         return self._sig_validity
-    
+
     @property
     def pubkeys(self):
         """
@@ -158,7 +201,15 @@ class IdentitiesTableModel(QAbstractTableModel):
         name = "✴ " if identity.sentry else ""
         name += identity.uid
 
-        return name, identity.pubkey, join_date, expiration_date, sigdate_ts, sigdate_block, identity
+        return (
+            name,
+            identity.pubkey,
+            join_date,
+            expiration_date,
+            sigdate_ts,
+            sigdate_block,
+            identity,
+        )
 
     def refresh_identities(self, identities):
         """
@@ -180,9 +231,12 @@ class IdentitiesTableModel(QAbstractTableModel):
 
     def identity_loaded(self, identity):
         for i, idty in enumerate(self.identities_data):
-            if idty[IdentitiesTableModel.columns_ids.index('identity')] == identity:
+            if idty[IdentitiesTableModel.columns_ids.index("identity")] == identity:
                 self.identities_data[i] = self.identity_data(identity)
-                self.dataChanged.emit(self.index(i, 0), self.index(i, len(IdentitiesTableModel.columns_ids)))
+                self.dataChanged.emit(
+                    self.index(i, 0),
+                    self.index(i, len(IdentitiesTableModel.columns_ids)),
+                )
                 return
 
     def rowCount(self, parent):
diff --git a/src/sakia/gui/navigation/identities/view.py b/src/sakia/gui/navigation/identities/view.py
index c5011b16d8ee0a5c03d61773d436038eb353d8a8..a4977195986c1b2bcff779efc5f46d8532a4edae 100644
--- a/src/sakia/gui/navigation/identities/view.py
+++ b/src/sakia/gui/navigation/identities/view.py
@@ -7,25 +7,36 @@ class IdentitiesView(QWidget, Ui_IdentitiesWidget):
     """
     View of the Identities component
     """
+
     view_in_wot = pyqtSignal(object)
     money_sent = pyqtSignal()
     search_by_text_requested = pyqtSignal(str)
     search_directly_connected_requested = pyqtSignal()
 
-    _direct_connections_text = QT_TRANSLATE_NOOP("IdentitiesView", "Search direct certifications")
-    _search_placeholder = QT_TRANSLATE_NOOP("IdentitiesView", "Research a pubkey, an uid...")
+    _direct_connections_text = QT_TRANSLATE_NOOP(
+        "IdentitiesView", "Search direct certifications"
+    )
+    _search_placeholder = QT_TRANSLATE_NOOP(
+        "IdentitiesView", "Research a pubkey, an uid..."
+    )
 
     def __init__(self, parent):
         super().__init__(parent)
 
-        self.direct_connections = QAction(self.tr(IdentitiesView._direct_connections_text), self)
-        self.direct_connections.triggered.connect(self.request_search_direct_connections)
+        self.direct_connections = QAction(
+            self.tr(IdentitiesView._direct_connections_text), self
+        )
+        self.direct_connections.triggered.connect(
+            self.request_search_direct_connections
+        )
         self.setupUi(self)
 
         self.table_identities.setSelectionBehavior(QAbstractItemView.SelectRows)
         self.table_identities.sortByColumn(0, Qt.AscendingOrder)
         self.table_identities.resizeColumnsToContents()
-        self.edit_textsearch.setPlaceholderText(self.tr(IdentitiesView._search_placeholder))
+        self.edit_textsearch.setPlaceholderText(
+            self.tr(IdentitiesView._search_placeholder)
+        )
         self.button_search.addAction(self.direct_connections)
         self.button_search.clicked.connect(self.request_search_by_text)
 
@@ -35,7 +46,9 @@ class IdentitiesView(QWidget, Ui_IdentitiesWidget):
         :param PyQt5.QtCore.QAbstractItemModel model: the model of the table view
         """
         self.table_identities.setModel(model)
-        model.modelAboutToBeReset.connect(lambda: self.table_identities.setEnabled(False))
+        model.modelAboutToBeReset.connect(
+            lambda: self.table_identities.setEnabled(False)
+        )
         model.modelReset.connect(lambda: self.table_identities.setEnabled(True))
 
     def request_search_by_text(self):
@@ -50,11 +63,15 @@ class IdentitiesView(QWidget, Ui_IdentitiesWidget):
         """
         Search members of community and display found members
         """
-        self.edit_textsearch.setPlaceholderText(self.tr(IdentitiesView._search_placeholder))
+        self.edit_textsearch.setPlaceholderText(
+            self.tr(IdentitiesView._search_placeholder)
+        )
         self.search_directly_connected_requested.emit()
 
     def retranslateUi(self, widget):
-        self.direct_connections.setText(self.tr(IdentitiesView._direct_connections_text))
+        self.direct_connections.setText(
+            self.tr(IdentitiesView._direct_connections_text)
+        )
         super().retranslateUi(self)
 
     def resizeEvent(self, event):
@@ -70,4 +87,3 @@ class IdentitiesView(QWidget, Ui_IdentitiesWidget):
         if event.type() == QEvent.LanguageChange:
             self.retranslateUi(self)
         return super().changeEvent(event)
-
diff --git a/src/sakia/gui/navigation/identity/controller.py b/src/sakia/gui/navigation/identity/controller.py
index 142729495dcacca553a7c9eec638a1706463c208..8546540a0702bfcb6f23cb5904e1a1cca4ee8135 100644
--- a/src/sakia/gui/navigation/identity/controller.py
+++ b/src/sakia/gui/navigation/identity/controller.py
@@ -22,6 +22,7 @@ class IdentityController(QObject):
     """
     The informations component
     """
+
     view_in_wot = pyqtSignal(Identity)
 
     def __init__(self, parent, view, model, certification):
@@ -35,12 +36,20 @@ class IdentityController(QObject):
         self.view = view
         self.model = model
         self.certification = certification
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
         self.view.button_membership.clicked.connect(self.send_join_demand)
         self.view.button_refresh.clicked.connect(self.refresh_certs)
 
     @classmethod
-    def create(cls, parent, app, connection, blockchain_service, identities_service, sources_service):
+    def create(
+        cls,
+        parent,
+        app,
+        connection,
+        blockchain_service,
+        identities_service,
+        sources_service,
+    ):
         """
 
         :param parent:
@@ -51,16 +60,27 @@ class IdentityController(QObject):
         :param sources_service:
         :return:
         """
-        certification = CertificationController.integrate_to_main_view(None, app, connection)
+        certification = CertificationController.integrate_to_main_view(
+            None, app, connection
+        )
         view = IdentityView(parent.view, certification.view)
-        model = IdentityModel(None, app, connection, blockchain_service, identities_service, sources_service)
+        model = IdentityModel(
+            None,
+            app,
+            connection,
+            blockchain_service,
+            identities_service,
+            sources_service,
+        )
         identity = cls(parent, view, model, certification)
         certification.accepted.connect(view.clear)
         certification.rejected.connect(view.clear)
         identity.refresh_localized_data()
         table_model = model.init_table_model()
         view.set_table_identities_model(table_model)
-        view.table_certifiers.customContextMenuRequested['QPoint'].connect(identity.identity_context_menu)
+        view.table_certifiers.customContextMenuRequested["QPoint"].connect(
+            identity.identity_context_menu
+        )
         identity.view_in_wot.connect(app.view_in_wot)
         app.identity_changed.connect(identity.handle_identity_change)
         return identity
@@ -71,7 +91,9 @@ class IdentityController(QObject):
         if valid:
             menu = ContextMenu.from_data(self.view, self.model.app, None, (identity,))
             menu.view_identity_in_wot.connect(self.view_in_wot)
-            menu.identity_information_loaded.connect(self.model.table_model.certifier_loaded)
+            menu.identity_information_loaded.connect(
+                self.model.table_model.certifier_loaded
+            )
 
             # Show the context menu.
             menu.qmenu.popup(QCursor.pos())
@@ -83,11 +105,16 @@ class IdentityController(QObject):
         """
         params = self.model.parameters()
         if params:
-            self.view.set_money_text(params, ROOT_SERVERS[self.model.connection.currency]["display"])
+            self.view.set_money_text(
+                params, ROOT_SERVERS[self.model.connection.currency]["display"]
+            )
             self.refresh_localized_data()
 
     def handle_identity_change(self, identity):
-        if identity.pubkey == self.model.connection.pubkey and identity.uid == self.model.connection.uid:
+        if (
+            identity.pubkey == self.model.connection.pubkey
+            and identity.uid == self.model.connection.uid
+        ):
             self.refresh_localized_data()
 
     @once_at_a_time
@@ -106,13 +133,19 @@ class IdentityController(QObject):
         try:
             simple_data = self.model.get_identity_data()
             all_data = {**simple_data, **localized_data}
-            self.view.set_simple_informations(all_data, IdentityView.CommunityState.READY)
+            self.view.set_simple_informations(
+                all_data, IdentityView.CommunityState.READY
+            )
         except NoPeerAvailable as e:
             self._logger.debug(str(e))
-            self.view.set_simple_informations(all_data, IdentityView.CommunityState.OFFLINE)
+            self.view.set_simple_informations(
+                all_data, IdentityView.CommunityState.OFFLINE
+            )
         except errors.DuniterError as e:
             if e.ucode == errors.BLOCK_NOT_FOUND:
-                self.view.set_simple_informations(all_data, IdentityView.CommunityState.NOT_INIT)
+                self.view.set_simple_informations(
+                    all_data, IdentityView.CommunityState.NOT_INIT
+                )
             else:
                 self._logger.debug(str(e))
 
@@ -121,24 +154,33 @@ class IdentityController(QObject):
         if not self.model.connection:
             return
         if not self.model.get_identity_data()["membership_state"]:
-            result = await self.view.licence_dialog(self.model.connection.currency,
-                                                    self.model.parameters())
+            result = await self.view.licence_dialog(
+                self.model.connection.currency, self.model.parameters()
+            )
             if result == QMessageBox.No:
                 return
 
-        secret_key, password = await PasswordInputController.open_dialog(self, self.model.connection)
+        secret_key, password = await PasswordInputController.open_dialog(
+            self, self.model.connection
+        )
         if not password or not secret_key:
             return
         result = await self.model.send_join(secret_key, password)
         if result[0]:
             if self.model.notifications():
-                toast.display(self.tr("Membership"), self.tr("Success sending Membership demand"))
+                toast.display(
+                    self.tr("Membership"), self.tr("Success sending Membership demand")
+                )
             else:
-                await QAsyncMessageBox.information(self.view, self.tr("Membership"),
-                                                        self.tr("Success sending Membership demand"))
+                await QAsyncMessageBox.information(
+                    self.view,
+                    self.tr("Membership"),
+                    self.tr("Success sending Membership demand"),
+                )
         else:
             if self.model.notifications():
                 toast.display(self.tr("Membership"), result[1])
             else:
-                await QAsyncMessageBox.critical(self.view, self.tr("Membership"),
-                                                        result[1])
+                await QAsyncMessageBox.critical(
+                    self.view, self.tr("Membership"), result[1]
+                )
diff --git a/src/sakia/gui/navigation/identity/model.py b/src/sakia/gui/navigation/identity/model.py
index 952173b838b017fcfe4618fd6dcfc5528c08b447..b08883816de224668fc038da1dd39a96c3d6e5af 100644
--- a/src/sakia/gui/navigation/identity/model.py
+++ b/src/sakia/gui/navigation/identity/model.py
@@ -13,9 +13,18 @@ class IdentityModel(QObject):
     """
     An component
     """
+
     localized_data_changed = pyqtSignal(dict)
 
-    def __init__(self, parent, app, connection, blockchain_service, identities_service, sources_service):
+    def __init__(
+        self,
+        parent,
+        app,
+        connection,
+        blockchain_service,
+        identities_service,
+        sources_service,
+    ):
         """
         Constructor of an component
 
@@ -35,13 +44,15 @@ class IdentityModel(QObject):
         self.sources_service = sources_service
         self.table_model = None
         self.proxy_model = None
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
 
     def init_table_model(self):
         """
         Instanciate the table model of the view
         """
-        certifiers_model = CertifiersTableModel(self, self.connection, self.blockchain_service, self.identities_service)
+        certifiers_model = CertifiersTableModel(
+            self, self.connection, self.blockchain_service, self.identities_service
+        )
         proxy = CertifiersFilterProxyModel(self.app)
         proxy.setSourceModel(certifiers_model)
 
@@ -51,7 +62,9 @@ class IdentityModel(QObject):
         return self.proxy_model
 
     async def refresh_identity_data(self):
-        identity = self.identities_service.get_identity(self.connection.pubkey, self.connection.uid)
+        identity = self.identities_service.get_identity(
+            self.connection.pubkey, self.connection.uid
+        )
         identity = await self.identities_service.load_requirements(identity)
 
         # update identities in database from the network
@@ -63,7 +76,7 @@ class IdentityModel(QObject):
     def table_data(self, index):
         if index.isValid() and index.row() < self.table_model.rowCount(QModelIndex()):
             source_index = self.proxy_model.mapToSource(index)
-            identity_col = self.table_model.columns_ids.index('identity')
+            identity_col = self.table_model.columns_ids.index("identity")
             identity_index = self.table_model.index(source_index.row(), identity_col)
             identity = self.table_model.data(identity_index, Qt.DisplayRole)
             return True, identity
@@ -75,12 +88,14 @@ class IdentityModel(QObject):
         try:
             params = self.blockchain_service.parameters()
         except NoPeerAvailable as e:
-            logging.debug('community parameters error : ' + str(e))
+            logging.debug("community parameters error : " + str(e))
             return None
 
-        localized_data['currency'] = ROOT_SERVERS[self.connection.currency]["display"]
-        localized_data['growth'] = params.c
-        localized_data['days_per_dividend'] = QLocale().toString(params.dt / 86400, 'f', 2)
+        localized_data["currency"] = ROOT_SERVERS[self.connection.currency]["display"]
+        localized_data["growth"] = params.c
+        localized_data["days_per_dividend"] = QLocale().toString(
+            params.dt / 86400, "f", 2
+        )
 
         last_ud, last_ud_base = self.blockchain_service.last_ud()
         members_count = self.blockchain_service.last_members_count()
@@ -89,84 +104,106 @@ class IdentityModel(QObject):
         previous_monetary_mass = self.blockchain_service.previous_monetary_mass()
         previous_members_count = self.blockchain_service.previous_members_count()
 
-        localized_data['units'] = self.app.current_ref.instance(0,
-                                                                self.connection.currency,
-                                                                self.app, None).units
-        localized_data['diff_units'] = self.app.current_ref.instance(0,
-                                                                     self.connection.currency,
-                                                                     self.app, None).diff_units
+        localized_data["units"] = self.app.current_ref.instance(
+            0, self.connection.currency, self.app, None
+        ).units
+        localized_data["diff_units"] = self.app.current_ref.instance(
+            0, self.connection.currency, self.app, None
+        ).diff_units
 
         if last_ud:
             # display float values
-            localized_data['ud'] = self.app.current_ref.instance(last_ud * math.pow(10, last_ud_base),
-                                              self.connection.currency,
-                                              self.app).diff_localized(False, True)
+            localized_data["ud"] = self.app.current_ref.instance(
+                last_ud * math.pow(10, last_ud_base), self.connection.currency, self.app
+            ).diff_localized(False, True)
 
-            localized_data['members_count'] = self.blockchain_service.current_members_count()
+            localized_data[
+                "members_count"
+            ] = self.blockchain_service.current_members_count()
 
             computed_dividend = self.blockchain_service.computed_dividend()
             # display float values
-            localized_data['ud_plus_1'] = self.app.current_ref.instance(computed_dividend,
-                                              self.connection.currency, self.app).diff_localized(False, True)
+            localized_data["ud_plus_1"] = self.app.current_ref.instance(
+                computed_dividend, self.connection.currency, self.app
+            ).diff_localized(False, True)
 
-            localized_data['mass'] = self.app.current_ref.instance(self.blockchain_service.current_mass(),
-                                              self.connection.currency, self.app).localized(False, True)
+            localized_data["mass"] = self.app.current_ref.instance(
+                self.blockchain_service.current_mass(),
+                self.connection.currency,
+                self.app,
+            ).localized(False, True)
 
             ud_median_time = self.blockchain_service.last_ud_time()
-            ud_median_time = self.blockchain_processor.adjusted_ts(self.app.currency, ud_median_time)
+            ud_median_time = self.blockchain_processor.adjusted_ts(
+                self.app.currency, ud_median_time
+            )
 
-            localized_data['ud_median_time'] = QLocale.toString(
+            localized_data["ud_median_time"] = QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(ud_median_time),
-                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
             )
 
             next_ud_median_time = self.blockchain_service.last_ud_time() + params.dt
-            next_ud_median_time = self.blockchain_processor.adjusted_ts(self.app.currency, next_ud_median_time)
+            next_ud_median_time = self.blockchain_processor.adjusted_ts(
+                self.app.currency, next_ud_median_time
+            )
 
-            localized_data['next_ud_median_time'] = QLocale.toString(
+            localized_data["next_ud_median_time"] = QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(next_ud_median_time),
-                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
             )
 
             next_ud_reeval = self.blockchain_service.next_ud_reeval()
-            next_ud_reeval = self.blockchain_processor.adjusted_ts(self.app.currency, next_ud_reeval)
-            localized_data['next_ud_reeval'] = QLocale.toString(
+            next_ud_reeval = self.blockchain_processor.adjusted_ts(
+                self.app.currency, next_ud_reeval
+            )
+            localized_data["next_ud_reeval"] = QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(next_ud_reeval),
-                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
             )
 
             if previous_ud:
-                mass_minus_1_per_member = (float(0) if previous_ud == 0 or previous_members_count == 0 else
-                                           previous_monetary_mass / previous_members_count)
-                localized_data['mass_minus_1_per_member'] = self.app.current_ref.instance(mass_minus_1_per_member,
-                                                  self.connection.currency, self.app) \
-                                                  .localized(False, True)
-                localized_data['mass_minus_1'] = self.app.current_ref.instance(previous_monetary_mass,
-                                                  self.connection.currency, self.app) \
-                                                  .localized(False, True)
+                mass_minus_1_per_member = (
+                    float(0)
+                    if previous_ud == 0 or previous_members_count == 0
+                    else previous_monetary_mass / previous_members_count
+                )
+                localized_data[
+                    "mass_minus_1_per_member"
+                ] = self.app.current_ref.instance(
+                    mass_minus_1_per_member, self.connection.currency, self.app
+                ).localized(
+                    False, True
+                )
+                localized_data["mass_minus_1"] = self.app.current_ref.instance(
+                    previous_monetary_mass, self.connection.currency, self.app
+                ).localized(False, True)
                 # avoid divide by zero !
                 if members_count == 0 or previous_members_count == 0:
-                    localized_data['actual_growth'] = float(0)
+                    localized_data["actual_growth"] = float(0)
                 else:
-                    localized_data['actual_growth'] = (last_ud * math.pow(10, last_ud_base)) / (
-                    previous_monetary_mass / members_count)
+                    localized_data["actual_growth"] = (
+                        last_ud * math.pow(10, last_ud_base)
+                    ) / (previous_monetary_mass / members_count)
 
-                previous_ud_time = self.blockchain_processor.adjusted_ts(self.app.currency, previous_ud_time)
-                localized_data['ud_median_time_minus_1'] = QLocale.toString(
+                previous_ud_time = self.blockchain_processor.adjusted_ts(
+                    self.app.currency, previous_ud_time
+                )
+                localized_data["ud_median_time_minus_1"] = QLocale.toString(
                     QLocale(),
                     QDateTime.fromTime_t(previous_ud_time),
-                    QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                    QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
                 )
         return localized_data
 
     def get_identity_data(self):
         amount = self.sources_service.amount(self.connection.pubkey)
-        localized_amount = self.app.current_ref.instance(amount,
-                                                         self.connection.currency,
-                                                         self.app).localized(False, True)
+        localized_amount = self.app.current_ref.instance(
+            amount, self.connection.currency, self.app
+        ).localized(False, True)
         outdistanced_text = self.tr("Outdistanced")
         is_identity = False
         written = False
@@ -181,18 +218,30 @@ class IdentityModel(QObject):
         if self.connection.uid:
             is_identity = True
             try:
-                identity = self.identities_service.get_identity(self.connection.pubkey, self.connection.uid)
+                identity = self.identities_service.get_identity(
+                    self.connection.pubkey, self.connection.uid
+                )
                 if identity:
-                    mstime_remaining = self.identities_service.ms_time_remaining(identity)
+                    mstime_remaining = self.identities_service.ms_time_remaining(
+                        identity
+                    )
                     is_member = identity.member
                     outdistanced = identity.outdistanced
                     written = identity.written
                     if not written:
-                        identity_expiration = identity.timestamp + self.parameters().sig_window
-                        identity_expired = identity_expiration < self.blockchain_processor.time(self.connection.currency)
-                        identity_expiration = self.blockchain_processor.adjusted_ts(self.app.currency,
-                                                                                    identity_expiration)
-                    nb_certs = len(self.identities_service.certifications_received(identity.pubkey))
+                        identity_expiration = (
+                            identity.timestamp + self.parameters().sig_window
+                        )
+                        identity_expired = (
+                            identity_expiration
+                            < self.blockchain_processor.time(self.connection.currency)
+                        )
+                        identity_expiration = self.blockchain_processor.adjusted_ts(
+                            self.app.currency, identity_expiration
+                        )
+                    nb_certs = len(
+                        self.identities_service.certifications_received(identity.pubkey)
+                    )
                     if not identity.outdistanced:
                         outdistanced_text = self.tr("In WoT range")
             except errors.DuniterError as e:
@@ -202,17 +251,17 @@ class IdentityModel(QObject):
                     self._logger.error(str(e))
 
         return {
-            'written': written,
-            'idty_expired': identity_expired,
-            'idty_expiration': identity_expiration,
-            'amount': localized_amount,
-            'is_outdistanced': outdistanced,
-            'outdistanced': outdistanced_text,
-            'nb_certs': nb_certs,
-            'nb_certs_required': nb_certs_required,
-            'mstime': mstime_remaining,
-            'membership_state': is_member,
-            'is_identity': is_identity
+            "written": written,
+            "idty_expired": identity_expired,
+            "idty_expiration": identity_expiration,
+            "amount": localized_amount,
+            "is_outdistanced": outdistanced,
+            "outdistanced": outdistanced_text,
+            "nb_certs": nb_certs,
+            "nb_certs_required": nb_certs_required,
+            "mstime": mstime_remaining,
+            "membership_state": is_member,
+            "is_identity": is_identity,
         }
 
     def parameters(self):
@@ -225,4 +274,6 @@ class IdentityModel(QObject):
         return self.app.parameters.notifications
 
     async def send_join(self, secret_key, password):
-        return await self.app.documents_service.send_membership(self.connection, secret_key, password, "IN")
+        return await self.app.documents_service.send_membership(
+            self.connection, secret_key, password, "IN"
+        )
diff --git a/src/sakia/gui/navigation/identity/table_model.py b/src/sakia/gui/navigation/identity/table_model.py
index b8a499b08834d9d808583ae725adf30f615524cf..5846bd60d7efcaaabfc26303f798207ab3d7d1dc 100644
--- a/src/sakia/gui/navigation/identity/table_model.py
+++ b/src/sakia/gui/navigation/identity/table_model.py
@@ -1,8 +1,15 @@
 from sakia.errors import NoPeerAvailable
 from sakia.data.entities import Identity, Certification
 from sakia.data.processors import BlockchainProcessor
-from PyQt5.QtCore import QAbstractTableModel, QSortFilterProxyModel, Qt, \
-                        QDateTime, QModelIndex, QLocale, QT_TRANSLATE_NOOP
+from PyQt5.QtCore import (
+    QAbstractTableModel,
+    QSortFilterProxyModel,
+    Qt,
+    QDateTime,
+    QModelIndex,
+    QLocale,
+    QT_TRANSLATE_NOOP,
+)
 from PyQt5.QtGui import QColor, QIcon, QFont
 import logging
 import asyncio
@@ -32,42 +39,64 @@ class CertifiersFilterProxyModel(QSortFilterProxyModel):
         source_index = self.mapToSource(index)
         if source_index.isValid():
             source_data = self.sourceModel().data(source_index, role)
-            publication_col = CertifiersTableModel.columns_ids.index('publication')
-            publication_index = self.sourceModel().index(source_index.row(), publication_col)
-            expiration_col = CertifiersTableModel.columns_ids.index('expiration')
-            expiration_index = self.sourceModel().index(source_index.row(), expiration_col)
-            written_col = CertifiersTableModel.columns_ids.index('written')
+            publication_col = CertifiersTableModel.columns_ids.index("publication")
+            publication_index = self.sourceModel().index(
+                source_index.row(), publication_col
+            )
+            expiration_col = CertifiersTableModel.columns_ids.index("expiration")
+            expiration_index = self.sourceModel().index(
+                source_index.row(), expiration_col
+            )
+            written_col = CertifiersTableModel.columns_ids.index("written")
             written_index = self.sourceModel().index(source_index.row(), written_col)
 
-            publication_data = self.sourceModel().data(publication_index, Qt.DisplayRole)
+            publication_data = self.sourceModel().data(
+                publication_index, Qt.DisplayRole
+            )
             expiration_data = self.sourceModel().data(expiration_index, Qt.DisplayRole)
             written_data = self.sourceModel().data(written_index, Qt.DisplayRole)
             current_time = QDateTime().currentDateTime().toMSecsSinceEpoch()
             warning_expiration_time = int((expiration_data - publication_data) / 3)
-            #logging.debug("{0} > {1}".format(current_time, expiration_data))
+            # logging.debug("{0} > {1}".format(current_time, expiration_data))
 
             if role == Qt.DisplayRole:
-                if source_index.column() == CertifiersTableModel.columns_ids.index('expiration'):
+                if source_index.column() == CertifiersTableModel.columns_ids.index(
+                    "expiration"
+                ):
                     if source_data:
-                        ts = self.blockchain_processor.adjusted_ts(self.app.currency, source_data)
-                        return QLocale.toString(
-                            QLocale(),
-                            QDateTime.fromTime_t(ts),
-                            QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
-                        ) + " BAT"
+                        ts = self.blockchain_processor.adjusted_ts(
+                            self.app.currency, source_data
+                        )
+                        return (
+                            QLocale.toString(
+                                QLocale(),
+                                QDateTime.fromTime_t(ts),
+                                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
+                            )
+                            + " BAT"
+                        )
                     else:
                         return ""
-                if source_index.column() == CertifiersTableModel.columns_ids.index('publication'):
+                if source_index.column() == CertifiersTableModel.columns_ids.index(
+                    "publication"
+                ):
                     if source_data:
-                        ts = self.blockchain_processor.adjusted_ts(self.app.currency, source_data)
-                        return QLocale.toString(
-                            QLocale(),
-                            QDateTime.fromTime_t(ts),
-                            QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
-                        ) + " BAT"
+                        ts = self.blockchain_processor.adjusted_ts(
+                            self.app.currency, source_data
+                        )
+                        return (
+                            QLocale.toString(
+                                QLocale(),
+                                QDateTime.fromTime_t(ts),
+                                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
+                            )
+                            + " BAT"
+                        )
                     else:
                         return ""
-                if source_index.column() == CertifiersTableModel.columns_ids.index('pubkey'):
+                if source_index.column() == CertifiersTableModel.columns_ids.index(
+                    "pubkey"
+                ):
                     return source_data
 
             if role == Qt.FontRole:
@@ -77,7 +106,9 @@ class CertifiersFilterProxyModel(QSortFilterProxyModel):
                 return font
 
             if role == Qt.ForegroundRole:
-                if current_time > ((expiration_data*1000) - (warning_expiration_time*1000)):
+                if current_time > (
+                    (expiration_data * 1000) - (warning_expiration_time * 1000)
+                ):
                     return QColor("darkorange").darker(120)
 
             return source_data
@@ -89,12 +120,16 @@ class CertifiersTableModel(QAbstractTableModel):
     A Qt abstract item model to display communities in a tree
     """
 
-    columns_titles = {'uid': lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", 'UID'),
-                           'pubkey': lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", 'Pubkey'),
-                           'publication': lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", 'Publication Date'),
-                           'expiration': lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", 'Expiration'),
-                           'available': lambda: QT_TRANSLATE_NOOP("CertifiersTableModel"), }
-    columns_ids = ('uid', 'pubkey', 'publication', 'expiration', 'written', 'identity')
+    columns_titles = {
+        "uid": lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", "UID"),
+        "pubkey": lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", "Pubkey"),
+        "publication": lambda: QT_TRANSLATE_NOOP(
+            "CertifiersTableModel", "Publication Date"
+        ),
+        "expiration": lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", "Expiration"),
+        "available": lambda: QT_TRANSLATE_NOOP("CertifiersTableModel"),
+    }
+    columns_ids = ("uid", "pubkey", "publication", "expiration", "written", "identity")
 
     def __init__(self, parent, connection, blockchain_service, identities_service):
         """
@@ -115,7 +150,9 @@ class CertifiersTableModel(QAbstractTableModel):
         Init table with data to display
         """
         self.beginResetModel()
-        certifications = self.identities_service.certifications_received(self.connection.pubkey)
+        certifications = self.identities_service.certifications_received(
+            self.connection.pubkey
+        )
         logging.debug("Refresh {0} certifiers".format(len(certifications)))
         certifiers_data = []
         for certifier in certifications:
@@ -142,9 +179,18 @@ class CertifiersTableModel(QAbstractTableModel):
 
         identity = self.identities_service.get_identity(certification.certifier)
         if not identity:
-            identity = Identity(currency=certification.currency, pubkey=certification.certifier, uid="")
-
-        return identity.uid, identity.pubkey, publication_date, expiration_date, written, identity
+            identity = Identity(
+                currency=certification.currency, pubkey=certification.certifier, uid=""
+            )
+
+        return (
+            identity.uid,
+            identity.pubkey,
+            publication_date,
+            expiration_date,
+            written,
+            identity,
+        )
 
     def certifier_loaded(self, identity: Identity):
         """
@@ -154,9 +200,17 @@ class CertifiersTableModel(QAbstractTableModel):
         :return:
         """
         for i, certifier_data in enumerate(self._certifiers_data):
-            if certifier_data[CertifiersTableModel.columns_ids.index('identity')] == identity:
-                self._certifiers_data[i] = update_certifier_data_from_identity(certifier_data, identity)
-                self.dataChanged.emit(self.index(i, 0), self.index(i, len(CertifiersTableModel.columns_ids)))
+            if (
+                certifier_data[CertifiersTableModel.columns_ids.index("identity")]
+                == identity
+            ):
+                self._certifiers_data[i] = update_certifier_data_from_identity(
+                    certifier_data, identity
+                )
+                self.dataChanged.emit(
+                    self.index(i, 0),
+                    self.index(i, len(CertifiersTableModel.columns_ids)),
+                )
                 return
 
     def rowCount(self, parent):
@@ -186,7 +240,9 @@ class CertifiersTableModel(QAbstractTableModel):
 #######################
 
 
-def update_certifier_data_from_identity(certifier_data: tuple, identity: Identity) -> tuple:
+def update_certifier_data_from_identity(
+    certifier_data: tuple, identity: Identity
+) -> tuple:
     """
     Return certifier data from updated identity
 
@@ -194,9 +250,11 @@ def update_certifier_data_from_identity(certifier_data: tuple, identity: Identit
     :param Identity identity: Identity of the certifier
     :return tuple:
     """
-    return identity.uid, \
-        identity.pubkey, \
-        certifier_data[CertifiersTableModel.columns_ids.index('publication')], \
-        certifier_data[CertifiersTableModel.columns_ids.index('expiration')], \
-        certifier_data[CertifiersTableModel.columns_ids.index('written')], \
-        identity
+    return (
+        identity.uid,
+        identity.pubkey,
+        certifier_data[CertifiersTableModel.columns_ids.index("publication")],
+        certifier_data[CertifiersTableModel.columns_ids.index("expiration")],
+        certifier_data[CertifiersTableModel.columns_ids.index("written")],
+        identity,
+    )
diff --git a/src/sakia/gui/navigation/identity/view.py b/src/sakia/gui/navigation/identity/view.py
index 3dd0c6d09df24b9fe6c526baacaebbc67c1d1102..5ea43a90bef58844be2469bbaa04f42c91cd7156 100644
--- a/src/sakia/gui/navigation/identity/view.py
+++ b/src/sakia/gui/navigation/identity/view.py
@@ -11,6 +11,7 @@ class IdentityView(QWidget, Ui_IdentityWidget):
     """
     The view of navigation panel
     """
+
     retranslate_required = pyqtSignal()
 
     class CommunityState(Enum):
@@ -23,7 +24,9 @@ class IdentityView(QWidget, Ui_IdentityWidget):
         self.certification_view = certification_view
         self.setupUi(self)
         self.stacked_widget.insertWidget(1, certification_view)
-        self.button_certify.clicked.connect(lambda c: self.stacked_widget.setCurrentWidget(self.certification_view))
+        self.button_certify.clicked.connect(
+            lambda c: self.stacked_widget.setCurrentWidget(self.certification_view)
+        )
 
     def set_table_identities_model(self, model):
         """
@@ -33,76 +36,97 @@ class IdentityView(QWidget, Ui_IdentityWidget):
         self.table_certifiers.setModel(model)
         self.table_certifiers.setSelectionBehavior(QAbstractItemView.SelectRows)
         self.table_certifiers.setSortingEnabled(True)
-        self.table_certifiers.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
+        self.table_certifiers.horizontalHeader().setSectionResizeMode(
+            QHeaderView.Interactive
+        )
         self.table_certifiers.resizeRowsToContents()
-        self.table_certifiers.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
+        self.table_certifiers.verticalHeader().setSectionResizeMode(
+            QHeaderView.ResizeToContents
+        )
         self.table_certifiers.setContextMenuPolicy(Qt.CustomContextMenu)
 
     def clear(self):
         self.stacked_widget.setCurrentWidget(self.page_empty)
 
     def set_simple_informations(self, data, state):
-        if state in (IdentityView.CommunityState.NOT_INIT, IdentityView.CommunityState.OFFLINE):
-            self.label_currency.setText("""<html>
+        if state in (
+            IdentityView.CommunityState.NOT_INIT,
+            IdentityView.CommunityState.OFFLINE,
+        ):
+            self.label_currency.setText(
+                """<html>
                 <body>
                 <p>
                 <span style=" font-size:16pt; font-weight:600;">{currency}</span>
                 </p>
                 <p>{message}</p>
                 </body>
-                </html>""".format(currency=data['currency'],
-                                  message=IdentityView.simple_message[state]))
+                </html>""".format(
+                    currency=data["currency"],
+                    message=IdentityView.simple_message[state],
+                )
+            )
             self.button_membership.hide()
         else:
-            if data['written']:
+            if data["written"]:
                 written_value = self.tr("Identity written in blockchain")
             else:
                 expiration_text = QLocale.toString(
                     QLocale(),
-                    QDateTime.fromTime_t(data['idty_expiration']),
-                    QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                    QDateTime.fromTime_t(data["idty_expiration"]),
+                    QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
+                )
+                written_value = (
+                    self.tr("Identity not written in blockchain")
+                    + " ("
+                    + self.tr("Expires on : {0}").format(expiration_text)
+                    + " BAT)"
                 )
-                written_value = self.tr("Identity not written in blockchain") + \
-                                " (" + self.tr("Expires on : {0}").format(expiration_text) + " BAT)"
 
-            status_value = self.tr("Member") if data['membership_state'] else self.tr("Non-Member")
-            if data['mstime'] > 0:
+            status_value = (
+                self.tr("Member") if data["membership_state"] else self.tr("Non-Member")
+            )
+            if data["mstime"] > 0:
                 membership_action_value = self.tr("Renew membership")
                 status_info = ""
                 membership_action_enabled = True
-            elif data['membership_state']:
+            elif data["membership_state"]:
                 membership_action_value = self.tr("Renew membership")
                 status_info = "Your membership expired"
                 membership_action_enabled = True
             else:
                 membership_action_value = self.tr("Request membership")
-                if data['nb_certs'] > data['nb_certs_required']:
+                if data["nb_certs"] > data["nb_certs_required"]:
                     status_info = self.tr("Registration ready")
                     membership_action_enabled = True
                 else:
-                    status_info = self.tr("{0} more certifications required")\
-                        .format(data['nb_certs_required'] - data['nb_certs'])
+                    status_info = self.tr("{0} more certifications required").format(
+                        data["nb_certs_required"] - data["nb_certs"]
+                    )
                     membership_action_enabled = True
 
-            if data['mstime'] > 0:
-                days, hours, minutes, seconds = timestamp_to_dhms(data['mstime'])
+            if data["mstime"] > 0:
+                days, hours, minutes, seconds = timestamp_to_dhms(data["mstime"])
                 mstime_remaining_text = self.tr("Expires in ")
                 if days > 0:
                     mstime_remaining_text += "{days} days".format(days=days)
                 else:
-                    mstime_remaining_text += "{hours} hours and {min} min.".format(hours=hours,
-                                                                                   min=minutes)
+                    mstime_remaining_text += "{hours} hours and {min} min.".format(
+                        hours=hours, min=minutes
+                    )
             else:
                 mstime_remaining_text = self.tr("Expired or never published")
 
-            ms_status_color = '#00AA00' if data['membership_state'] else '#FF0000'
-            outdistanced_status_color = '#FF0000' if data['is_outdistanced'] else '#00AA00'
-            if data['written']:
+            ms_status_color = "#00AA00" if data["membership_state"] else "#FF0000"
+            outdistanced_status_color = (
+                "#FF0000" if data["is_outdistanced"] else "#00AA00"
+            )
+            if data["written"]:
                 written_status_color = "#00AA00"
-            elif data['idty_expired']:
+            elif data["idty_expired"]:
                 written_status_color = "#FF0000"
             else:
-                written_status_color = '#FF6347'
+                written_status_color = "#FF6347"
 
             description_membership = """<html>
 <body>
@@ -110,32 +134,40 @@ class IdentityView(QWidget, Ui_IdentityWidget):
      : <span style="color:{ms_status_color};">{status}</span>
      - <span>{status_info}</span></p>
 </body>
-</html>""".format(ms_status_color=ms_status_color,
-                  status_label=self.tr("Status"),
-                  status=status_value,
-                  status_info=status_info)
+</html>""".format(
+                ms_status_color=ms_status_color,
+                status_label=self.tr("Status"),
+                status=status_value,
+                status_info=status_info,
+            )
             description_identity = """<html>
 <body>
     <p><span style="font-weight:600;">{nb_certs_label}</span> : {nb_certs} <span style="color:{outdistanced_status_color};">({outdistanced_text})</span></p>
     <p><span style="font-weight:600;">{mstime_remaining_label}</span> : {mstime_remaining}</p>
 </body>
-</html>""".format(nb_certs_label=self.tr("Certs. received"),
-                  nb_certs=data['nb_certs'],
-                  outdistanced_text=data['outdistanced'],
-                  outdistanced_status_color=outdistanced_status_color,
-                  mstime_remaining_label=self.tr("Membership"),
-                  mstime_remaining=mstime_remaining_text)
-
-            self.label_written.setText("""
+</html>""".format(
+                nb_certs_label=self.tr("Certs. received"),
+                nb_certs=data["nb_certs"],
+                outdistanced_text=data["outdistanced"],
+                outdistanced_status_color=outdistanced_status_color,
+                mstime_remaining_label=self.tr("Membership"),
+                mstime_remaining=mstime_remaining_text,
+            )
+
+            self.label_written.setText(
+                """
 <html>
 <body>
     <p><span style="font-weight:450; color:{written_status_color};">{written_label}</span></p>
 </body>
 </html>
-""".format(written_label=written_value,
-           written_status_color=written_status_color))
+""".format(
+                    written_label=written_value,
+                    written_status_color=written_status_color,
+                )
+            )
 
-            if data['is_identity']:
+            if data["is_identity"]:
                 self.label_membership.setText(description_membership)
                 self.label_identity.setText(description_identity)
                 self.button_membership.setText(membership_action_value)
@@ -159,7 +191,8 @@ class IdentityView(QWidget, Ui_IdentityWidget):
         message_box = QMessageBox(self)
 
         message_box.setText("Do you recognize the terms of the following licence :")
-        message_box.setInformativeText("""
+        message_box.setInformativeText(
+            """
 {:} is being produced by a Universal Dividend (UD) for any human member, which is :<br/>
 <br/>
 <table cellpadding="5">
@@ -188,37 +221,41 @@ The parameters of the Web of Trust of {:} are :<br/>
 <b>By asking to join as member, you recognize that this is your unique account,
 and that you will only certify persons that you know well enough.</b>
  """.format(
-            ROOT_SERVERS[currency]["display"],
-            params.c,
-            QLocale().toString(params.dt / 86400, 'f', 2),
-            self.tr('Fundamental growth (c)'),
-            params.ud0,
-            self.tr('Initial Universal Dividend UD(0) in'),
-            ROOT_SERVERS[currency]["display"],
-            dt_as_str,
-            self.tr('Time period between two UD'),
-            dt_reeval_as_str,
-            self.tr('Time period between two UD reevaluation'),
-            ROOT_SERVERS[currency]["display"],
-            QLocale().toString(params.sig_period / 86400, 'f', 2),
-            self.tr('Minimum delay between 2 certifications (in days)'),
-            QLocale().toString(params.sig_validity / 86400, 'f', 2),
-            self.tr('Maximum age of a valid signature (in days)'),
-            params.sig_qty,
-            self.tr('Minimum quantity of signatures to be part of the WoT'),
-            params.sig_stock,
-            self.tr('Maximum quantity of active certifications made by member.'),
-            params.sig_window,
-            self.tr('Maximum delay a certification can wait before being expired for non-writing.'),
-            params.xpercent,
-            self.tr('Minimum percent of sentries to reach to match the distance rule'),
-            params.ms_validity / 86400,
-            self.tr('Maximum age of a valid membership (in days)'),
-            params.step_max,
-            self.tr('Maximum distance between each WoT member and a newcomer'),
+                ROOT_SERVERS[currency]["display"],
+                params.c,
+                QLocale().toString(params.dt / 86400, "f", 2),
+                self.tr("Fundamental growth (c)"),
+                params.ud0,
+                self.tr("Initial Universal Dividend UD(0) in"),
+                ROOT_SERVERS[currency]["display"],
+                dt_as_str,
+                self.tr("Time period between two UD"),
+                dt_reeval_as_str,
+                self.tr("Time period between two UD reevaluation"),
+                ROOT_SERVERS[currency]["display"],
+                QLocale().toString(params.sig_period / 86400, "f", 2),
+                self.tr("Minimum delay between 2 certifications (in days)"),
+                QLocale().toString(params.sig_validity / 86400, "f", 2),
+                self.tr("Maximum age of a valid signature (in days)"),
+                params.sig_qty,
+                self.tr("Minimum quantity of signatures to be part of the WoT"),
+                params.sig_stock,
+                self.tr("Maximum quantity of active certifications made by member."),
+                params.sig_window,
+                self.tr(
+                    "Maximum delay a certification can wait before being expired for non-writing."
+                ),
+                params.xpercent,
+                self.tr(
+                    "Minimum percent of sentries to reach to match the distance rule"
+                ),
+                params.ms_validity / 86400,
+                self.tr("Maximum age of a valid membership (in days)"),
+                params.step_max,
+                self.tr("Maximum distance between each WoT member and a newcomer"),
+            )
         )
-    )
-        message_box.setStandardButtons(QMessageBox.Yes | QMessageBox.No )
+        message_box.setStandardButtons(QMessageBox.Yes | QMessageBox.No)
         message_box.setDefaultButton(QMessageBox.No)
         return await dialog_async_exec(message_box)
 
diff --git a/src/sakia/gui/navigation/model.py b/src/sakia/gui/navigation/model.py
index d77cfcd046355b6007fddfca0737811c8ee24ae8..4a54fdd50f2fcfad45dc898f4c89b8e2314ea908 100644
--- a/src/sakia/gui/navigation/model.py
+++ b/src/sakia/gui/navigation/model.py
@@ -9,6 +9,7 @@ class NavigationModel(QObject):
     """
     The model of Navigation component
     """
+
     navigation_changed = pyqtSignal(GenericTreeModel)
 
     def __init__(self, parent, app):
@@ -24,10 +25,13 @@ class NavigationModel(QObject):
         self._contacts_processor = ContactsProcessor.instanciate(self.app)
 
     def handle_identity_change(self, identity):
-        for node in self.navigation[3]['children']:
-            if node['component'] == "Informations":
+        for node in self.navigation[3]["children"]:
+            if node["component"] == "Informations":
                 connection = node["misc"]["connection"]
-                if connection.pubkey == identity.pubkey and connection.uid == identity.uid:
+                if (
+                    connection.pubkey == identity.pubkey
+                    and connection.uid == identity.uid
+                ):
                     icon = self.identity_icon(connection)
                     node["icon"] = icon
                     return node
@@ -35,47 +39,39 @@ class NavigationModel(QObject):
     def init_navigation_data(self):
         self.navigation = [
             {
-                'title': self.tr('Network'),
-                'icon': ':/icons/network_icon',
-                'component': "Network",
-                'dependencies': {
-                    'network_service': self.app.network_service,
-                },
-                'misc': {
-                },
-                'children': []
+                "title": self.tr("Network"),
+                "icon": ":/icons/network_icon",
+                "component": "Network",
+                "dependencies": {"network_service": self.app.network_service,},
+                "misc": {},
+                "children": [],
             },
             {
-                'title': self.tr('Identities'),
-                'icon': ':/icons/members_icon',
-                'component': "Identities",
-                'dependencies': {
-                    'blockchain_service': self.app.blockchain_service,
-                    'identities_service': self.app.identities_service,
+                "title": self.tr("Identities"),
+                "icon": ":/icons/members_icon",
+                "component": "Identities",
+                "dependencies": {
+                    "blockchain_service": self.app.blockchain_service,
+                    "identities_service": self.app.identities_service,
                 },
-                'misc': {
-                }
+                "misc": {},
             },
             {
-                'title': self.tr('Web of Trust'),
-                'icon': ':/icons/wot_icon',
-                'component': "Wot",
-                'dependencies': {
-                    'blockchain_service': self.app.blockchain_service,
-                    'identities_service': self.app.identities_service,
+                "title": self.tr("Web of Trust"),
+                "icon": ":/icons/wot_icon",
+                "component": "Wot",
+                "dependencies": {
+                    "blockchain_service": self.app.blockchain_service,
+                    "identities_service": self.app.identities_service,
                 },
-                'misc': {
-                }
+                "misc": {},
             },
-            {
-                'title': self.tr('Personal accounts'),
-                'children': []
-            }
+            {"title": self.tr("Personal accounts"), "children": []},
         ]
 
         self._current_data = self.navigation[0]
         for connection in self.app.db.connections_repo.get_all():
-            self.navigation[3]['children'].append(self.create_node(connection))
+            self.navigation[3]["children"].append(self.create_node(connection))
         try:
             self._current_data = self.navigation[0]
         except IndexError:
@@ -90,68 +86,64 @@ class NavigationModel(QObject):
             title = connection.title()
         if connection.uid:
             node = {
-                'title': title,
-                'component': "Informations",
-                'icon': self.identity_icon(connection),
-                'dependencies': {
-                    'blockchain_service': self.app.blockchain_service,
-                    'identities_service': self.app.identities_service,
-                    'sources_service': self.app.sources_service,
-                    'connection': connection,
-                },
-                'misc': {
-                    'connection': connection
+                "title": title,
+                "component": "Informations",
+                "icon": self.identity_icon(connection),
+                "dependencies": {
+                    "blockchain_service": self.app.blockchain_service,
+                    "identities_service": self.app.identities_service,
+                    "sources_service": self.app.sources_service,
+                    "connection": connection,
                 },
-                'children': [
+                "misc": {"connection": connection},
+                "children": [
                     {
-                        'title': self.tr('Transfers'),
-                        'icon': ':/icons/tx_icon',
-                        'component': "TxHistory",
-                        'dependencies': {
-                            'connection': connection,
-                            'identities_service': self.app.identities_service,
-                            'blockchain_service': self.app.blockchain_service,
-                            'transactions_service': self.app.transactions_service,
-                            "sources_service": self.app.sources_service
+                        "title": self.tr("Transfers"),
+                        "icon": ":/icons/tx_icon",
+                        "component": "TxHistory",
+                        "dependencies": {
+                            "connection": connection,
+                            "identities_service": self.app.identities_service,
+                            "blockchain_service": self.app.blockchain_service,
+                            "transactions_service": self.app.transactions_service,
+                            "sources_service": self.app.sources_service,
                         },
-                        'misc': {
-                            'connection': connection
-                        }
+                        "misc": {"connection": connection},
                     }
-                ]
+                ],
             }
         else:
             node = {
-                'title': title,
-                'component': "TxHistory",
-                'icon': ':/icons/tx_icon',
-                'dependencies': {
-                    'connection': connection,
-                    'identities_service': self.app.identities_service,
-                    'blockchain_service': self.app.blockchain_service,
-                    'transactions_service': self.app.transactions_service,
-                    "sources_service": self.app.sources_service
-                },
-                'misc': {
-                    'connection': connection
+                "title": title,
+                "component": "TxHistory",
+                "icon": ":/icons/tx_icon",
+                "dependencies": {
+                    "connection": connection,
+                    "identities_service": self.app.identities_service,
+                    "blockchain_service": self.app.blockchain_service,
+                    "transactions_service": self.app.transactions_service,
+                    "sources_service": self.app.sources_service,
                 },
-                'children': []
+                "misc": {"connection": connection},
+                "children": [],
             }
 
         return node
 
     def identity_icon(self, connection):
         if self.identity_is_member(connection):
-            return ':/icons/member'
+            return ":/icons/member"
         else:
-            return ':/icons/not_member'
+            return ":/icons/not_member"
 
     def view_in_wot(self, connection):
-        identity = self.app.identities_service.get_identity(connection.pubkey, connection.uid)
+        identity = self.app.identities_service.get_identity(
+            connection.pubkey, connection.uid
+        )
         self.app.view_in_wot.emit(identity)
 
     def generic_tree(self):
-        return GenericTreeModel.create("Navigation", self.navigation[3]['children'])
+        return GenericTreeModel.create("Navigation", self.navigation[3]["children"])
 
     def add_connection(self, connection):
         raw_node = self.create_node(connection)
@@ -165,14 +157,14 @@ class NavigationModel(QObject):
         return self._current_data.get(key, None)
 
     def _lookup_raw_data(self, raw_data, component, **kwargs):
-        if raw_data['component'] == component:
+        if raw_data["component"] == component:
             if kwargs:
                 for k in kwargs:
-                    if raw_data['misc'].get(k, None) == kwargs[k]:
+                    if raw_data["misc"].get(k, None) == kwargs[k]:
                         return raw_data
             else:
                 return raw_data
-        for c in raw_data.get('children', []):
+        for c in raw_data.get("children", []):
             children_data = self._lookup_raw_data(c, component, **kwargs)
             if children_data:
                 return children_data
@@ -185,22 +177,28 @@ class NavigationModel(QObject):
 
     def current_connection(self):
         if self._current_data:
-            return self._current_data['misc'].get('connection', None)
+            return self._current_data["misc"].get("connection", None)
         else:
             return None
 
     def generate_revocation(self, connection, secret_key, password):
-        return self.app.documents_service.generate_revocation(connection, secret_key, password)
+        return self.app.documents_service.generate_revocation(
+            connection, secret_key, password
+        )
 
     def identity_published(self, connection):
-        identity = self.app.identities_service.get_identity(connection.pubkey, connection.uid)
+        identity = self.app.identities_service.get_identity(
+            connection.pubkey, connection.uid
+        )
         if identity:
             return identity.written
         else:
             return False
 
     def identity_is_member(self, connection):
-        identity = self.app.identities_service.get_identity(connection.pubkey, connection.uid)
+        identity = self.app.identities_service.get_identity(
+            connection.pubkey, connection.uid
+        )
         if identity:
             return identity.member
         else:
@@ -208,10 +206,10 @@ class NavigationModel(QObject):
 
     async def remove_connection(self, connection):
         for data in self.navigation:
-            connected_to = self._current_data['misc'].get('connection', None)
+            connected_to = self._current_data["misc"].get("connection", None)
             if connected_to == connection:
                 try:
-                    self._current_data['widget'].disconnect()
+                    self._current_data["widget"].disconnect()
                 except TypeError as e:
                     if "disconnect()" in str(e):
                         pass
@@ -220,10 +218,14 @@ class NavigationModel(QObject):
         await self.app.remove_connection(connection)
 
     async def send_leave(self, connection, secret_key, password):
-        return await self.app.documents_service.send_membership(connection, secret_key, password, "OUT")
+        return await self.app.documents_service.send_membership(
+            connection, secret_key, password, "OUT"
+        )
 
     async def send_identity(self, connection, identity_doc):
-        return await self.app.documents_service.broadcast_identity(connection, identity_doc)
+        return await self.app.documents_service.broadcast_identity(
+            connection, identity_doc
+        )
 
     def generate_identity(self, connection):
         return self.app.documents_service.generate_identity(connection)
diff --git a/src/sakia/gui/navigation/network/controller.py b/src/sakia/gui/navigation/network/controller.py
index 5e5b61d51ecd8d5c9c550a6720359afcfbee9e23..85568d5d042b28cf374303dd75657917be8ab3c6 100644
--- a/src/sakia/gui/navigation/network/controller.py
+++ b/src/sakia/gui/navigation/network/controller.py
@@ -25,7 +25,9 @@ class NetworkController(QObject):
         table_model = self.model.init_network_table_model()
         self.view.set_network_table_model(table_model)
         self.view.manual_refresh_clicked.connect(self.refresh_nodes_manually)
-        self.view.table_network.customContextMenuRequested.connect(self.node_context_menu)
+        self.view.table_network.customContextMenuRequested.connect(
+            self.node_context_menu
+        )
 
     @classmethod
     def create(cls, parent, app, network_service):
@@ -41,7 +43,7 @@ class NetworkController(QObject):
         txhistory = cls(parent, view, model)
         model.setParent(txhistory)
         return txhistory
-    
+
     def refresh_nodes_manually(self):
         self.model.refresh_nodes_once()
 
@@ -74,6 +76,8 @@ class NetworkController(QObject):
         bma_endpoints = [e for e in node.endpoints if isinstance(e, BMAEndpoint)]
         if bma_endpoints:
             conn_handler = next(bma_endpoints[0].conn_handler())
-            peering_url = bma.API(conn_handler, bma.network.URL_PATH).reverse_url(conn_handler.http_scheme, '/peering')
+            peering_url = bma.API(conn_handler, bma.network.URL_PATH).reverse_url(
+                conn_handler.http_scheme, "/peering"
+            )
             url = QUrl(peering_url)
             QDesktopServices.openUrl(url)
diff --git a/src/sakia/gui/navigation/network/delegate.py b/src/sakia/gui/navigation/network/delegate.py
index d75c0ca5c2521478938a7d878ec107f8dbdd9c67..13454dd1d85914ff9598e0ce4ba2e3598d951d70 100644
--- a/src/sakia/gui/navigation/network/delegate.py
+++ b/src/sakia/gui/navigation/network/delegate.py
@@ -11,9 +11,11 @@ class NetworkDelegate(QStyledItemDelegate):
         style = QApplication.style()
 
         doc = QTextDocument()
-        if index.column() in (NetworkTableModel.columns_types.index('address'),
-                              NetworkTableModel.columns_types.index('port'),
-                              NetworkTableModel.columns_types.index('api')):
+        if index.column() in (
+            NetworkTableModel.columns_types.index("address"),
+            NetworkTableModel.columns_types.index("port"),
+            NetworkTableModel.columns_types.index("api"),
+        ):
             doc.setHtml(option.text)
         else:
             doc.setPlainText(option.text)
@@ -35,9 +37,11 @@ class NetworkDelegate(QStyledItemDelegate):
         self.initStyleOption(option, index)
 
         doc = QTextDocument()
-        if index.column() in (NetworkTableModel.columns_types.index('address'),
-                              NetworkTableModel.columns_types.index('port'),
-                              NetworkTableModel.columns_types.index('api')):
+        if index.column() in (
+            NetworkTableModel.columns_types.index("address"),
+            NetworkTableModel.columns_types.index("port"),
+            NetworkTableModel.columns_types.index("api"),
+        ):
             doc.setHtml(option.text)
         else:
             doc.setPlainText("")
diff --git a/src/sakia/gui/navigation/network/model.py b/src/sakia/gui/navigation/network/model.py
index f6b7f5a1cc8bda00f0c3dffb37b2e8dccf70c007..7374237bd2c64049a2ea4412389d150ca174d54b 100644
--- a/src/sakia/gui/navigation/network/model.py
+++ b/src/sakia/gui/navigation/network/model.py
@@ -43,8 +43,12 @@ class NetworkModel(QObject):
         """
         if index.isValid() and index.row() < self.table_model.rowCount(QModelIndex()):
             source_index = self.table_model.mapToSource(index)
-            node_col = NetworkTableModel.columns_types.index('node')
-            node_index = self.table_model.sourceModel().index(source_index.row(), node_col)
-            source_data = self.table_model.sourceModel().data(node_index, Qt.DisplayRole)
+            node_col = NetworkTableModel.columns_types.index("node")
+            node_index = self.table_model.sourceModel().index(
+                source_index.row(), node_col
+            )
+            source_data = self.table_model.sourceModel().data(
+                node_index, Qt.DisplayRole
+            )
             return True, source_data
         return False, None
diff --git a/src/sakia/gui/navigation/network/table_model.py b/src/sakia/gui/navigation/network/table_model.py
index 97fbb93c7b25595e96a68a9e43b71adb118c45b1..bd101e30bfd034cef94af148b6f44573d568f19c 100644
--- a/src/sakia/gui/navigation/network/table_model.py
+++ b/src/sakia/gui/navigation/network/table_model.py
@@ -1,14 +1,27 @@
-from PyQt5.QtCore import QAbstractTableModel, Qt, QVariant, QSortFilterProxyModel, \
-    QDateTime, QLocale, QT_TRANSLATE_NOOP, QModelIndex, pyqtSignal
+from PyQt5.QtCore import (
+    QAbstractTableModel,
+    Qt,
+    QVariant,
+    QSortFilterProxyModel,
+    QDateTime,
+    QLocale,
+    QT_TRANSLATE_NOOP,
+    QModelIndex,
+    pyqtSignal,
+)
 from PyQt5.QtGui import QColor, QFont, QIcon
 from sakia.data.entities import Node
-from duniterpy.documents import BMAEndpoint, SecuredBMAEndpoint, WS2PEndpoint, UnknownEndpoint
+from duniterpy.documents import (
+    BMAEndpoint,
+    SecuredBMAEndpoint,
+    WS2PEndpoint,
+    UnknownEndpoint,
+)
 from sakia.data.processors import BlockchainProcessor
 import logging
 
 
 class NetworkFilterProxyModel(QSortFilterProxyModel):
-
     def __init__(self, app, parent=None):
         super().__init__(parent)
         self.app = app
@@ -24,29 +37,33 @@ class NetworkFilterProxyModel(QSortFilterProxyModel):
         left_data = self.sourceModel().data(left, Qt.DisplayRole)
         right_data = self.sourceModel().data(right, Qt.DisplayRole)
 
-        if left.column() == NetworkTableModel.columns_types.index('pubkey'):
+        if left.column() == NetworkTableModel.columns_types.index("pubkey"):
             return left_data < right_data
 
-        if left.column() == NetworkTableModel.columns_types.index('port'):
-            left_data = int(left_data.split('\n')[0]) if left_data != '' else 0
-            right_data = int(right_data.split('\n')[0]) if right_data != '' else 0
+        if left.column() == NetworkTableModel.columns_types.index("port"):
+            left_data = int(left_data.split("\n")[0]) if left_data != "" else 0
+            right_data = int(right_data.split("\n")[0]) if right_data != "" else 0
 
-        if left.column() == NetworkTableModel.columns_types.index('current_block'):
-            left_data = int(left_data) if left_data != '' else 0
-            right_data = int(right_data) if right_data != '' else 0
+        if left.column() == NetworkTableModel.columns_types.index("current_block"):
+            left_data = int(left_data) if left_data != "" else 0
+            right_data = int(right_data) if right_data != "" else 0
             if left_data == right_data:
-                hash_col = NetworkTableModel.columns_types.index('current_hash')
-                return self.lessThan(self.sourceModel().index(left.row(), hash_col),
-                                     self.sourceModel().index(right.row(), hash_col))
+                hash_col = NetworkTableModel.columns_types.index("current_hash")
+                return self.lessThan(
+                    self.sourceModel().index(left.row(), hash_col),
+                    self.sourceModel().index(right.row(), hash_col),
+                )
 
         # for every column which is not current_block or current_time,
         # if they are different from the pubkey column
         # if they are equal, we sort them by the pubkey
-        if left.column() != NetworkTableModel.columns_types.index('pubkey'):
+        if left.column() != NetworkTableModel.columns_types.index("pubkey"):
             if left_data == right_data:
-                pubkey_col = NetworkTableModel.columns_types.index('pubkey')
-                return self.lessThan(self.sourceModel().index(left.row(), pubkey_col),
-                                     self.sourceModel().index(right.row(), pubkey_col))
+                pubkey_col = NetworkTableModel.columns_types.index("pubkey")
+                return self.lessThan(
+                    self.sourceModel().index(left.row(), pubkey_col),
+                    self.sourceModel().index(right.row(), pubkey_col),
+                )
 
         return left_data < right_data
 
@@ -65,38 +82,47 @@ class NetworkFilterProxyModel(QSortFilterProxyModel):
         source_data = source_model.data(source_index, role)
 
         if role == Qt.DisplayRole:
-            if index.column() == NetworkTableModel.columns_types.index('is_member'):
-                value = {True: QT_TRANSLATE_NOOP("NetworkTableModel", 'yes'),
-                         False: QT_TRANSLATE_NOOP("NetworkTableModel", 'no'),
-                         None: QT_TRANSLATE_NOOP("NetworkTableModel", 'offline')}
+            if index.column() == NetworkTableModel.columns_types.index("is_member"):
+                value = {
+                    True: QT_TRANSLATE_NOOP("NetworkTableModel", "yes"),
+                    False: QT_TRANSLATE_NOOP("NetworkTableModel", "no"),
+                    None: QT_TRANSLATE_NOOP("NetworkTableModel", "offline"),
+                }
                 return value[source_data]
 
-            if index.column() == NetworkTableModel.columns_types.index('pubkey'):
+            if index.column() == NetworkTableModel.columns_types.index("pubkey"):
                 return source_data[:5]
 
-            if index.column() == NetworkTableModel.columns_types.index('current_block'):
+            if index.column() == NetworkTableModel.columns_types.index("current_block"):
                 if source_data == -1:
                     return ""
                 else:
                     return source_data
 
-            if index.column() == NetworkTableModel.columns_types.index('address') \
-                    or index.column() == NetworkTableModel.columns_types.index('port') \
-                    or index.column() == NetworkTableModel.columns_types.index('api'):
-                    return "<p>" + source_data.replace('\n', "<br>") + "</p>"
+            if (
+                index.column() == NetworkTableModel.columns_types.index("address")
+                or index.column() == NetworkTableModel.columns_types.index("port")
+                or index.column() == NetworkTableModel.columns_types.index("api")
+            ):
+                return "<p>" + source_data.replace("\n", "<br>") + "</p>"
 
-            if index.column() == NetworkTableModel.columns_types.index('current_hash'):
+            if index.column() == NetworkTableModel.columns_types.index("current_hash"):
                 return source_data[:10]
 
         if role == Qt.TextAlignmentRole:
-            if source_index.column() == NetworkTableModel.columns_types.index('address') \
-                    or source_index.column() == self.sourceModel().columns_types.index('current_block'):
+            if source_index.column() == NetworkTableModel.columns_types.index(
+                "address"
+            ) or source_index.column() == self.sourceModel().columns_types.index(
+                "current_block"
+            ):
                 return Qt.AlignRight | Qt.AlignVCenter
-            if source_index.column() == NetworkTableModel.columns_types.index('is_member'):
+            if source_index.column() == NetworkTableModel.columns_types.index(
+                "is_member"
+            ):
                 return Qt.AlignCenter
 
         if role == Qt.FontRole:
-            is_root_col = NetworkTableModel.columns_types.index('is_root')
+            is_root_col = NetworkTableModel.columns_types.index("is_root")
             index_root_col = source_model.index(source_index.row(), is_root_col)
             if source_model.data(index_root_col, Qt.DisplayRole):
                 font = QFont()
@@ -115,31 +141,31 @@ class NetworkTableModel(QAbstractTableModel):
     """
 
     header_names = {
-        'address': QT_TRANSLATE_NOOP("NetworkTableModel", 'Address'),
-        'port': QT_TRANSLATE_NOOP("NetworkTableModel", 'Port'),
-        'api': QT_TRANSLATE_NOOP('NetworkTableModel', 'API'),
-        'current_block': QT_TRANSLATE_NOOP("NetworkTableModel", 'Block'),
-        'current_hash': QT_TRANSLATE_NOOP("NetworkTableModel", 'Hash'),
-        'uid': QT_TRANSLATE_NOOP("NetworkTableModel", 'UID'),
-        'is_member': QT_TRANSLATE_NOOP("NetworkTableModel", 'Member'),
-        'pubkey': QT_TRANSLATE_NOOP("NetworkTableModel", 'Pubkey'),
-        'software': QT_TRANSLATE_NOOP("NetworkTableModel", 'Software'),
-        'version': QT_TRANSLATE_NOOP("NetworkTableModel", 'Version')
+        "address": QT_TRANSLATE_NOOP("NetworkTableModel", "Address"),
+        "port": QT_TRANSLATE_NOOP("NetworkTableModel", "Port"),
+        "api": QT_TRANSLATE_NOOP("NetworkTableModel", "API"),
+        "current_block": QT_TRANSLATE_NOOP("NetworkTableModel", "Block"),
+        "current_hash": QT_TRANSLATE_NOOP("NetworkTableModel", "Hash"),
+        "uid": QT_TRANSLATE_NOOP("NetworkTableModel", "UID"),
+        "is_member": QT_TRANSLATE_NOOP("NetworkTableModel", "Member"),
+        "pubkey": QT_TRANSLATE_NOOP("NetworkTableModel", "Pubkey"),
+        "software": QT_TRANSLATE_NOOP("NetworkTableModel", "Software"),
+        "version": QT_TRANSLATE_NOOP("NetworkTableModel", "Version"),
     }
     columns_types = (
-        'address',
-        'port',
-        'api',
-        'current_block',
-        'current_hash',
-        'uid',
-        'is_member',
-        'pubkey',
-        'software',
-        'version',
-        'is_root',
-        'state',
-        'node'
+        "address",
+        "port",
+        "api",
+        "current_block",
+        "current_hash",
+        "uid",
+        "is_member",
+        "pubkey",
+        "software",
+        "version",
+        "is_root",
+        "state",
+        "node",
     )
 
     ONLINE = 0
@@ -147,22 +173,22 @@ class NetworkTableModel(QAbstractTableModel):
     DESYNCED = 3
 
     node_colors = {
-        ONLINE: QColor('#99ff99'),
-        OFFLINE: QColor('#ff9999'),
-        DESYNCED: QColor('#ffbd81')
+        ONLINE: QColor("#99ff99"),
+        OFFLINE: QColor("#ff9999"),
+        DESYNCED: QColor("#ffbd81"),
     }
 
     node_icons = {
         ONLINE: ":/icons/synchronized",
         OFFLINE: ":/icons/offline",
-        DESYNCED: ":/icons/forked"
+        DESYNCED: ":/icons/forked",
     }
     node_states = {
-        ONLINE: lambda: QT_TRANSLATE_NOOP("NetworkTableModel", 'Online'),
-        OFFLINE: lambda: QT_TRANSLATE_NOOP("NetworkTableModel", 'Offline'),
-        DESYNCED: lambda: QT_TRANSLATE_NOOP("NetworkTableModel", 'Unsynchronized')
+        ONLINE: lambda: QT_TRANSLATE_NOOP("NetworkTableModel", "Online"),
+        OFFLINE: lambda: QT_TRANSLATE_NOOP("NetworkTableModel", "Offline"),
+        DESYNCED: lambda: QT_TRANSLATE_NOOP("NetworkTableModel", "Unsynchronized"),
     }
-    
+
     def __init__(self, network_service, parent=None):
         """
         The table showing nodes
@@ -171,13 +197,13 @@ class NetworkTableModel(QAbstractTableModel):
         """
         super().__init__(parent)
         self.network_service = network_service
-        
+
         self.nodes_data = []
         self.network_service.node_changed.connect(self.change_node)
         self.network_service.node_removed.connect(self.remove_node)
         self.network_service.new_node_found.connect(self.add_node)
         self.network_service.latest_block_changed.connect(self.init_nodes)
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
 
     def data_node(self, node: Node, current_buid=None) -> tuple:
         """
@@ -232,9 +258,21 @@ class NetworkTableModel(QAbstractTableModel):
         if node.online() and node.current_buid != current_buid:
             state = NetworkTableModel.DESYNCED
 
-        return (address, port, api, number, block_hash, node.uid,
-                node.member, node.pubkey, node.software, node.version, node.root, state,
-                node)
+        return (
+            address,
+            port,
+            api,
+            number,
+            block_hash,
+            node.uid,
+            node.member,
+            node.pubkey,
+            node.software,
+            node.version,
+            node.root,
+            state,
+            node,
+        )
 
     def init_nodes(self, current_buid=None):
         self._logger.debug("Init nodes table")
@@ -254,14 +292,16 @@ class NetworkTableModel(QAbstractTableModel):
 
     def change_node(self, node):
         for i, n in enumerate(self.nodes_data):
-            if n[NetworkTableModel.columns_types.index('pubkey')] == node.pubkey:
+            if n[NetworkTableModel.columns_types.index("pubkey")] == node.pubkey:
                 self.nodes_data[i] = self.data_node(node)
-                self.dataChanged.emit(self.index(i, 0), self.index(i, len(self.columns_types)-1))
+                self.dataChanged.emit(
+                    self.index(i, 0), self.index(i, len(self.columns_types) - 1)
+                )
                 return
 
     def remove_node(self, node):
         for i, n in enumerate(self.nodes_data.copy()):
-            if n[NetworkTableModel.columns_types.index('pubkey')] == node.pubkey:
+            if n[NetworkTableModel.columns_types.index("pubkey")] == node.pubkey:
                 self.beginRemoveRows(QModelIndex(), i, i)
                 self.nodes_data.pop(i)
                 self.endRemoveRows()
@@ -290,16 +330,23 @@ class NetworkTableModel(QAbstractTableModel):
         if role == Qt.DisplayRole:
             return node[col]
         if role == Qt.BackgroundColorRole:
-            return NetworkTableModel.node_colors[node[NetworkTableModel.columns_types.index('state')]]
+            return NetworkTableModel.node_colors[
+                node[NetworkTableModel.columns_types.index("state")]
+            ]
 
         if role == Qt.ToolTipRole:
-            return NetworkTableModel.node_states[node[NetworkTableModel.columns_types.index('state')]]()
+            return NetworkTableModel.node_states[
+                node[NetworkTableModel.columns_types.index("state")]
+            ]()
 
         if role == Qt.DecorationRole and index.column() == 0:
-            return QIcon(NetworkTableModel.node_icons[node[NetworkTableModel.columns_types.index('state')]])
+            return QIcon(
+                NetworkTableModel.node_icons[
+                    node[NetworkTableModel.columns_types.index("state")]
+                ]
+            )
 
         return QVariant()
 
     def flags(self, index):
         return Qt.ItemIsSelectable | Qt.ItemIsEnabled
-
diff --git a/src/sakia/gui/navigation/network/view.py b/src/sakia/gui/navigation/network/view.py
index 8726ddb945d6ba42430bc9c9f2d8030efa8fecdb..a06a4476f8de6f66e290f56840d97ae56d46e2b2 100644
--- a/src/sakia/gui/navigation/network/view.py
+++ b/src/sakia/gui/navigation/network/view.py
@@ -9,6 +9,7 @@ class NetworkView(QWidget, Ui_NetworkWidget):
     """
     The view of Network component
     """
+
     manual_refresh_clicked = pyqtSignal()
 
     def __init__(self, parent):
@@ -29,11 +30,15 @@ class NetworkView(QWidget, Ui_NetworkWidget):
         self.table_network.setItemDelegate(NetworkDelegate())
         self.table_network.resizeColumnsToContents()
         self.table_network.resizeRowsToContents()
-        self.table_network.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
+        self.table_network.verticalHeader().setSectionResizeMode(
+            QHeaderView.ResizeToContents
+        )
 
     def manual_nodes_refresh(self):
         self.button_manual_refresh.setEnabled(False)
-        asyncio.get_event_loop().call_later(15, lambda: self.button_manual_refresh.setEnabled(True))
+        asyncio.get_event_loop().call_later(
+            15, lambda: self.button_manual_refresh.setEnabled(True)
+        )
         self.manual_refresh_clicked.emit()
 
     def changeEvent(self, event):
diff --git a/src/sakia/gui/navigation/txhistory/controller.py b/src/sakia/gui/navigation/txhistory/controller.py
index 2d4e50780bd7bcf4dff57030981a74b0489b7765..17e37ba71021117dab961e6698425c9953d7c438 100644
--- a/src/sakia/gui/navigation/txhistory/controller.py
+++ b/src/sakia/gui/navigation/txhistory/controller.py
@@ -15,6 +15,7 @@ class TxHistoryController(QObject):
     """
     Transfer history component controller
     """
+
     view_in_wot = pyqtSignal(object)
 
     def __init__(self, view, model, transfer):
@@ -28,24 +29,41 @@ class TxHistoryController(QObject):
         self.view = view
         self.model = model
         self.transfer = transfer
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
         ts_from, ts_to = self.view.get_time_frame()
         model = self.model.init_history_table_model(ts_from, ts_to)
         self.view.set_table_history_model(model)
 
         self.view.date_from.dateChanged.connect(self.dates_changed)
         self.view.date_to.dateChanged.connect(self.dates_changed)
-        self.view.table_history.customContextMenuRequested['QPoint'].connect(self.history_context_menu)
+        self.view.table_history.customContextMenuRequested["QPoint"].connect(
+            self.history_context_menu
+        )
         self.refresh()
 
     @classmethod
-    def create(cls, parent, app, connection,
-               identities_service, blockchain_service, transactions_service, sources_service):
+    def create(
+        cls,
+        parent,
+        app,
+        connection,
+        identities_service,
+        blockchain_service,
+        transactions_service,
+        sources_service,
+    ):
 
         transfer = TransferController.integrate_to_main_view(None, app, connection)
         view = TxHistoryView(parent.view, transfer.view)
-        model = TxHistoryModel(None, app, connection, blockchain_service, identities_service,
-                               transactions_service, sources_service)
+        model = TxHistoryModel(
+            None,
+            app,
+            connection,
+            blockchain_service,
+            identities_service,
+            transactions_service,
+            sources_service,
+        )
         txhistory = cls(view, model, transfer)
         model.setParent(txhistory)
         app.referential_changed.connect(txhistory.refresh_balance)
@@ -72,8 +90,9 @@ class TxHistoryController(QObject):
     async def notification_reception(self, received_list):
         if len(received_list) > 0:
             localized_amount = await self.model.received_amount(received_list)
-            text = self.tr("Received {amount} from {number} transfers").format(amount=localized_amount,
-                                                                               number=len(received_list))
+            text = self.tr("Received {amount} from {number} transfers").format(
+                amount=localized_amount, number=len(received_list)
+            )
             if self.model.notifications():
                 toast.display(self.tr("New transactions received"), text)
 
@@ -89,7 +108,12 @@ class TxHistoryController(QObject):
         index = self.view.table_history.indexAt(point)
         valid, identities, transfer = self.model.table_data(index)
         if valid:
-            menu = ContextMenu.from_data(self.view, self.model.app, self.model.connection, identities + [transfer])
+            menu = ContextMenu.from_data(
+                self.view,
+                self.model.app,
+                self.model.connection,
+                identities + [transfer],
+            )
             menu.view_identity_in_wot.connect(self.view_in_wot)
             cursor = QCursor.pos()
             _x = cursor.x()
@@ -112,4 +136,3 @@ class TxHistoryController(QObject):
 
             self.refresh_balance()
             self.refresh_pages()
-
diff --git a/src/sakia/gui/navigation/txhistory/delegate.py b/src/sakia/gui/navigation/txhistory/delegate.py
index 4c28df7dd587a51b8679940a999c8b08baf13ecf..11495b968fe979a64a0b970780e5040c31b1d8d6 100644
--- a/src/sakia/gui/navigation/txhistory/delegate.py
+++ b/src/sakia/gui/navigation/txhistory/delegate.py
@@ -13,7 +13,7 @@ class TxHistoryDelegate(QStyledItemDelegate):
         style = QApplication.style()
 
         doc = QTextDocument()
-        if index.column() == HistoryTableModel.columns_types.index('pubkey'):
+        if index.column() == HistoryTableModel.columns_types.index("pubkey"):
             doc.setHtml(option.text)
         else:
             doc.setPlainText(option.text)
@@ -39,7 +39,7 @@ class TxHistoryDelegate(QStyledItemDelegate):
         self.initStyleOption(option, index)
 
         doc = QTextDocument()
-        if index.column() == HistoryTableModel.columns_types.index('pubkey'):
+        if index.column() == HistoryTableModel.columns_types.index("pubkey"):
             doc.setHtml(option.text)
         else:
             doc.setPlainText("")
diff --git a/src/sakia/gui/navigation/txhistory/model.py b/src/sakia/gui/navigation/txhistory/model.py
index 6a82666781b92b5456c5d7e2d13d23f806241767..0409a68235db248e0976909febcec64016997376 100644
--- a/src/sakia/gui/navigation/txhistory/model.py
+++ b/src/sakia/gui/navigation/txhistory/model.py
@@ -12,8 +12,17 @@ class TxHistoryModel(QObject):
     """
     The model of Navigation component
     """
-    def __init__(self, parent, app, connection, blockchain_service, identities_service,
-                 transactions_service, sources_service):
+
+    def __init__(
+        self,
+        parent,
+        app,
+        connection,
+        blockchain_service,
+        identities_service,
+        transactions_service,
+        sources_service,
+    ):
         """
 
         :param sakia.gui.txhistory.TxHistoryParent parent: the parent controller
@@ -40,8 +49,15 @@ class TxHistoryModel(QObject):
         :param int ts_to: date to where to filter tx
         :return:
         """
-        self._model = HistoryTableModel(self, self.app, self.connection, ts_from, ts_to,
-                                        self.identities_service, self.transactions_service)
+        self._model = HistoryTableModel(
+            self,
+            self.app,
+            self.connection,
+            ts_from,
+            ts_to,
+            self.identities_service,
+            self.transactions_service,
+        )
         self._model.init_transfers()
         self.app.new_transfer.connect(self._model.init_transfers)
         self.app.new_dividend.connect(self._model.init_transfers)
@@ -71,8 +87,10 @@ class TxHistoryModel(QObject):
                     identities_or_pubkeys.append(identity)
                 else:
                     identities_or_pubkeys.append(pubkey)
-            transfer = self._model.transfers_data[index.row()][self._model.columns_types.index('raw_data')]
-            return True,  identities_or_pubkeys, transfer
+            transfer = self._model.transfers_data[index.row()][
+                self._model.columns_types.index("raw_data")
+            ]
+            return True, identities_or_pubkeys, transfer
         return False, [], None
 
     def minimum_maximum_datetime(self):
@@ -82,7 +100,7 @@ class TxHistoryModel(QObject):
         :return: minimum and maximum datetime
         """
         minimum_datetime = QDateTime()
-        minimum_datetime.setTime_t(1488322800) # First of may 2017
+        minimum_datetime.setTime_t(1488322800)  # First of may 2017
         tomorrow_datetime = QDateTime().currentDateTime().addDays(1)
         return minimum_datetime, tomorrow_datetime
 
@@ -94,10 +112,10 @@ class TxHistoryModel(QObject):
         """
         amount = 0
         for r in received_list:
-            amount += r.metadata['amount']
-        localized_amount = await self.app.current_ref.instance(amount,
-                                                               self.connection.currency,
-                                                               self.app).localized(True, True)
+            amount += r.metadata["amount"]
+        localized_amount = await self.app.current_ref.instance(
+            amount, self.connection.currency, self.app
+        ).localized(True, True)
         return localized_amount
 
     def localized_balance(self):
@@ -108,9 +126,9 @@ class TxHistoryModel(QObject):
         """
         try:
             amount = self.sources_service.amount(self.connection.pubkey)
-            localized_amount = self.app.current_ref.instance(amount,
-                                                             self.connection.currency,
-                                                             self.app).localized(False, True)
+            localized_amount = self.app.current_ref.instance(
+                amount, self.connection.currency, self.app
+            ).localized(False, True)
             return localized_amount
         except NoPeerAvailable as e:
             logging.debug(str(e))
diff --git a/src/sakia/gui/navigation/txhistory/sql_adapter.py b/src/sakia/gui/navigation/txhistory/sql_adapter.py
index 6a05210ac4acbfea50ef6159d188881fb4af7024..294e39eca558660f3b312176eeb4997545a8fbbd 100644
--- a/src/sakia/gui/navigation/txhistory/sql_adapter.py
+++ b/src/sakia/gui/navigation/txhistory/sql_adapter.py
@@ -63,50 +63,102 @@ PAGE_LENGTH = 50
 class TxHistorySqlAdapter:
     _conn = attr.ib()  # :type sqlite3.Connection
 
-    def _transfers_and_dividends(self, currency, pubkey, ts_from, ts_to, stopline_hash, offset=0, limit=1000,
-                                    sort_by="currency", sort_order="ASC"):
+    def _transfers_and_dividends(
+        self,
+        currency,
+        pubkey,
+        ts_from,
+        ts_to,
+        stopline_hash,
+        offset=0,
+        limit=1000,
+        sort_by="currency",
+        sort_order="ASC",
+    ):
         """
         Get all transfers in the database on a given currency from or to a pubkey
 
         :param str pubkey: the criterions of the lookup
         :rtype: List[sakia.data.entities.Transaction]
         """
-        request = (TX_HISTORY_REQUEST + """
+        request = (
+            TX_HISTORY_REQUEST
+            + """
 ORDER BY {sort_by} {sort_order}, txid {sort_order}
-LIMIT {limit} OFFSET {offset}""").format(offset=offset,
-                                         limit=limit,
-                                         sort_by=sort_by,
-                                         sort_order=sort_order,
-                                         pubkey=pubkey
-                                         )
-        c = self._conn.execute(request, (currency, pubkey, ts_from, ts_to,
-                                         currency, pubkey, ts_from, ts_to, stopline_hash,
-                                         currency, pubkey, ts_from, ts_to))
+LIMIT {limit} OFFSET {offset}"""
+        ).format(
+            offset=offset,
+            limit=limit,
+            sort_by=sort_by,
+            sort_order=sort_order,
+            pubkey=pubkey,
+        )
+        c = self._conn.execute(
+            request,
+            (
+                currency,
+                pubkey,
+                ts_from,
+                ts_to,
+                currency,
+                pubkey,
+                ts_from,
+                ts_to,
+                stopline_hash,
+                currency,
+                pubkey,
+                ts_from,
+                ts_to,
+            ),
+        )
         datas = c.fetchall()
         if datas:
             return datas
         return []
 
-    def _transfers_and_dividends_count(self, currency, pubkey, ts_from, ts_to, stopline_hash):
+    def _transfers_and_dividends_count(
+        self, currency, pubkey, ts_from, ts_to, stopline_hash
+    ):
         """
         Get all transfers in the database on a given currency from or to a pubkey
 
         :param str pubkey: the criterions of the lookup
         :rtype: List[sakia.data.entities.Transaction]
         """
-        request = ("""
+        request = (
+            """
 SELECT COUNT(*)
 FROM (
-""" + TX_HISTORY_REQUEST + ")").format(pubkey=pubkey)
-        c = self._conn.execute(request, (currency, pubkey, ts_from, ts_to,
-                                                    currency, pubkey, ts_from, ts_to, stopline_hash,
-                                                    currency, pubkey, ts_from, ts_to))
+"""
+            + TX_HISTORY_REQUEST
+            + ")"
+        ).format(pubkey=pubkey)
+        c = self._conn.execute(
+            request,
+            (
+                currency,
+                pubkey,
+                ts_from,
+                ts_to,
+                currency,
+                pubkey,
+                ts_from,
+                ts_to,
+                stopline_hash,
+                currency,
+                pubkey,
+                ts_from,
+                ts_to,
+            ),
+        )
         datas = c.fetchone()
         if datas:
             return datas[0]
         return 0
 
-    def transfers_and_dividends(self, currency, pubkey, page, ts_from, ts_to, stopline_hash, sort_by, sort_order):
+    def transfers_and_dividends(
+        self, currency, pubkey, page, ts_from, ts_to, stopline_hash, sort_by, sort_order
+    ):
         """
         Get all transfers and dividends from or to a given pubkey
         :param str currency:
@@ -117,10 +169,17 @@ FROM (
         :return: the list of Transaction entities
         :rtype: List[sakia.data.entities.Transaction]
         """
-        return self._transfers_and_dividends(currency, pubkey, ts_from, ts_to, stopline_hash,
-                                                      offset=page*PAGE_LENGTH,
-                                                      limit=PAGE_LENGTH,
-                                                      sort_by=sort_by, sort_order=sort_order)
+        return self._transfers_and_dividends(
+            currency,
+            pubkey,
+            ts_from,
+            ts_to,
+            stopline_hash,
+            offset=page * PAGE_LENGTH,
+            limit=PAGE_LENGTH,
+            sort_by=sort_by,
+            sort_order=sort_order,
+        )
 
     def pages(self, currency, pubkey, ts_from, ts_to, stopline_hash):
         """
@@ -133,7 +192,7 @@ FROM (
         :return: the list of Transaction entities
         :rtype: List[sakia.data.entities.Transaction]
         """
-        count = self._transfers_and_dividends_count(currency, pubkey, ts_from, ts_to, stopline_hash)
+        count = self._transfers_and_dividends_count(
+            currency, pubkey, ts_from, ts_to, stopline_hash
+        )
         return int(count / PAGE_LENGTH)
-
-
diff --git a/src/sakia/gui/navigation/txhistory/table_model.py b/src/sakia/gui/navigation/txhistory/table_model.py
index f6ebb545a3b369b986161aef02b2d54e73733f15..166b26e05655e04b80c791571782ea0592b1de8d 100644
--- a/src/sakia/gui/navigation/txhistory/table_model.py
+++ b/src/sakia/gui/navigation/txhistory/table_model.py
@@ -1,8 +1,16 @@
 import datetime
 import logging
 
-from PyQt5.QtCore import QAbstractTableModel, Qt, QVariant, QSortFilterProxyModel, \
-    QDateTime, QLocale, QModelIndex, QT_TRANSLATE_NOOP
+from PyQt5.QtCore import (
+    QAbstractTableModel,
+    Qt,
+    QVariant,
+    QSortFilterProxyModel,
+    QDateTime,
+    QLocale,
+    QModelIndex,
+    QT_TRANSLATE_NOOP,
+)
 from PyQt5.QtGui import QFont, QColor
 from sakia.data.entities import Transaction
 from sakia.constants import MAX_CONFIRMATIONS
@@ -20,33 +28,42 @@ class HistoryTableModel(QAbstractTableModel):
     DIVIDEND = 32
 
     columns_types = (
-        'date',
-        'pubkey',
-        'amount',
-        'comment',
-        'state',
-        'txid',
-        'pubkey',
-        'block_number',
-        'txhash',
-        'raw_data'
+        "date",
+        "pubkey",
+        "amount",
+        "comment",
+        "state",
+        "txid",
+        "pubkey",
+        "block_number",
+        "txhash",
+        "raw_data",
     )
 
     columns_to_sql = {
-        'date': "ts",
+        "date": "ts",
         "pubkey": "pubkey",
         "amount": "amount",
-        "comment": "comment"
+        "comment": "comment",
     }
 
     columns_headers = (
-        QT_TRANSLATE_NOOP("HistoryTableModel", 'Date'),
-        QT_TRANSLATE_NOOP("HistoryTableModel", 'Public key'),
-        QT_TRANSLATE_NOOP("HistoryTableModel", 'Amount'),
-        QT_TRANSLATE_NOOP("HistoryTableModel", 'Comment')
+        QT_TRANSLATE_NOOP("HistoryTableModel", "Date"),
+        QT_TRANSLATE_NOOP("HistoryTableModel", "Public key"),
+        QT_TRANSLATE_NOOP("HistoryTableModel", "Amount"),
+        QT_TRANSLATE_NOOP("HistoryTableModel", "Comment"),
     )
 
-    def __init__(self, parent, app, connection, ts_from, ts_to,  identities_service, transactions_service):
+    def __init__(
+        self,
+        parent,
+        app,
+        connection,
+        ts_from,
+        ts_to,
+        identities_service,
+        transactions_service,
+    ):
         """
         History of all transactions
         :param PyQt5.QtWidgets.QWidget parent: parent widget
@@ -74,9 +91,11 @@ class HistoryTableModel(QAbstractTableModel):
         """
         Filter table by given timestamps
         """
-        logging.debug("Filtering from {0} to {1}".format(
-            datetime.datetime.fromtimestamp(ts_from).isoformat(' '),
-            datetime.datetime.fromtimestamp(ts_to).isoformat(' '))
+        logging.debug(
+            "Filtering from {0} to {1}".format(
+                datetime.datetime.fromtimestamp(ts_from).isoformat(" "),
+                datetime.datetime.fromtimestamp(ts_to).isoformat(" "),
+            )
         )
         self.ts_from = ts_from
         self.ts_to = ts_to
@@ -87,32 +106,41 @@ class HistoryTableModel(QAbstractTableModel):
         self.init_transfers()
 
     def pages(self):
-        return self.sql_adapter.pages(self.app.currency,
-                                      self.connection.pubkey,
-                                      ts_from=self.ts_from,
-                                      ts_to=self.ts_to,
-                                      stopline_hash=STOPLINE_HASH)
+        return self.sql_adapter.pages(
+            self.app.currency,
+            self.connection.pubkey,
+            ts_from=self.ts_from,
+            ts_to=self.ts_to,
+            stopline_hash=STOPLINE_HASH,
+        )
 
     def pubkeys(self, row):
-        return self.transfers_data[row][HistoryTableModel.columns_types.index('pubkey')].split('\n')
+        return self.transfers_data[row][
+            HistoryTableModel.columns_types.index("pubkey")
+        ].split("\n")
 
     def transfers_and_dividends(self):
         """
         Transfer
         :rtype: List[sakia.data.entities.Transfer]
         """
-        return self.sql_adapter.transfers_and_dividends(self.app.currency,
-                                                        self.connection.pubkey,
-                                                        page=self.current_page,
-                                                        ts_from=self.ts_from,
-                                                        ts_to=self.ts_to,
-                                                        stopline_hash=STOPLINE_HASH,
-                                                        sort_by=HistoryTableModel.columns_to_sql[self.main_column_id],
-                                                        sort_order= "ASC" if Qt.AscendingOrder else "DESC")
+        return self.sql_adapter.transfers_and_dividends(
+            self.app.currency,
+            self.connection.pubkey,
+            page=self.current_page,
+            ts_from=self.ts_from,
+            ts_to=self.ts_to,
+            stopline_hash=STOPLINE_HASH,
+            sort_by=HistoryTableModel.columns_to_sql[self.main_column_id],
+            sort_order="ASC" if Qt.AscendingOrder else "DESC",
+        )
 
     def change_transfer(self, transfer):
         for i, data in enumerate(self.transfers_data):
-            if data[HistoryTableModel.columns_types.index('txhash')] == transfer.sha_hash:
+            if (
+                data[HistoryTableModel.columns_types.index("txhash")]
+                == transfer.sha_hash
+            ):
                 if transfer.state == Transaction.DROPPED:
                     self.beginRemoveRows(QModelIndex(), i, i)
                     self.transfers_data.pop(i)
@@ -120,10 +148,16 @@ class HistoryTableModel(QAbstractTableModel):
                 else:
                     if self.connection.pubkey in transfer.issuers:
                         self.transfers_data[i] = self.data_sent(transfer)
-                        self.dataChanged.emit(self.index(i, 0), self.index(i, len(HistoryTableModel.columns_types)))
+                        self.dataChanged.emit(
+                            self.index(i, 0),
+                            self.index(i, len(HistoryTableModel.columns_types)),
+                        )
                     if self.connection.pubkey in transfer.receivers:
                         self.transfers_data[i] = self.data_received(transfer)
-                        self.dataChanged.emit(self.index(i, 0), self.index(i, len(HistoryTableModel.columns_types)))
+                        self.dataChanged.emit(
+                            self.index(i, 0),
+                            self.index(i, len(HistoryTableModel.columns_types)),
+                        )
 
     def data_stopline(self, transfer):
         """
@@ -144,9 +178,18 @@ class HistoryTableModel(QAbstractTableModel):
         date_ts = transfer.timestamp
         txid = transfer.txid
 
-        return (date_ts, "", 0,
-                self.tr("Transactions missing from history"), transfer.state, txid,
-                transfer.issuers, block_number, transfer.sha_hash, transfer)
+        return (
+            date_ts,
+            "",
+            0,
+            self.tr("Transactions missing from history"),
+            transfer.state,
+            txid,
+            transfer.issuers,
+            block_number,
+            transfer.sha_hash,
+            transfer,
+        )
 
     def data_received(self, transfer):
         """
@@ -156,7 +199,7 @@ class HistoryTableModel(QAbstractTableModel):
         """
         block_number = transfer.written_block
 
-        amount = transfer.amount * 10**transfer.amount_base
+        amount = transfer.amount * 10 ** transfer.amount_base
 
         senders = []
         for issuer in transfer.issuers:
@@ -169,9 +212,18 @@ class HistoryTableModel(QAbstractTableModel):
         date_ts = transfer.timestamp
         txid = transfer.txid
 
-        return (date_ts, "\n".join(senders), amount,
-                transfer.comment, transfer.state, txid,
-                transfer.issuers, block_number, transfer.sha_hash, transfer)
+        return (
+            date_ts,
+            "\n".join(senders),
+            amount,
+            transfer.comment,
+            transfer.state,
+            txid,
+            transfer.issuers,
+            block_number,
+            transfer.sha_hash,
+            transfer,
+        )
 
     def data_sent(self, transfer):
         """
@@ -181,7 +233,7 @@ class HistoryTableModel(QAbstractTableModel):
         """
         block_number = transfer.written_block
 
-        amount = transfer.amount * 10**transfer.amount_base * -1
+        amount = transfer.amount * 10 ** transfer.amount_base * -1
         receivers = []
         for receiver in transfer.receivers:
             identity = self.identities_service.get_identity(receiver)
@@ -192,8 +244,18 @@ class HistoryTableModel(QAbstractTableModel):
 
         date_ts = transfer.timestamp
         txid = transfer.txid
-        return (date_ts, "\n".join(receivers), amount, transfer.comment, transfer.state, txid,
-                transfer.receivers, block_number, transfer.sha_hash, transfer)
+        return (
+            date_ts,
+            "\n".join(receivers),
+            amount,
+            transfer.comment,
+            transfer.state,
+            txid,
+            transfer.receivers,
+            block_number,
+            transfer.sha_hash,
+            transfer,
+        )
 
     def data_dividend(self, dividend):
         """
@@ -203,7 +265,7 @@ class HistoryTableModel(QAbstractTableModel):
         """
         block_number = dividend.block_number
 
-        amount = dividend.amount * 10**dividend.base
+        amount = dividend.amount * 10 ** dividend.base
         identity = self.identities_service.get_identity(dividend.pubkey)
         if identity:
             receiver = dividend.pubkey + " (" + identity.uid + ")"
@@ -211,18 +273,30 @@ class HistoryTableModel(QAbstractTableModel):
             receiver = dividend.pubkey
 
         date_ts = dividend.timestamp
-        return (date_ts, receiver, amount, "", HistoryTableModel.DIVIDEND, 0,
-                dividend.pubkey, block_number, "", dividend)
+        return (
+            date_ts,
+            receiver,
+            amount,
+            "",
+            HistoryTableModel.DIVIDEND,
+            0,
+            dividend.pubkey,
+            block_number,
+            "",
+            dividend,
+        )
 
     def init_transfers(self):
         self.beginResetModel()
         self.transfers_data = []
         transfers_and_dividends = self.transfers_and_dividends()
         for data in transfers_and_dividends:
-            if data[4]: # If data is transfer, it has a sha_hash column
-                transfer = self.transactions_repo.get_one(currency=self.app.currency,
-                                                          pubkey=self.connection.pubkey,
-                                                          sha_hash=data[4])
+            if data[4]:  # If data is transfer, it has a sha_hash column
+                transfer = self.transactions_repo.get_one(
+                    currency=self.app.currency,
+                    pubkey=self.connection.pubkey,
+                    sha_hash=data[4],
+                )
 
                 if transfer.state != Transaction.DROPPED:
                     if data[4] == STOPLINE_HASH:
@@ -233,9 +307,11 @@ class HistoryTableModel(QAbstractTableModel):
                         self.transfers_data.append(self.data_received(transfer))
             else:
                 # else we get the dividend depending on the block number
-                dividend = self.dividends_repo.get_one(currency=self.app.currency,
-                                                       pubkey=self.connection.pubkey,
-                                                       block_number=data[5])
+                dividend = self.dividends_repo.get_one(
+                    currency=self.app.currency,
+                    pubkey=self.connection.pubkey,
+                    block_number=data[5],
+                )
                 self.transfers_data.append(self.data_dividend(dividend))
         self.endResetModel()
 
@@ -252,9 +328,9 @@ class HistoryTableModel(QAbstractTableModel):
 
     def headerData(self, section, orientation, role):
         if orientation == Qt.Horizontal and role == Qt.DisplayRole:
-            if HistoryTableModel.columns_types[section] == 'amount':
+            if HistoryTableModel.columns_types[section] == "amount":
                 dividend, base = self.blockchain_processor.last_ud(self.app.currency)
-                header = '{:}'.format(HistoryTableModel.columns_headers[section])
+                header = "{:}".format(HistoryTableModel.columns_headers[section])
                 if self.app.current_ref.base_str(base):
                     header += " ({:})".format(self.app.current_ref.base_str(base))
                 return header
@@ -268,34 +344,49 @@ class HistoryTableModel(QAbstractTableModel):
             return QVariant()
 
         source_data = self.transfers_data[row][col]
-        txhash_data = self.transfers_data[row][HistoryTableModel.columns_types.index('txhash')]
-        state_data = self.transfers_data[row][HistoryTableModel.columns_types.index('state')]
-        block_data = self.transfers_data[row][HistoryTableModel.columns_types.index('block_number')]
+        txhash_data = self.transfers_data[row][
+            HistoryTableModel.columns_types.index("txhash")
+        ]
+        state_data = self.transfers_data[row][
+            HistoryTableModel.columns_types.index("state")
+        ]
+        block_data = self.transfers_data[row][
+            HistoryTableModel.columns_types.index("block_number")
+        ]
 
         if state_data == Transaction.VALIDATED and block_data:
-            current_confirmations = self.blockchain_processor.current_buid(self.app.currency).number - block_data
+            current_confirmations = (
+                self.blockchain_processor.current_buid(self.app.currency).number
+                - block_data
+            )
         else:
             current_confirmations = 0
 
         if role == Qt.DisplayRole:
-            if col == HistoryTableModel.columns_types.index('pubkey'):
-                return "<p>" + source_data.replace('\n', "<br>") + "</p>"
-            if col == HistoryTableModel.columns_types.index('date'):
+            if col == HistoryTableModel.columns_types.index("pubkey"):
+                return "<p>" + source_data.replace("\n", "<br>") + "</p>"
+            if col == HistoryTableModel.columns_types.index("date"):
                 if txhash_data == STOPLINE_HASH:
                     return ""
                 else:
-                    ts = self.blockchain_processor.adjusted_ts(self.connection.currency, source_data)
-                    return QLocale.toString(
-                        QLocale(),
-                        QDateTime.fromTime_t(ts).date(),
-                        QLocale.dateFormat(QLocale(), QLocale.ShortFormat)
-                    ) + " BAT"
-            if col == HistoryTableModel.columns_types.index('amount'):
+                    ts = self.blockchain_processor.adjusted_ts(
+                        self.connection.currency, source_data
+                    )
+                    return (
+                        QLocale.toString(
+                            QLocale(),
+                            QDateTime.fromTime_t(ts).date(),
+                            QLocale.dateFormat(QLocale(), QLocale.ShortFormat),
+                        )
+                        + " BAT"
+                    )
+            if col == HistoryTableModel.columns_types.index("amount"):
                 if txhash_data == STOPLINE_HASH:
                     return ""
                 else:
-                    amount = self.app.current_ref.instance(source_data, self.connection.currency,
-                                                           self.app, block_data).diff_localized(False, False)
+                    amount = self.app.current_ref.instance(
+                        source_data, self.connection.currency, self.app, block_data
+                    ).diff_localized(False, False)
                     return amount
 
             return source_data
@@ -305,8 +396,10 @@ class HistoryTableModel(QAbstractTableModel):
             if txhash_data == STOPLINE_HASH:
                 font.setItalic(True)
             else:
-                if state_data == Transaction.AWAITING or \
-                        (state_data == Transaction.VALIDATED and current_confirmations < MAX_CONFIRMATIONS):
+                if state_data == Transaction.AWAITING or (
+                    state_data == Transaction.VALIDATED
+                    and current_confirmations < MAX_CONFIRMATIONS
+                ):
                     font.setItalic(True)
                 elif state_data == Transaction.REFUSED:
                     font.setItalic(True)
@@ -322,13 +415,14 @@ class HistoryTableModel(QAbstractTableModel):
                 color = QColor(Qt.darkGray)
             elif state_data == Transaction.TO_SEND:
                 color = QColor(Qt.blue)
-            if col == HistoryTableModel.columns_types.index('amount'):
+            if col == HistoryTableModel.columns_types.index("amount"):
                 if source_data < 0:
                     color = QColor(Qt.darkRed)
                 elif state_data == HistoryTableModel.DIVIDEND:
                     color = QColor(Qt.darkBlue)
-            if state_data == Transaction.AWAITING or \
-                    (state_data == Transaction.VALIDATED and current_confirmations == 0):
+            if state_data == Transaction.AWAITING or (
+                state_data == Transaction.VALIDATED and current_confirmations == 0
+            ):
                 color = QColor("#ffb000")
             if color:
                 if self.app.parameters.dark_theme:
@@ -337,26 +431,34 @@ class HistoryTableModel(QAbstractTableModel):
                     return color
 
         if role == Qt.TextAlignmentRole:
-            if HistoryTableModel.columns_types.index('amount'):
+            if HistoryTableModel.columns_types.index("amount"):
                 return Qt.AlignRight | Qt.AlignVCenter
-            if col == HistoryTableModel.columns_types.index('date'):
+            if col == HistoryTableModel.columns_types.index("date"):
                 return Qt.AlignCenter
 
         if role == Qt.ToolTipRole:
-            if col == HistoryTableModel.columns_types.index('date'):
-                ts = self.blockchain_processor.adjusted_ts(self.connection.currency, source_data)
+            if col == HistoryTableModel.columns_types.index("date"):
+                ts = self.blockchain_processor.adjusted_ts(
+                    self.connection.currency, source_data
+                )
                 return QDateTime.fromTime_t(ts).toString(Qt.SystemLocaleLongDate)
 
-            if state_data == Transaction.VALIDATED or state_data == Transaction.AWAITING:
+            if (
+                state_data == Transaction.VALIDATED
+                or state_data == Transaction.AWAITING
+            ):
                 if current_confirmations >= MAX_CONFIRMATIONS:
                     return None
                 elif self.app.parameters.expert_mode:
-                    return self.tr("{0} / {1} confirmations").format(current_confirmations, MAX_CONFIRMATIONS)
+                    return self.tr("{0} / {1} confirmations").format(
+                        current_confirmations, MAX_CONFIRMATIONS
+                    )
                 else:
                     confirmation = current_confirmations / MAX_CONFIRMATIONS * 100
                     confirmation = 100 if confirmation > 100 else confirmation
-                    return self.tr("Confirming... {0} %").format(QLocale().toString(float(confirmation), 'f', 0))
+                    return self.tr("Confirming... {0} %").format(
+                        QLocale().toString(float(confirmation), "f", 0)
+                    )
 
     def flags(self, index):
         return Qt.ItemIsSelectable | Qt.ItemIsEnabled
-
diff --git a/src/sakia/gui/navigation/txhistory/view.py b/src/sakia/gui/navigation/txhistory/view.py
index eae64a5961fbaf0ae04889ebea8567ab20cfe957..81e41df2db3af95859964f690b9b854069a7ea4d 100644
--- a/src/sakia/gui/navigation/txhistory/view.py
+++ b/src/sakia/gui/navigation/txhistory/view.py
@@ -15,7 +15,9 @@ class TxHistoryView(QWidget, Ui_TxHistoryWidget):
         self.transfer_view = transfer_view
         self.setupUi(self)
         self.stacked_widget.insertWidget(1, transfer_view)
-        self.button_send.clicked.connect(lambda c: self.stacked_widget.setCurrentWidget(self.transfer_view))
+        self.button_send.clicked.connect(
+            lambda c: self.stacked_widget.setCurrentWidget(self.transfer_view)
+        )
         self.spin_page.setMinimum(1)
 
     def get_time_frame(self):
@@ -34,10 +36,14 @@ class TxHistoryView(QWidget, Ui_TxHistoryWidget):
         self.table_history.setModel(model)
         self.table_history.setSelectionBehavior(QAbstractItemView.SelectRows)
         self.table_history.setSortingEnabled(True)
-        self.table_history.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
+        self.table_history.horizontalHeader().setSectionResizeMode(
+            QHeaderView.Interactive
+        )
         self.table_history.setItemDelegate(TxHistoryDelegate())
         self.table_history.resizeRowsToContents()
-        self.table_history.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
+        self.table_history.verticalHeader().setSectionResizeMode(
+            QHeaderView.ResizeToContents
+        )
 
     def set_minimum_maximum_datetime(self, minimum, maximum):
         """
@@ -64,9 +70,7 @@ class TxHistoryView(QWidget, Ui_TxHistoryWidget):
         :return:
         """
         # set infos in label
-        self.label_balance.setText(
-            "{:}".format(balance)
-        )
+        self.label_balance.setText("{:}".format(balance))
 
     def clear(self):
         self.stacked_widget.setCurrentWidget(self.page_history)
@@ -79,4 +83,4 @@ class TxHistoryView(QWidget, Ui_TxHistoryWidget):
         """
         if event.type() == QEvent.LanguageChange:
             self.retranslateUi(self)
-        super().changeEvent(event)
\ No newline at end of file
+        super().changeEvent(event)
diff --git a/src/sakia/gui/navigation/view.py b/src/sakia/gui/navigation/view.py
index feff86146fd0991f1c1b5b7be40829e69b30e5f5..54b172fd92be1f6060a43ede19160711c762d887 100644
--- a/src/sakia/gui/navigation/view.py
+++ b/src/sakia/gui/navigation/view.py
@@ -8,6 +8,7 @@ class NavigationView(QFrame, Ui_Navigation):
     """
     The view of navigation panel
     """
+
     current_view_changed = pyqtSignal(dict)
 
     def __init__(self, parent):
@@ -39,9 +40,11 @@ class NavigationView(QFrame, Ui_Navigation):
         :return:
         """
         if index.isValid():
-            raw_data = self.tree_view.model().data(index, GenericTreeModel.ROLE_RAW_DATA)
-            if 'widget' in raw_data:
-                widget = raw_data['widget']
+            raw_data = self.tree_view.model().data(
+                index, GenericTreeModel.ROLE_RAW_DATA
+            )
+            if "widget" in raw_data:
+                widget = raw_data["widget"]
                 if self.stacked_widget.indexOf(widget) != -1:
                     self.stacked_widget.setCurrentWidget(widget)
                     self.current_view_changed.emit(raw_data)
diff --git a/src/sakia/gui/preferences.py b/src/sakia/gui/preferences.py
index dac00f81c116cdaac05fc57af90168e0c558d1df..8f367bd82bf7d257b673eae16ae0ca48a2ac3e39 100644
--- a/src/sakia/gui/preferences.py
+++ b/src/sakia/gui/preferences.py
@@ -23,9 +23,11 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
         self.setupUi(self)
         self.app = app
         for ref in money.Referentials:
-            self.combo_referential.addItem(QCoreApplication.translate('Account', ref.translated_name()))
+            self.combo_referential.addItem(
+                QCoreApplication.translate("Account", ref.translated_name())
+            )
         self.combo_referential.setCurrentIndex(self.app.parameters.referential)
-        for lang in ('en', 'fr', 'de', 'es', 'it', 'pl', 'pt', 'ru'):
+        for lang in ("en", "fr", "de", "es", "it", "pl", "pt", "ru"):
             self.combo_language.addItem(lang)
         self.combo_language.setCurrentText(self.app.parameters.lang)
         self.checkbox_expertmode.setChecked(self.app.parameters.expert_mode)
@@ -35,8 +37,12 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
         self.spinbox_digits_comma.setMaximum(12)
         self.spinbox_digits_comma.setMinimum(1)
         self.button_app.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(0))
-        self.button_display.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(1))
-        self.button_network.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(2))
+        self.button_display.clicked.connect(
+            lambda: self.stackedWidget.setCurrentIndex(1)
+        )
+        self.button_network.clicked.connect(
+            lambda: self.stackedWidget.setCurrentIndex(2)
+        )
 
         self.checkbox_proxy.setChecked(self.app.parameters.enable_proxy)
         self.spinbox_proxy_port.setEnabled(self.checkbox_proxy.isChecked())
@@ -57,21 +63,23 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
         self.edit_proxy_address.setEnabled(self.checkbox_proxy.isChecked())
 
     def accept(self):
-        parameters = UserParameters(profile_name=self.app.parameters.profile_name,
-                                    lang=self.combo_language.currentText(),
-                                    referential=self.combo_referential.currentIndex(),
-                                    expert_mode=self.checkbox_expertmode.isChecked(),
-                                    maximized=self.checkbox_maximize.isChecked(),
-                                    digits_after_comma=self.spinbox_digits_comma.value(),
-                                    notifications=self.checkbox_notifications.isChecked(),
-                                    enable_proxy=self.checkbox_proxy.isChecked(),
-                                    proxy_address=self.edit_proxy_address.text(),
-                                    proxy_port=self.spinbox_proxy_port.value(),
-                                    proxy_user=self.edit_proxy_username.text(),
-                                    proxy_password=self.edit_proxy_password.text(),
-                                    dark_theme=self.checkbox_dark_theme.isChecked())
+        parameters = UserParameters(
+            profile_name=self.app.parameters.profile_name,
+            lang=self.combo_language.currentText(),
+            referential=self.combo_referential.currentIndex(),
+            expert_mode=self.checkbox_expertmode.isChecked(),
+            maximized=self.checkbox_maximize.isChecked(),
+            digits_after_comma=self.spinbox_digits_comma.value(),
+            notifications=self.checkbox_notifications.isChecked(),
+            enable_proxy=self.checkbox_proxy.isChecked(),
+            proxy_address=self.edit_proxy_address.text(),
+            proxy_port=self.spinbox_proxy_port.value(),
+            proxy_user=self.edit_proxy_username.text(),
+            proxy_password=self.edit_proxy_password.text(),
+            dark_theme=self.checkbox_dark_theme.isChecked(),
+        )
         self.app.save_parameters(parameters)
-      # change UI translation
+        # change UI translation
         self.app.switch_language()
         super().accept()
 
@@ -83,4 +91,3 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
         self.finished.connect(lambda r: future.set_result(r))
         self.open()
         return future
-
diff --git a/src/sakia/gui/sub/certification/controller.py b/src/sakia/gui/sub/certification/controller.py
index 4d1600f4f428149b405d04275d368a0a1aea1ae2..c4ad39af47d93e5abaa1e98a7419a0f75db259b5 100644
--- a/src/sakia/gui/sub/certification/controller.py
+++ b/src/sakia/gui/sub/certification/controller.py
@@ -18,6 +18,7 @@ class CertificationController(QObject):
     """
     The Certification view
     """
+
     accepted = pyqtSignal()
     rejected = pyqtSignal()
 
@@ -49,8 +50,12 @@ class CertificationController(QObject):
         user_information = UserInformationController.create(None, app, None)
         password_input = PasswordInputController.create(None, None)
 
-        view = CertificationView(parent.view if parent else None, search_user.view, user_information.view,
-                                 password_input.view)
+        view = CertificationView(
+            parent.view if parent else None,
+            search_user.view,
+            user_information.view,
+            password_input.view,
+        )
         model = CertificationModel(app)
         view.set_label_confirm(app.currency)
         certification = cls(view, model, search_user, user_information, password_input)
@@ -132,8 +137,10 @@ class CertificationController(QObject):
         """
 
         if not self.user_information.model.identity.member:
-            result = await dialogs.QAsyncMessageBox.question(self.view, "Certifying a non-member",
-"""
+            result = await dialogs.QAsyncMessageBox.question(
+                self.view,
+                "Certifying a non-member",
+                """
 Did you ensure that :<br>
 <br/>
 1°) <b>You know the person declaring owning this pubkey
@@ -149,15 +156,19 @@ The 2°) is however preferable to the 3°)... whereas <b>1°) is mandatory in an
 <b>Reminder</b> : Certifying is not only uniquely ensuring  that you met the person, its ensuring the {:} community
 that you know her well enough and that you will know how to find a double account done by a person certified by you
 using cross checking which will help to reveal the problem if needs to be.</br>""".format(
-    ROOT_SERVERS[self.model.app.currency]["display"]))
+                    ROOT_SERVERS[self.model.app.currency]["display"]
+                ),
+            )
             if result == dialogs.QMessageBox.No:
                 return
 
         self.view.button_box.setDisabled(True)
         secret_key, password = self.password_input.get_salt_password()
         QApplication.setOverrideCursor(Qt.WaitCursor)
-        result = await self.model.certify_identity(secret_key, password, self.user_information.model.identity)
-#
+        result = await self.model.certify_identity(
+            secret_key, password, self.user_information.model.identity
+        )
+        #
         if result[0]:
             QApplication.restoreOverrideCursor()
             await self.view.show_success(self.model.notification())
@@ -185,22 +196,32 @@ using cross checking which will help to reveal the problem if needs to be.</br>"
         if self.model.could_certify():
             if written < stock or stock == 0:
                 if not self.user_information.model.identity:
-                    self.view.set_button_process(CertificationView.ButtonsState.SELECT_IDENTITY)
-                elif days+hours+minutes > 0:
+                    self.view.set_button_process(
+                        CertificationView.ButtonsState.SELECT_IDENTITY
+                    )
+                elif days + hours + minutes > 0:
                     if days > 0:
                         remaining_localized = self.tr("{days} days").format(days=days)
                     else:
-                        remaining_localized = self.tr("{hours}h {min}min").format(hours=hours, min=minutes)
-                    self.view.set_button_process(CertificationView.ButtonsState.REMAINING_TIME_BEFORE_VALIDATION,
-                                                 remaining=remaining_localized)
+                        remaining_localized = self.tr("{hours}h {min}min").format(
+                            hours=hours, min=minutes
+                        )
+                    self.view.set_button_process(
+                        CertificationView.ButtonsState.REMAINING_TIME_BEFORE_VALIDATION,
+                        remaining=remaining_localized,
+                    )
                 else:
                     self.view.set_button_process(CertificationView.ButtonsState.OK)
                     if self.password_input.valid():
                         self.view.set_button_box(CertificationView.ButtonsState.OK)
                     else:
-                        self.view.set_button_box(CertificationView.ButtonsState.WRONG_PASSWORD)
+                        self.view.set_button_box(
+                            CertificationView.ButtonsState.WRONG_PASSWORD
+                        )
             else:
-                self.view.set_button_process(CertificationView.ButtonsState.NO_MORE_CERTIFICATION)
+                self.view.set_button_process(
+                    CertificationView.ButtonsState.NO_MORE_CERTIFICATION
+                )
         else:
             self.view.set_button_process(CertificationView.ButtonsState.NOT_A_MEMBER)
 
@@ -209,11 +230,13 @@ using cross checking which will help to reveal the problem if needs to be.</br>"
         Load an identity document
         :param  duniterpy.documents.Identity identity_doc:
         """
-        identity = Identity(currency=identity_doc.currency,
-                            pubkey=identity_doc.pubkey,
-                            uid=identity_doc.uid,
-                            blockstamp=identity_doc.timestamp,
-                            signature=identity_doc.signatures[0])
+        identity = Identity(
+            currency=identity_doc.currency,
+            pubkey=identity_doc.pubkey,
+            uid=identity_doc.uid,
+            blockstamp=identity_doc.timestamp,
+            signature=identity_doc.signatures[0],
+        )
         self.user_information.change_identity(identity)
 
     def refresh_user_information(self):
diff --git a/src/sakia/gui/sub/certification/model.py b/src/sakia/gui/sub/certification/model.py
index 2ac5a59c7e2f4f05516f5ad1910b67000a560c0f..1015a46178eea0a4a86565e98d080c4997651e99 100644
--- a/src/sakia/gui/sub/certification/model.py
+++ b/src/sakia/gui/sub/certification/model.py
@@ -1,6 +1,10 @@
 from PyQt5.QtCore import QObject
-from sakia.data.processors import IdentitiesProcessor, CertificationsProcessor, \
-    BlockchainProcessor, ConnectionsProcessor
+from sakia.data.processors import (
+    IdentitiesProcessor,
+    CertificationsProcessor,
+    BlockchainProcessor,
+    ConnectionsProcessor,
+)
 from sakia.helpers import timestamp_to_dhms
 import attr
 
@@ -48,9 +52,12 @@ class CertificationModel(QObject):
         """
         parameters = self._blockchain_processor.parameters(self.connection.currency)
         blockchain_time = self._blockchain_processor.time(self.connection.currency)
-        remaining_time = self._certifications_processor.cert_issuance_delay(self.connection.currency,
-                                                                            self.connection.pubkey,
-                                                                            parameters, blockchain_time)
+        remaining_time = self._certifications_processor.cert_issuance_delay(
+            self.connection.currency,
+            self.connection.pubkey,
+            parameters,
+            blockchain_time,
+        )
 
         return timestamp_to_dhms(remaining_time)
 
@@ -60,8 +67,9 @@ class CertificationModel(QObject):
         :return: a tuple containing (written valid certifications, pending certifications)
         :rtype: tuple[int]
         """
-        certifications = self._certifications_processor.certifications_sent(self.connection.currency,
-                                                                            self.connection.pubkey)
+        certifications = self._certifications_processor.certifications_sent(
+            self.connection.currency, self.connection.pubkey
+        )
         nb_certifications = len([c for c in certifications if c.written_on >= 0])
         nb_cert_pending = len([c for c in certifications if c.written_on == -1])
         return nb_certifications, nb_cert_pending
@@ -72,17 +80,19 @@ class CertificationModel(QObject):
         :return: true if the user can certifiy
         :rtype: bool
         """
-        identity = self._identities_processor.get_identity(self.connection.currency,
-                                                            self.connection.pubkey,
-                                                            self.connection.uid)
-        current_block = self._blockchain_processor.current_buid(self.connection.currency)
+        identity = self._identities_processor.get_identity(
+            self.connection.currency, self.connection.pubkey, self.connection.uid
+        )
+        current_block = self._blockchain_processor.current_buid(
+            self.connection.currency
+        )
 
         return identity.member or current_block.number == 0
 
     def available_connections(self):
         return self._connections_processor.connections_with_uids()
 
-    def set_connection(self,  index):
+    def set_connection(self, index):
         connections = self._connections_processor.connections_with_uids()
         self.connection = connections[index]
 
@@ -90,11 +100,13 @@ class CertificationModel(QObject):
         return self.app.parameters.notifications
 
     async def certify_identity(self, secret_key, password, identity):
-        result = await self.app.documents_service.certify(self.connection, secret_key, password, identity)
+        result = await self.app.documents_service.certify(
+            self.connection, secret_key, password, identity
+        )
         if result[0]:
-            connection_identity = self._identities_processor.get_identity(self.connection.currency,
-                                                                          self.connection.pubkey,
-                                                                          self.connection.uid)
+            connection_identity = self._identities_processor.get_identity(
+                self.connection.currency, self.connection.pubkey, self.connection.uid
+            )
             self.app.db.commit()
             self.app.identity_changed.emit(connection_identity)
         return result
diff --git a/src/sakia/gui/sub/certification/view.py b/src/sakia/gui/sub/certification/view.py
index b2234edeb94d6cad591f01cb2de755b73c0020a7..36c6ef253e5fdc43609734cdb87cc421e90e1711 100644
--- a/src/sakia/gui/sub/certification/view.py
+++ b/src/sakia/gui/sub/certification/view.py
@@ -22,24 +22,43 @@ class CertificationView(QWidget, Ui_CertificationWidget):
         WRONG_PASSWORD = 5
 
     _button_process_values = {
-        ButtonsState.NO_MORE_CERTIFICATION: (False,
-                                             QT_TRANSLATE_NOOP("CertificationView", "No more certifications")),
-        ButtonsState.NOT_A_MEMBER: (False, QT_TRANSLATE_NOOP("CertificationView", "Not a member")),
-        ButtonsState.SELECT_IDENTITY: (False, QT_TRANSLATE_NOOP("CertificationView", "Please select an identity")),
-        ButtonsState.REMAINING_TIME_BEFORE_VALIDATION: (True,
-                                                        QT_TRANSLATE_NOOP("CertificationView",
-                                                                            "&Ok (Not validated before {remaining})")),
-        ButtonsState.OK: (True, QT_TRANSLATE_NOOP("CertificationView", "&Process Certification")),
+        ButtonsState.NO_MORE_CERTIFICATION: (
+            False,
+            QT_TRANSLATE_NOOP("CertificationView", "No more certifications"),
+        ),
+        ButtonsState.NOT_A_MEMBER: (
+            False,
+            QT_TRANSLATE_NOOP("CertificationView", "Not a member"),
+        ),
+        ButtonsState.SELECT_IDENTITY: (
+            False,
+            QT_TRANSLATE_NOOP("CertificationView", "Please select an identity"),
+        ),
+        ButtonsState.REMAINING_TIME_BEFORE_VALIDATION: (
+            True,
+            QT_TRANSLATE_NOOP(
+                "CertificationView", "&Ok (Not validated before {remaining})"
+            ),
+        ),
+        ButtonsState.OK: (
+            True,
+            QT_TRANSLATE_NOOP("CertificationView", "&Process Certification"),
+        ),
     }
 
     _button_box_values = {
         ButtonsState.OK: (True, QT_TRANSLATE_NOOP("CertificationView", "&Ok")),
-        ButtonsState.WRONG_PASSWORD: (False, QT_TRANSLATE_NOOP("CertificationView", "Please enter correct password"))
+        ButtonsState.WRONG_PASSWORD: (
+            False,
+            QT_TRANSLATE_NOOP("CertificationView", "Please enter correct password"),
+        ),
     }
 
     identity_document_imported = pyqtSignal(Identity)
 
-    def __init__(self, parent, search_user_view, user_information_view, password_input_view):
+    def __init__(
+        self, parent, search_user_view, user_information_view, password_input_view
+    ):
         """
 
         :param parent:
@@ -58,8 +77,12 @@ class CertificationView(QWidget, Ui_CertificationWidget):
         self.layout_password_input.addWidget(password_input_view)
         self.groupbox_certified.layout().addWidget(user_information_view)
         self.button_import_identity.clicked.connect(self.import_identity_document)
-        self.button_process.clicked.connect(lambda c: self.stackedWidget.setCurrentIndex(1))
-        self.button_accept.clicked.connect(lambda c: self.stackedWidget.setCurrentIndex(2))
+        self.button_process.clicked.connect(
+            lambda c: self.stackedWidget.setCurrentIndex(1)
+        )
+        self.button_accept.clicked.connect(
+            lambda c: self.stackedWidget.setCurrentIndex(2)
+        )
 
         licence_text = self.tr(G1_LICENCE)
         self.text_licence.setText(licence_text)
@@ -86,46 +109,68 @@ class CertificationView(QWidget, Ui_CertificationWidget):
         return self.edit_pubkey.text()
 
     def import_identity_document(self):
-        file_name = QFileDialog.getOpenFileName(self,
-                                                self.tr("Open identity document"), "",
-                                                self.tr("Duniter documents (*.txt)"))
+        file_name = QFileDialog.getOpenFileName(
+            self,
+            self.tr("Open identity document"),
+            "",
+            self.tr("Duniter documents (*.txt)"),
+        )
         if file_name and file_name[0]:
-            with open(file_name[0], 'r') as open_file:
+            with open(file_name[0], "r") as open_file:
                 raw_text = open_file.read()
                 try:
                     identity_doc = Identity.from_signed_raw(raw_text)
                     self.identity_document_imported.emit(identity_doc)
                 except MalformedDocumentError as e:
-                    QMessageBox.warning(self, self.tr("Identity document"),
-                                        self.tr("The imported file is not a correct identity document"),
-                                        QMessageBox.Ok)
+                    QMessageBox.warning(
+                        self,
+                        self.tr("Identity document"),
+                        self.tr("The imported file is not a correct identity document"),
+                        QMessageBox.Ok,
+                    )
 
     def set_label_confirm(self, currency):
         self.label_confirm.setTextFormat(Qt.RichText)
-        self.label_confirm.setText("""<b>Vous confirmez engager votre responsabilité envers la communauté Duniter {:}
-    et acceptez de certifier le compte Duniter {:} sélectionné.<br/><br/>""".format(ROOT_SERVERS[currency]["display"],
-                                                                                     ROOT_SERVERS[currency]["display"]))
+        self.label_confirm.setText(
+            """<b>Vous confirmez engager votre responsabilité envers la communauté Duniter {:}
+    et acceptez de certifier le compte Duniter {:} sélectionné.<br/><br/>""".format(
+                ROOT_SERVERS[currency]["display"], ROOT_SERVERS[currency]["display"]
+            )
+        )
 
     async def show_success(self, notification):
         if notification:
-            toast.display(self.tr("Certification"),
-                          self.tr("Success sending certification"))
+            toast.display(
+                self.tr("Certification"), self.tr("Success sending certification")
+            )
         else:
-            await QAsyncMessageBox.information(self, self.tr("Certification"),
-                                         self.tr("Success sending certification"))
+            await QAsyncMessageBox.information(
+                self, self.tr("Certification"), self.tr("Success sending certification")
+            )
 
     async def show_error(self, notification, error_txt):
 
         if notification:
-            toast.display(self.tr("Certification"), self.tr("Could not broadcast certification : {0}"
-                                                            .format(error_txt)))
+            toast.display(
+                self.tr("Certification"),
+                self.tr("Could not broadcast certification : {0}".format(error_txt)),
+            )
         else:
-            await QAsyncMessageBox.critical(self, self.tr("Certification"),
-                                            self.tr("Could not broadcast certification : {0}"
-                                                    .format(error_txt)))
-
-    def display_cert_stock(self, written, pending, stock,
-                           remaining_days, remaining_hours, remaining_minutes):
+            await QAsyncMessageBox.critical(
+                self,
+                self.tr("Certification"),
+                self.tr("Could not broadcast certification : {0}".format(error_txt)),
+            )
+
+    def display_cert_stock(
+        self,
+        written,
+        pending,
+        stock,
+        remaining_days,
+        remaining_hours,
+        remaining_minutes,
+    ):
         """
         Display values in informations label
         :param int written: number of written certifications
@@ -136,18 +181,25 @@ class CertificationView(QWidget, Ui_CertificationWidget):
         :param int remaining_minutes:
         """
         cert_text = self.tr("Certifications sent : {nb_certifications}/{stock}").format(
-            nb_certifications=written,
-            stock=stock)
+            nb_certifications=written, stock=stock
+        )
         if pending > 0:
-            cert_text += " (+{nb_cert_pending} certifications pending)".format(nb_cert_pending=pending)
+            cert_text += " (+{nb_cert_pending} certifications pending)".format(
+                nb_cert_pending=pending
+            )
 
         if remaining_days > 0:
             remaining_localized = self.tr("{days} days").format(days=remaining_days)
         else:
-            remaining_localized = self.tr("{hours} hours and {min} min.").format(hours=remaining_hours,
-                                                                            min=remaining_minutes)
+            remaining_localized = self.tr("{hours} hours and {min} min.").format(
+                hours=remaining_hours, min=remaining_minutes
+            )
         cert_text += "\n"
-        cert_text += self.tr("Remaining time before next certification validation : {0}".format(remaining_localized))
+        cert_text += self.tr(
+            "Remaining time before next certification validation : {0}".format(
+                remaining_localized
+            )
+        )
         self.label_cert_stock.setText(cert_text)
 
     def set_button_box(self, state, **kwargs):
@@ -159,7 +211,9 @@ class CertificationView(QWidget, Ui_CertificationWidget):
         """
         button_box_state = CertificationView._button_box_values[state]
         self.button_box.button(QDialogButtonBox.Ok).setEnabled(button_box_state[0])
-        self.button_box.button(QDialogButtonBox.Ok).setText(button_box_state[1].format(**kwargs))
+        self.button_box.button(QDialogButtonBox.Ok).setText(
+            button_box_state[1].format(**kwargs)
+        )
 
     def set_button_process(self, state, **kwargs):
         """
diff --git a/src/sakia/gui/sub/password_input/__init__.py b/src/sakia/gui/sub/password_input/__init__.py
index d42b6910b749d4dcba401c24843f2e2500c4ff70..c7826e84f91c4560b8a3e55cc39d466ab9e8ea7d 100644
--- a/src/sakia/gui/sub/password_input/__init__.py
+++ b/src/sakia/gui/sub/password_input/__init__.py
@@ -1 +1 @@
-from .controller import PasswordInputController
\ No newline at end of file
+from .controller import PasswordInputController
diff --git a/src/sakia/gui/sub/password_input/controller.py b/src/sakia/gui/sub/password_input/controller.py
index a3c75fc4cb7e3d85906da0da12d8868e280134cf..9a64499f31d3c269faef87a535ec67d27c162eb7 100644
--- a/src/sakia/gui/sub/password_input/controller.py
+++ b/src/sakia/gui/sub/password_input/controller.py
@@ -12,6 +12,7 @@ class PasswordInputController(QObject):
     """
     A dialog to get password.
     """
+
     password_changed = pyqtSignal(bool)
 
     def __init__(self, view, connection):
@@ -36,7 +37,9 @@ class PasswordInputController(QObject):
         view = PasswordInputView(parent.view if parent else None)
         password_input = cls(view, connection)
         view.edit_password.textChanged.connect(password_input.handle_password_change)
-        view.edit_secret_key.textChanged.connect(password_input.handle_secret_key_change)
+        view.edit_secret_key.textChanged.connect(
+            password_input.handle_secret_key_change
+        )
         return password_input
 
     @classmethod
@@ -68,9 +71,13 @@ class PasswordInputController(QObject):
             self.view.error(self.tr("Non printable characters in password"))
             return False
 
-        if SigningKey(secret_key, password,
-                      self.connection.scrypt_params).pubkey != self.connection.pubkey:
-            self.view.error(self.tr("Wrong secret key or password. Cannot open the private key"))
+        if (
+            SigningKey(secret_key, password, self.connection.scrypt_params).pubkey
+            != self.connection.pubkey
+        ):
+            self.view.error(
+                self.tr("Wrong secret key or password. Cannot open the private key")
+            )
             return False
         return True
 
diff --git a/src/sakia/gui/sub/password_input/view.py b/src/sakia/gui/sub/password_input/view.py
index 51a32a20c6a6fc787719860b997b7f662506c394..c235134d143f5a10d8a8d05ab90dc42055b682b6 100644
--- a/src/sakia/gui/sub/password_input/view.py
+++ b/src/sakia/gui/sub/password_input/view.py
@@ -7,13 +7,16 @@ class PasswordInputView(QWidget, Ui_PasswordInputWidget):
     """
     The model of Navigation component
     """
+
     def __init__(self, parent):
         # construct from qtDesigner
         super().__init__(parent)
         self.setupUi(self)
         self.button_box = QDialogButtonBox(self)
         self.button_box.setOrientation(Qt.Horizontal)
-        self.button_box.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok)
+        self.button_box.setStandardButtons(
+            QDialogButtonBox.Cancel | QDialogButtonBox.Ok
+        )
         self.button_box.button(QDialogButtonBox.Ok).setEnabled(False)
         self.layout().addWidget(self.button_box)
         self.button_box.hide()
diff --git a/src/sakia/gui/sub/search_user/controller.py b/src/sakia/gui/sub/search_user/controller.py
index 7973c67607e85ec7fe5a0733b6eed33f7444d103..2314a0053f386ec7ccadee103b15cfa387f0fbee 100644
--- a/src/sakia/gui/sub/search_user/controller.py
+++ b/src/sakia/gui/sub/search_user/controller.py
@@ -9,6 +9,7 @@ class SearchUserController(QObject):
     """
     The navigation panel
     """
+
     search_started = pyqtSignal()
     search_ended = pyqtSignal()
     identity_selected = pyqtSignal(Identity)
@@ -61,4 +62,4 @@ class SearchUserController(QObject):
 
     def clear(self):
         self.model.clear()
-        self.view.clear()
\ No newline at end of file
+        self.view.clear()
diff --git a/src/sakia/gui/sub/search_user/model.py b/src/sakia/gui/sub/search_user/model.py
index 2afcabe9bf9865f7e9439bdf60bebc083fca113e..845071c8dd5d9117ab18de416d2371d5f5bb3242 100644
--- a/src/sakia/gui/sub/search_user/model.py
+++ b/src/sakia/gui/sub/search_user/model.py
@@ -48,7 +48,9 @@ class SearchUserModel(QObject):
         :return:
         """
         try:
-            self._nodes = await self.identities_processor.lookup(self.app.currency, text)
+            self._nodes = await self.identities_processor.lookup(
+                self.app.currency, text
+            )
         except errors.DuniterError as e:
             if e.ucode == errors.NO_MATCHING_IDENTITY:
                 self._nodes = list()
@@ -73,4 +75,4 @@ class SearchUserModel(QObject):
 
     def clear(self):
         self._current_identity = None
-        self._nodes = list()
\ No newline at end of file
+        self._nodes = list()
diff --git a/src/sakia/gui/sub/search_user/view.py b/src/sakia/gui/sub/search_user/view.py
index 58636e22fc725f5b34b6057de4518c682b98a793..8d816ac9a34ebcd677e2c923045923c32545f7f7 100644
--- a/src/sakia/gui/sub/search_user/view.py
+++ b/src/sakia/gui/sub/search_user/view.py
@@ -10,7 +10,10 @@ class SearchUserView(QWidget, Ui_SearchUserWidget):
     """
     The model of Navigation component
     """
-    _search_placeholder = QT_TRANSLATE_NOOP("SearchUserWidget", "Research a pubkey, an uid...")
+
+    _search_placeholder = QT_TRANSLATE_NOOP(
+        "SearchUserWidget", "Research a pubkey, an uid..."
+    )
     search_requested = pyqtSignal(str)
     reset_requested = pyqtSignal()
     node_selected = pyqtSignal(int)
@@ -20,18 +23,22 @@ class SearchUserView(QWidget, Ui_SearchUserWidget):
         super().__init__(parent)
         self.setupUi(self)
         # Default text when combo lineEdit is empty
-        self.combobox_search.lineEdit().setPlaceholderText(self.tr(SearchUserView._search_placeholder))
+        self.combobox_search.lineEdit().setPlaceholderText(
+            self.tr(SearchUserView._search_placeholder)
+        )
         #  add combobox events
         self.combobox_search.lineEdit().returnPressed.connect(self.search)
         self.button_reset.clicked.connect(self.reset_requested)
-        # To fix a recall of the same item with different case,
-        # the edited text is not added in the item list
+        #  To fix a recall of the same item with different case,
+        #  the edited text is not added in the item list
         self.combobox_search.setInsertPolicy(QComboBox.NoInsert)
         self.combobox_search.activated.connect(self.node_selected)
 
     def clear(self):
         self.combobox_search.clear()
-        self.combobox_search.lineEdit().setPlaceholderText(self.tr(SearchUserView._search_placeholder))
+        self.combobox_search.lineEdit().setPlaceholderText(
+            self.tr(SearchUserView._search_placeholder)
+        )
 
     def search(self, text=""):
         """
@@ -44,7 +51,9 @@ class SearchUserView(QWidget, Ui_SearchUserWidget):
         else:
             text = self.combobox_search.lineEdit().text()
         self.combobox_search.lineEdit().clear()
-        self.combobox_search.lineEdit().setPlaceholderText(self.tr("Looking for {0}...".format(text)))
+        self.combobox_search.lineEdit().setPlaceholderText(
+            self.tr("Looking for {0}...".format(text))
+        )
         self.search_requested.emit(text)
 
     def set_search_result(self, text, nodes):
@@ -66,7 +75,9 @@ class SearchUserView(QWidget, Ui_SearchUserWidget):
         """
         Retranslate missing widgets from generated code
         """
-        self.combobox_search.lineEdit().setPlaceholderText(self.tr(SearchUserView._search_placeholder))
+        self.combobox_search.lineEdit().setPlaceholderText(
+            self.tr(SearchUserView._search_placeholder)
+        )
         super().retranslateUi(self)
 
     def set_auto_completion(self, string_list):
diff --git a/src/sakia/gui/sub/transfer/controller.py b/src/sakia/gui/sub/transfer/controller.py
index 06b5fb9335c6bdb39d1670f577632e4357ae9276..461964ee35139a3d7d708cad47cb7ac708ce118a 100644
--- a/src/sakia/gui/sub/transfer/controller.py
+++ b/src/sakia/gui/sub/transfer/controller.py
@@ -44,7 +44,9 @@ class TransferController(QObject):
         self.view.button_box.rejected.connect(self.reject)
         self.view.radio_pubkey.toggled.connect(self.refresh)
         self.view.edit_pubkey.textChanged.connect(self.refresh)
-        self.view.combo_connections.currentIndexChanged.connect(self.change_current_connection)
+        self.view.combo_connections.currentIndexChanged.connect(
+            self.change_current_connection
+        )
         self.view.spinbox_amount.valueChanged.connect(self.handle_amount_change)
         self.view.spinbox_relative.valueChanged.connect(self.handle_relative_change)
 
@@ -61,8 +63,12 @@ class TransferController(QObject):
         user_information = UserInformationController.create(None, app, None)
         password_input = PasswordInputController.create(None, None)
 
-        view = TransferView(parent.view if parent else None,
-                            search_user.view, user_information.view, password_input.view)
+        view = TransferView(
+            parent.view if parent else None,
+            search_user.view,
+            user_information.view,
+            password_input.view,
+        )
         model = TransferModel(app)
         transfer = cls(view, model, search_user, user_information, password_input)
 
@@ -114,7 +120,9 @@ class TransferController(QObject):
         dialog = QDialog(parent)
         dialog.setWindowTitle(dialog.tr("Transfer"))
         dialog.setLayout(QVBoxLayout(dialog))
-        transfer = cls.open_transfer_with_pubkey(parent, app, connection, identity.pubkey)
+        transfer = cls.open_transfer_with_pubkey(
+            parent, app, connection, identity.pubkey
+        )
 
         transfer.view.radio_search.toggle()
         transfer.user_information.change_identity(identity)
@@ -138,7 +146,9 @@ class TransferController(QObject):
         transfer.refresh()
 
         current_base = transfer.model.current_base()
-        current_base_amount = resent_transfer.amount / pow(10, resent_transfer.amount_base - current_base)
+        current_base_amount = resent_transfer.amount / pow(
+            10, resent_transfer.amount_base - current_base
+        )
 
         relative = transfer.model.quant_to_rel(current_base_amount / 100)
         transfer.view.set_spinboxes_parameters(current_base_amount / 100, relative)
@@ -189,7 +199,9 @@ class TransferController(QObject):
                 if crc_pubkey.is_valid():
                     pubkey = crc_pubkey.pubkey
             except AttributeError:
-                result = re.compile("^({0})$".format(pubkey_regex)).match(self.view.pubkey_value())
+                result = re.compile("^({0})$".format(pubkey_regex)).match(
+                    self.view.pubkey_value()
+                )
                 if result:
                     pubkey = self.view.pubkey_value()
         return pubkey
@@ -212,7 +224,9 @@ class TransferController(QObject):
         QApplication.setOverrideCursor(Qt.WaitCursor)
 
         logging.debug("Send money...")
-        result, transactions = await self.model.send_money(recipient, secret_key, password, amount, amount_base, comment)
+        result, transactions = await self.model.send_money(
+            recipient, secret_key, password, amount, amount_base, comment
+        )
         if result[0]:
             await self.view.show_success(self.model.notifications(), recipient)
             logging.debug("Restore cursor...")
@@ -256,7 +270,7 @@ class TransferController(QObject):
         else:
             self.view.set_button_box(TransferView.ButtonBoxState.WRONG_PASSWORD)
 
-        max_relative = self.model.quant_to_rel(current_base_amount/100)
+        max_relative = self.model.quant_to_rel(current_base_amount / 100)
         self.view.spinbox_amount.setSuffix(Quantitative.base_str(current_base))
 
         self.view.set_spinboxes_parameters(current_base_amount / 100, max_relative)
diff --git a/src/sakia/gui/sub/transfer/model.py b/src/sakia/gui/sub/transfer/model.py
index eb1c365b157caadc2da81099cc9720718ab3a351..d7d873068afe0609ad57666f04d2ccc8ec31b654 100644
--- a/src/sakia/gui/sub/transfer/model.py
+++ b/src/sakia/gui/sub/transfer/model.py
@@ -1,6 +1,11 @@
 import attr
 from PyQt5.QtCore import QObject
-from sakia.data.processors import BlockchainProcessor, SourcesProcessor, ConnectionsProcessor, ContactsProcessor
+from sakia.data.processors import (
+    BlockchainProcessor,
+    SourcesProcessor,
+    ConnectionsProcessor,
+    ContactsProcessor,
+)
 
 
 @attr.s()
@@ -53,7 +58,9 @@ class TransferModel(QObject):
         """
         Get the value of the current wallet in the current community
         """
-        return self._sources_processor.amount(self.connection.currency, self.connection.pubkey)
+        return self._sources_processor.amount(
+            self.connection.currency, self.connection.pubkey
+        )
 
     def current_base(self):
         """
@@ -66,7 +73,9 @@ class TransferModel(QObject):
         """
         Get the value of the current referential
         """
-        localized = self.app.current_ref.instance(amount, self.connection.currency, self.app).diff_localized(False, True)
+        localized = self.app.current_ref.instance(
+            amount, self.connection.currency, self.app
+        ).diff_localized(False, True)
         return localized
 
     def cancel_previous(self):
@@ -80,7 +89,9 @@ class TransferModel(QObject):
         connections = self._connections_processor.connections()
         self.connection = connections[index]
 
-    async def send_money(self, recipient, secret_key, password, amount, amount_base, comment):
+    async def send_money(
+        self, recipient, secret_key, password, amount, amount_base, comment
+    ):
         """
         Send money to given recipient using the account
         :param str recipient:
@@ -91,14 +102,27 @@ class TransferModel(QObject):
         :return: the result of the send
         """
 
-        result, transactions = await self.app.documents_service.send_money(self.connection, secret_key, password,
-                                                             recipient, amount, amount_base, comment)
+        result, transactions = await self.app.documents_service.send_money(
+            self.connection,
+            secret_key,
+            password,
+            recipient,
+            amount,
+            amount_base,
+            comment,
+        )
         for transaction in transactions:
-            self.app.sources_service.parse_transaction_outputs(self.connection.pubkey, transaction)
+            self.app.sources_service.parse_transaction_outputs(
+                self.connection.pubkey, transaction
+            )
             for conn in self._connections_processor.connections():
                 if conn.pubkey == recipient:
-                    self.app.sources_service.parse_transaction_inputs(recipient, transaction)
-                    new_tx = self.app.transactions_service.parse_sent_transaction(recipient, transaction)
+                    self.app.sources_service.parse_transaction_inputs(
+                        recipient, transaction
+                    )
+                    new_tx = self.app.transactions_service.parse_sent_transaction(
+                        recipient, transaction
+                    )
                     # Not all connections are concerned by chained tx
                     if new_tx:
                         self.app.new_transfer.emit(conn, new_tx)
diff --git a/src/sakia/gui/sub/transfer/view.py b/src/sakia/gui/sub/transfer/view.py
index be41c3e6556d814f475585d29e39a0f74bb6886a..10a8ae6e0273c91eaa909c761b905ab32703dc73 100644
--- a/src/sakia/gui/sub/transfer/view.py
+++ b/src/sakia/gui/sub/transfer/view.py
@@ -26,16 +26,30 @@ class TransferView(QWidget, Ui_TransferMoneyWidget):
         CONTACT = 4
 
     _button_box_values = {
-        ButtonBoxState.NO_AMOUNT: (False,
-                                   QT_TRANSLATE_NOOP("TransferView", "No amount. Please give the transfer amount")),
+        ButtonBoxState.NO_AMOUNT: (
+            False,
+            QT_TRANSLATE_NOOP(
+                "TransferView", "No amount. Please give the transfer amount"
+            ),
+        ),
         ButtonBoxState.OK: (True, QT_TRANSLATE_NOOP("CertificationView", "&Ok")),
-        ButtonBoxState.WRONG_PASSWORD: (False, QT_TRANSLATE_NOOP("TransferView", "Please enter correct password")),
-        ButtonBoxState.NO_RECEIVER: (False, QT_TRANSLATE_NOOP("TransferView", "Please enter a receiver")),
-        ButtonBoxState.WRONG_RECIPIENT: (False, QT_TRANSLATE_NOOP("TransferView", "Incorrect receiver address or pubkey"))
-
+        ButtonBoxState.WRONG_PASSWORD: (
+            False,
+            QT_TRANSLATE_NOOP("TransferView", "Please enter correct password"),
+        ),
+        ButtonBoxState.NO_RECEIVER: (
+            False,
+            QT_TRANSLATE_NOOP("TransferView", "Please enter a receiver"),
+        ),
+        ButtonBoxState.WRONG_RECIPIENT: (
+            False,
+            QT_TRANSLATE_NOOP("TransferView", "Incorrect receiver address or pubkey"),
+        ),
     }
 
-    def __init__(self, parent, search_user_view, user_information_view, password_input_view):
+    def __init__(
+        self, parent, search_user_view, user_information_view, password_input_view
+    ):
         """
 
         :param parent:
@@ -46,7 +60,7 @@ class TransferView(QWidget, Ui_TransferMoneyWidget):
         super().__init__(parent)
         self.setupUi(self)
 
-        regexp = QRegExp('^([ a-zA-Z0-9-_:/;*?\[\]\(\)\\\?!^+=@&~#{}|<>%.]{0,255})$')
+        regexp = QRegExp("^([ a-zA-Z0-9-_:/;*?\[\]\(\)\\\?!^+=@&~#{}|<>%.]{0,255})$")
         validator = QRegExpValidator(regexp)
         self.edit_message.setValidator(validator)
 
@@ -65,12 +79,15 @@ class TransferView(QWidget, Ui_TransferMoneyWidget):
             self.radio_search: TransferView.RecipientMode.SEARCH,
             self.radio_local_key: TransferView.RecipientMode.LOCAL_KEY,
             self.radio_contacts: TransferView.RecipientMode.CONTACT,
-            self.radio_pubkey: TransferView.RecipientMode.PUBKEY
+            self.radio_pubkey: TransferView.RecipientMode.PUBKEY,
         }
 
         for radio_widget in self.radio_to_mode:
-            radio_widget.toggled.connect(lambda c,
-                                                radio=self.radio_to_mode[radio_widget]: self.recipient_mode_changed(radio))
+            radio_widget.toggled.connect(
+                lambda c, radio=self.radio_to_mode[
+                    radio_widget
+                ]: self.recipient_mode_changed(radio)
+            )
 
     def clear(self):
         self._amount_base = 0
@@ -171,15 +188,22 @@ class TransferView(QWidget, Ui_TransferMoneyWidget):
         """
         button_box_state = TransferView._button_box_values[state]
         self.button_box.button(QDialogButtonBox.Ok).setEnabled(button_box_state[0])
-        self.button_box.button(QDialogButtonBox.Ok).setText(button_box_state[1].format(**kwargs))
+        self.button_box.button(QDialogButtonBox.Ok).setText(
+            button_box_state[1].format(**kwargs)
+        )
 
     async def show_success(self, notification, recipient):
         if notification:
-            toast.display(self.tr("Transfer"),
-                      self.tr("Success sending money to {0}").format(recipient))
+            toast.display(
+                self.tr("Transfer"),
+                self.tr("Success sending money to {0}").format(recipient),
+            )
         else:
-            await QAsyncMessageBox.information(self, self.tr("Transfer"),
-                      self.tr("Success sending money to {0}").format(recipient))
+            await QAsyncMessageBox.information(
+                self,
+                self.tr("Transfer"),
+                self.tr("Success sending money to {0}").format(recipient),
+            )
 
     async def show_error(self, notification, error_txt):
         if notification:
@@ -188,4 +212,4 @@ class TransferView(QWidget, Ui_TransferMoneyWidget):
             await QAsyncMessageBox.critical(self, self.tr("Transfer"), error_txt)
 
     def pubkey_value(self):
-        return self.edit_pubkey.text()
\ No newline at end of file
+        return self.edit_pubkey.text()
diff --git a/src/sakia/gui/sub/user_information/controller.py b/src/sakia/gui/sub/user_information/controller.py
index 4207ba7361517224563eb1405650bf70943ad5d3..14e4a9467f2128bfaac829dd7280b8be6a51dd98 100644
--- a/src/sakia/gui/sub/user_information/controller.py
+++ b/src/sakia/gui/sub/user_information/controller.py
@@ -12,6 +12,7 @@ class UserInformationController(QObject):
     """
     The homescreen view
     """
+
     identity_loaded = pyqtSignal(Identity)
 
     def __init__(self, parent, view, model):
@@ -24,7 +25,7 @@ class UserInformationController(QObject):
         super().__init__(parent)
         self.view = view
         self.model = model
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
 
     @classmethod
     def create(cls, parent, app, identity):
@@ -68,10 +69,16 @@ class UserInformationController(QObject):
             if self.model.identity:
                 self.view.show_busy()
                 await self.model.load_identity(self.model.identity)
-                self.view.display_uid(self.model.identity.uid, self.model.identity.member)
-                self.view.display_identity_timestamps(self.model.identity.pubkey, self.model.identity.timestamp,
-                                                      self.model.identity.membership_timestamp,
-                                                      self.model.mstime_remaining(), await self.model.nb_certs())
+                self.view.display_uid(
+                    self.model.identity.uid, self.model.identity.member
+                )
+                self.view.display_identity_timestamps(
+                    self.model.identity.pubkey,
+                    self.model.identity.timestamp,
+                    self.model.identity.membership_timestamp,
+                    self.model.mstime_remaining(),
+                    await self.model.nb_certs(),
+                )
                 self.view.hide_busy()
                 self.identity_loaded.emit(self.model.identity)
         except RuntimeError as e:
diff --git a/src/sakia/gui/sub/user_information/view.py b/src/sakia/gui/sub/user_information/view.py
index e9ff2a22d7747ebe0c3608df34d1999ea5dedbed..eb16a3af626076c398a841ab2da0ba8ff37829a6 100644
--- a/src/sakia/gui/sub/user_information/view.py
+++ b/src/sakia/gui/sub/user_information/view.py
@@ -18,8 +18,9 @@ class UserInformationView(QWidget, Ui_UserInformationWidget):
         self.busy = Busy(self)
         self.busy.hide()
 
-    def display_identity_timestamps(self, pubkey, publish_time, join_date,
-                                    mstime_remaining, nb_certs):
+    def display_identity_timestamps(
+        self, pubkey, publish_time, join_date, mstime_remaining, nb_certs
+    ):
         """
         Display identity timestamps in localized format
         :param str pubkey:
@@ -31,7 +32,7 @@ class UserInformationView(QWidget, Ui_UserInformationWidget):
             localized_join_date = QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(join_date),
-                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
             )
         else:
             localized_join_date = "###"
@@ -40,7 +41,7 @@ class UserInformationView(QWidget, Ui_UserInformationWidget):
             localized_publish_date = QLocale.toString(
                 QLocale(),
                 QDateTime.fromTime_t(publish_time),
-                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat)
+                QLocale.dateTimeFormat(QLocale(), QLocale.ShortFormat),
             )
         else:
             localized_publish_date = "###"
@@ -52,30 +53,32 @@ class UserInformationView(QWidget, Ui_UserInformationWidget):
             if days > 0:
                 localized_mstime_remaining = "{days} days".format(days=days)
             else:
-                localized_mstime_remaining = "{hours} hours and {min} min.".format(hours=hours,
-                                                                               min=minutes)
+                localized_mstime_remaining = "{hours} hours and {min} min.".format(
+                    hours=hours, min=minutes
+                )
         else:
             localized_mstime_remaining = "###"
 
-
-        text = self.tr("""
+        text = self.tr(
+            """
             <table cellpadding="5">
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:} BAT</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:} BAT</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
             <tr><td align="right"><b>{:}</b></td><td>{:}</td></tr>
-            """).format(
-            self.tr('Public key'),
+            """
+        ).format(
+            self.tr("Public key"),
             pubkey,
-            self.tr('UID Published on'),
+            self.tr("UID Published on"),
             localized_publish_date,
-            self.tr('Join date'),
+            self.tr("Join date"),
             localized_join_date,
             self.tr("Expires in"),
             localized_mstime_remaining,
             self.tr("Certs. received"),
-            nb_certs
+            nb_certs,
         )
 
         # close html text
@@ -90,7 +93,7 @@ class UserInformationView(QWidget, Ui_UserInformationWidget):
         :param str uid:
         """
         status_label = self.tr("Member") if member else self.tr("Non-Member")
-        status_color = '#00AA00' if member else self.tr('#FF0000')
+        status_color = "#00AA00" if member else self.tr("#FF0000")
         text = "<b>{uid}</b> <p style='color: {status_color};'>({status_label})</p>".format(
             uid=uid, status_color=status_color, status_label=status_label
         )
@@ -108,4 +111,4 @@ class UserInformationView(QWidget, Ui_UserInformationWidget):
 
     def resizeEvent(self, event):
         self.busy.resize(event.size())
-        super().resizeEvent(event)
\ No newline at end of file
+        super().resizeEvent(event)
diff --git a/src/sakia/gui/widgets/__init__.py b/src/sakia/gui/widgets/__init__.py
index fbaafe7931df3a52784e976da05ea0f1153b7f59..60b6a4f2c8308fb5924a0b29235c939e216475bb 100644
--- a/src/sakia/gui/widgets/__init__.py
+++ b/src/sakia/gui/widgets/__init__.py
@@ -1,2 +1,2 @@
 from .busy import Busy
-from .dialogs import QAsyncMessageBox
\ No newline at end of file
+from .dialogs import QAsyncMessageBox
diff --git a/src/sakia/gui/widgets/busy.py b/src/sakia/gui/widgets/busy.py
index 5c8246f3dfaa6fd8eacf80d3e7a06a30b1a3e2b2..9697b53c12632399dc8d368340a55396d71165d7 100644
--- a/src/sakia/gui/widgets/busy.py
+++ b/src/sakia/gui/widgets/busy.py
@@ -6,7 +6,7 @@ import math
 
 
 class Busy(QWidget):
-    def __init__(self, parent = None):
+    def __init__(self, parent=None):
         QWidget.__init__(self, parent)
         palette = QPalette(self.palette())
         palette.setColor(palette.Background, Qt.transparent)
@@ -22,13 +22,17 @@ class Busy(QWidget):
 
         for i in range(12):
             if self.counter % 12 == i:
-                painter.setBrush(QBrush(QColor(165, 165, 165, (self.counter % 12)*22)))
+                painter.setBrush(
+                    QBrush(QColor(165, 165, 165, (self.counter % 12) * 22))
+                )
             else:
                 painter.setBrush(QBrush(QColor(165, 165, 165)))
             painter.drawEllipse(
-                self.width()/2 + 50 * math.cos(2 * math.pi * i / 12.0) - 5,
-                self.height()/2 + 50 * math.sin(2 * math.pi * i / 12.0) - 5,
-                12, 12)
+                self.width() / 2 + 50 * math.cos(2 * math.pi * i / 12.0) - 5,
+                self.height() / 2 + 50 * math.sin(2 * math.pi * i / 12.0) - 5,
+                12,
+                12,
+            )
 
         painter.end()
 
diff --git a/src/sakia/gui/widgets/context_menu.py b/src/sakia/gui/widgets/context_menu.py
index 4894e3b6dbaf7ccd249c4ca43b1614db21adf12b..5f63994549cca02eea7493181cac0d2e8c043ca2 100644
--- a/src/sakia/gui/widgets/context_menu.py
+++ b/src/sakia/gui/widgets/context_menu.py
@@ -34,18 +34,26 @@ class ContextMenu(QObject):
         :param ContextMenu menu: the qmenu to add actions to
         :param Identity identity: the identity
         """
-        menu.qmenu.addSeparator().setText(identity.uid if identity.uid else identity.pubkey[:7])
+        menu.qmenu.addSeparator().setText(
+            identity.uid if identity.uid else identity.pubkey[:7]
+        )
 
         informations = QAction(menu.qmenu.tr("Informations"), menu.qmenu.parent())
         informations.triggered.connect(lambda checked, i=identity: menu.informations(i))
         menu.qmenu.addAction(informations)
 
-        if identity.uid and (not menu._connection or menu._connection.pubkey != identity.pubkey):
+        if identity.uid and (
+            not menu._connection or menu._connection.pubkey != identity.pubkey
+        ):
             certify = QAction(menu.tr("Certify identity"), menu.qmenu.parent())
-            certify.triggered.connect(lambda checked, i=identity: menu.certify_identity(i))
+            certify.triggered.connect(
+                lambda checked, i=identity: menu.certify_identity(i)
+            )
             menu.qmenu.addAction(certify)
 
-            view_wot = QAction(menu.qmenu.tr("View in Web of Trust"), menu.qmenu.parent())
+            view_wot = QAction(
+                menu.qmenu.tr("View in Web of Trust"), menu.qmenu.parent()
+            )
             view_wot.triggered.connect(lambda checked, i=identity: menu.view_wot(i))
             menu.qmenu.addAction(view_wot)
 
@@ -53,17 +61,30 @@ class ContextMenu(QObject):
             send_money.triggered.connect(lambda checked, i=identity: menu.send_money(i))
             menu.qmenu.addAction(send_money)
 
-        copy_pubkey = QAction(menu.qmenu.tr("Copy pubkey to clipboard"), menu.qmenu.parent())
-        copy_pubkey.triggered.connect(lambda checked, i=identity: ContextMenu.copy_pubkey_to_clipboard(i))
+        copy_pubkey = QAction(
+            menu.qmenu.tr("Copy pubkey to clipboard"), menu.qmenu.parent()
+        )
+        copy_pubkey.triggered.connect(
+            lambda checked, i=identity: ContextMenu.copy_pubkey_to_clipboard(i)
+        )
         menu.qmenu.addAction(copy_pubkey)
 
-        copy_pubkey = QAction(menu.qmenu.tr("Copy pubkey to clipboard (with CRC)"), menu.qmenu.parent())
-        copy_pubkey.triggered.connect(lambda checked, i=identity: ContextMenu.copy_pubkey_to_clipboard_with_crc(i))
+        copy_pubkey = QAction(
+            menu.qmenu.tr("Copy pubkey to clipboard (with CRC)"), menu.qmenu.parent()
+        )
+        copy_pubkey.triggered.connect(
+            lambda checked, i=identity: ContextMenu.copy_pubkey_to_clipboard_with_crc(i)
+        )
         menu.qmenu.addAction(copy_pubkey)
 
         if identity.uid and menu._app.parameters.expert_mode:
-            copy_selfcert = QAction(menu.qmenu.tr("Copy self-certification document to clipboard"), menu.qmenu.parent())
-            copy_selfcert.triggered.connect(lambda checked, i=identity: menu.copy_selfcert_to_clipboard(i))
+            copy_selfcert = QAction(
+                menu.qmenu.tr("Copy self-certification document to clipboard"),
+                menu.qmenu.parent(),
+            )
+            copy_selfcert.triggered.connect(
+                lambda checked, i=identity: menu.copy_selfcert_to_clipboard(i)
+            )
             menu.qmenu.addAction(copy_selfcert)
 
     @staticmethod
@@ -75,39 +96,66 @@ class ContextMenu(QObject):
         menu.qmenu.addSeparator().setText(menu.qmenu.tr("Transfer"))
         if transfer.state in (Transaction.REFUSED, Transaction.TO_SEND):
             send_back = QAction(menu.qmenu.tr("Send again"), menu.qmenu.parent())
-            send_back.triggered.connect(lambda checked, tr=transfer: menu.send_again(tr))
+            send_back.triggered.connect(
+                lambda checked, tr=transfer: menu.send_again(tr)
+            )
             menu.qmenu.addAction(send_back)
 
             cancel = QAction(menu.qmenu.tr("Cancel"), menu.qmenu.parent())
-            cancel.triggered.connect(lambda checked, tr=transfer: menu.cancel_transfer(tr))
+            cancel.triggered.connect(
+                lambda checked, tr=transfer: menu.cancel_transfer(tr)
+            )
             menu.qmenu.addAction(cancel)
 
         if menu._app.parameters.expert_mode:
-            copy_doc = QAction(menu.qmenu.tr("Copy raw transaction to clipboard"), menu.qmenu.parent())
-            copy_doc.triggered.connect(lambda checked, tx=transfer: menu.copy_transaction_to_clipboard(tx))
+            copy_doc = QAction(
+                menu.qmenu.tr("Copy raw transaction to clipboard"), menu.qmenu.parent()
+            )
+            copy_doc.triggered.connect(
+                lambda checked, tx=transfer: menu.copy_transaction_to_clipboard(tx)
+            )
             menu.qmenu.addAction(copy_doc)
 
             if transfer.blockstamp:
-                copy_doc = QAction(menu.qmenu.tr("Copy transaction block to clipboard"), menu.qmenu.parent())
-                copy_doc.triggered.connect(lambda checked, number=transfer.blockstamp.number:
-                                           menu.copy_block_to_clipboard(transfer.blockstamp.number))
+                copy_doc = QAction(
+                    menu.qmenu.tr("Copy transaction block to clipboard"),
+                    menu.qmenu.parent(),
+                )
+                copy_doc.triggered.connect(
+                    lambda checked, number=transfer.blockstamp.number: menu.copy_block_to_clipboard(
+                        transfer.blockstamp.number
+                    )
+                )
                 menu.qmenu.addAction(copy_doc)
 
     @staticmethod
     def _add_string_actions(menu, str_value):
         if re.match(pubkey_regex, str_value):
             menu.qmenu.addSeparator().setText(str_value[:7])
-            copy_pubkey = QAction(menu.qmenu.tr("Copy pubkey to clipboard"), menu.qmenu.parent())
-            copy_pubkey.triggered.connect(lambda checked, p=str_value: ContextMenu.copy_pubkey_to_clipboard(p))
+            copy_pubkey = QAction(
+                menu.qmenu.tr("Copy pubkey to clipboard"), menu.qmenu.parent()
+            )
+            copy_pubkey.triggered.connect(
+                lambda checked, p=str_value: ContextMenu.copy_pubkey_to_clipboard(p)
+            )
             menu.qmenu.addAction(copy_pubkey)
 
-            copy_pubkey = QAction(menu.qmenu.tr("Copy pubkey to clipboard (with CRC)"), menu.qmenu.parent())
-            copy_pubkey.triggered.connect(lambda checked, p=str_value: ContextMenu.copy_pubkey_to_clipboard_with_crc(p))
+            copy_pubkey = QAction(
+                menu.qmenu.tr("Copy pubkey to clipboard (with CRC)"),
+                menu.qmenu.parent(),
+            )
+            copy_pubkey.triggered.connect(
+                lambda checked, p=str_value: ContextMenu.copy_pubkey_to_clipboard_with_crc(
+                    p
+                )
+            )
             menu.qmenu.addAction(copy_pubkey)
 
             if menu._connection.pubkey != str_value:
                 send_money = QAction(menu.qmenu.tr("Send money"), menu.qmenu.parent())
-                send_money.triggered.connect(lambda checked, p=str_value: menu.send_money(p))
+                send_money.triggered.connect(
+                    lambda checked, p=str_value: menu.send_money(p)
+                )
                 menu.qmenu.addAction(send_money)
 
     @classmethod
@@ -129,7 +177,7 @@ class ContextMenu(QObject):
             Dividend: lambda m, d: None,
             str: ContextMenu._add_string_actions,
             dict: lambda m, d: None,
-            type(None): lambda m, d: None
+            type(None): lambda m, d: None,
         }
         for d in data:
             build_actions[type(d)](menu, d)
@@ -157,33 +205,49 @@ class ContextMenu(QObject):
             UserInformationController.show_identity(self.parent(), self._app, identity)
             self.identity_information_loaded.emit(identity)
         else:
-            UserInformationController.search_and_show_pubkey(self.parent(), self._app,
-                                                             identity.pubkey)
+            UserInformationController.search_and_show_pubkey(
+                self.parent(), self._app, identity.pubkey
+            )
 
     def send_money(self, identity_or_pubkey):
         if isinstance(identity_or_pubkey, Identity):
-            TransferController.send_money_to_identity(None, self._app, self._connection, identity_or_pubkey)
+            TransferController.send_money_to_identity(
+                None, self._app, self._connection, identity_or_pubkey
+            )
         else:
-            TransferController.send_money_to_pubkey(None, self._app, self._connection, identity_or_pubkey)
+            TransferController.send_money_to_pubkey(
+                None, self._app, self._connection, identity_or_pubkey
+            )
 
     def view_wot(self, identity):
         self.view_identity_in_wot.emit(identity)
 
     def certify_identity(self, identity):
-        CertificationController.certify_identity(None, self._app, self._connection, identity)
+        CertificationController.certify_identity(
+            None, self._app, self._connection, identity
+        )
 
     def send_again(self, transfer):
-        TransferController.send_transfer_again(None, self._app, self._connection, transfer)
+        TransferController.send_transfer_again(
+            None, self._app, self._connection, transfer
+        )
 
     def cancel_transfer(self, transfer):
-        reply = QMessageBox.warning(self.qmenu, self.tr("Warning"),
-                             self.tr("""Are you sure ?
-This money transfer will be removed and not sent."""),
-QMessageBox.Ok | QMessageBox.Cancel)
+        reply = QMessageBox.warning(
+            self.qmenu,
+            self.tr("Warning"),
+            self.tr(
+                """Are you sure ?
+This money transfer will be removed and not sent."""
+            ),
+            QMessageBox.Ok | QMessageBox.Cancel,
+        )
         if reply == QMessageBox.Ok:
             transactions_processor = TransactionsProcessor.instanciate(self._app)
             if transactions_processor.cancel(transfer):
-                self._app.sources_service.restore_sources(self._connection.pubkey, transfer)
+                self._app.sources_service.restore_sources(
+                    self._connection.pubkey, transfer
+                )
             self._app.db.commit()
             self._app.transaction_state_changed.emit(transfer)
 
@@ -195,7 +259,9 @@ QMessageBox.Ok | QMessageBox.Cancel)
     async def copy_block_to_clipboard(self, number):
         clipboard = QApplication.clipboard()
         blockchain_processor = BlockchainProcessor.instanciate(self._app)
-        block_doc = await blockchain_processor.get_block(self._connection.currency, number)
+        block_doc = await blockchain_processor.get_block(
+            self._connection.currency, number
+        )
         clipboard.setText(block_doc.signed_raw())
 
     @asyncify
diff --git a/src/sakia/gui/widgets/dialogs.py b/src/sakia/gui/widgets/dialogs.py
index 529f7cc5ba10c69ab7541dd4cf7a538b9165cdbc..9f00583ab93ddbfb118b63c68de87d7a594baa52 100644
--- a/src/sakia/gui/widgets/dialogs.py
+++ b/src/sakia/gui/widgets/dialogs.py
@@ -15,7 +15,7 @@ class QAsyncFileDialog:
     async def get_save_filename(parent, title, url, filtr):
         dialog = QFileDialog(parent, title, url, filtr)
         # Fix linux crash if not native QFileDialog is async...
-        if sys.platform != 'linux':
+        if sys.platform != "linux":
             dialog.setOption(QFileDialog.DontUseNativeDialog, True)
         dialog.setAcceptMode(QFileDialog.AcceptSave)
         result = await dialog_async_exec(dialog)
@@ -42,6 +42,6 @@ class QAsyncMessageBox:
         return dialog_async_exec(dialog)
 
     @staticmethod
-    def question(parent, title, label, buttons=QMessageBox.Yes|QMessageBox.No):
+    def question(parent, title, label, buttons=QMessageBox.Yes | QMessageBox.No):
         dialog = QMessageBox(QMessageBox.Question, title, label, buttons, parent)
         return dialog_async_exec(dialog)
diff --git a/src/sakia/gui/widgets/toast.py b/src/sakia/gui/widgets/toast.py
index 82cb5431ce676211c90c7d3345a9573536ec7f29..b50f35beff1a6fab5d51699fd2144bcb58265702 100644
--- a/src/sakia/gui/widgets/toast.py
+++ b/src/sakia/gui/widgets/toast.py
@@ -10,7 +10,7 @@ from PyQt5.QtWidgets import QMainWindow, QApplication
 from PyQt5.QtGui import QImage, QPixmap
 from .toast_uic import Ui_Toast
 
-window = None   # global
+window = None  # global
 
 
 def display(title, msg):
@@ -18,63 +18,71 @@ def display(title, msg):
     if sys.platform == "linux":
         try:
             import notify2
+
             if not notify2.is_initted():
                 logging.debug("Initialising notify2")
                 notify2.init("sakia")
-            n = notify2.Notification(title,
-                             msg)
+            n = notify2.Notification(title, msg)
             n.show()
         except ImportError:
             _Toast(title, msg)
 
-
-# fixme: https://bugs.python.org/issue11587
-        # # Not working... Empty icon at the moment.
-        # icon = QPixmap(":/icons/sakia_logo/").toImage()
-        # if icon.isNull():
-        #     logging.debug("Error converting logo")
-        # else:
-        #     icon.convertToFormat(QImage.Format_ARGB32)
-        #     icon_bytes = icon.bits().asstring(icon.byteCount())
-        #     icon_struct = (
-        #         icon.width(),
-        #         icon.height(),
-        #         icon.bytesPerLine(),
-        #         icon.hasAlphaChannel(),
-        #         32,
-        #         4,
-        #         dbus.ByteArray(icon_bytes)
-        #         )
-        #     n.set_hint('icon_data', icon_struct)
-        #     n.set_timeout(5000)
+    # fixme: https://bugs.python.org/issue11587
+    # # Not working... Empty icon at the moment.
+    # icon = QPixmap(":/icons/sakia_logo/").toImage()
+    # if icon.isNull():
+    #     logging.debug("Error converting logo")
+    # else:
+    #     icon.convertToFormat(QImage.Format_ARGB32)
+    #     icon_bytes = icon.bits().asstring(icon.byteCount())
+    #     icon_struct = (
+    #         icon.width(),
+    #         icon.height(),
+    #         icon.bytesPerLine(),
+    #         icon.hasAlphaChannel(),
+    #         32,
+    #         4,
+    #         dbus.ByteArray(icon_bytes)
+    #         )
+    #     n.set_hint('icon_data', icon_struct)
+    #     n.set_timeout(5000)
     else:
         _Toast(title, msg)
 
 
 class _Toast(QMainWindow, Ui_Toast):
     def __init__(self, title, msg):
-        global window               # some space outside the local stack
-        window = self               # save pointer till killed to avoid GC
+        global window  # some space outside the local stack
+        window = self  # save pointer till killed to avoid GC
         super().__init__()
         rect = QApplication.desktop().availableGeometry()
         height = rect.height()
         width = rect.width()
-        self.setWindowFlags(Qt.FramelessWindowHint | Qt.NoDropShadowWindowHint | Qt.WindowStaysOnTopHint | Qt.NoFocus)
+        self.setWindowFlags(
+            Qt.FramelessWindowHint
+            | Qt.NoDropShadowWindowHint
+            | Qt.WindowStaysOnTopHint
+            | Qt.NoFocus
+        )
         self.setupUi(self)
         x = width - self.width()
         y = height - self.height()
         self.move(x, y)
-        self.display.setText("""<h1>{0}</h1>
-<p>{1}</p>""".format(title, msg))
+        self.display.setText(
+            """<h1>{0}</h1>
+<p>{1}</p>""".format(
+                title, msg
+            )
+        )
 
-        self.toastThread = _ToastThread()    # start thread to remove display
+        self.toastThread = _ToastThread()  # start thread to remove display
         self.toastThread.finished.connect(self.toastDone)
         self.toastThread.start()
         self.show()
 
     def toastDone(self):
         global window
-        window = None               # kill pointer to window object to close it and GC
+        window = None  # kill pointer to window object to close it and GC
 
 
 class _ToastThread(QThread):
diff --git a/src/sakia/helpers.py b/src/sakia/helpers.py
index ad1c10c65dc94dc91fbffbf7fcbf7e518c62f935..5b1cad33cb755e535ab0999009c7ee438a631439 100644
--- a/src/sakia/helpers.py
+++ b/src/sakia/helpers.py
@@ -12,16 +12,19 @@ def timestamp_to_dhms(ts):
 
 
 def detect_non_printable(data):
-    control_chars = ''.join(map(chr, list(range(0, 32)) + list(range(127, 160))))
-    control_char_re = re.compile('[%s]' % re.escape(control_chars))
+    control_chars = "".join(map(chr, list(range(0, 32)) + list(range(127, 160))))
+    control_char_re = re.compile("[%s]" % re.escape(control_chars))
     if control_char_re.search(data):
         return True
 
 
 def single_instance_lock(currency):
-    key = hashlib.sha256(currency.encode('utf-8')
-                         + "77rWEV37vupNhQs6ktDREthqSciyV77OYrqPBSwV755JFIhl9iOywB7G5DkAKU8Y".encode('utf-8'))\
-        .hexdigest()
+    key = hashlib.sha256(
+        currency.encode("utf-8")
+        + "77rWEV37vupNhQs6ktDREthqSciyV77OYrqPBSwV755JFIhl9iOywB7G5DkAKU8Y".encode(
+            "utf-8"
+        )
+    ).hexdigest()
     sharedMemory = QSharedMemory(key)
     if sharedMemory.attach(QSharedMemory.ReadOnly):
         sharedMemory.detach()
@@ -45,7 +48,7 @@ def attrs_tuple_of_str(ls):
         return tuple([str(a) for a in ls])
     elif isinstance(ls, str):
         if ls:  # if string is not empty
-            return tuple([str(a) for a in ls.split('\n')])
+            return tuple([str(a) for a in ls.split("\n")])
         else:
             return tuple()
 
diff --git a/src/sakia/main.py b/src/sakia/main.py
index c968790f99f6eaef7114abbeaf5938c0bdf59226..a532f9752a5513d538dcad7ca0e94af0c39fee45 100755
--- a/src/sakia/main.py
+++ b/src/sakia/main.py
@@ -19,7 +19,6 @@ from sakia.gui.preferences import PreferencesDialog
 from sakia.gui.widgets import QAsyncMessageBox
 
 
-
 def exit_exception_handler(loop, context):
     """
     An exception handler which prints only on debug (used when exiting)
@@ -27,20 +26,21 @@ def exit_exception_handler(loop, context):
     :param context: the exception context
     """
 
-    logging.debug('Exception handler executing')
-    message = context.get('message')
+    logging.debug("Exception handler executing")
+    message = context.get("message")
     if not message:
-        message = 'Unhandled exception in event loop'
+        message = "Unhandled exception in event loop"
 
     try:
-        exception = context['exception']
+        exception = context["exception"]
     except KeyError:
         exc_info = False
     else:
         exc_info = (type(exception), exception, exception.__traceback__)
 
-    logging.debug("An unhandled exception occured : {0}".format(message),
-                  exc_info=exc_info)
+    logging.debug(
+        "An unhandled exception occured : {0}".format(message), exc_info=exc_info
+    )
 
 
 def async_exception_handler(loop, context):
@@ -50,39 +50,50 @@ def async_exception_handler(loop, context):
     :param loop: the asyncio loop
     :param context: the exception context
     """
-    logging.debug('Exception handler executing')
-    message = context.get('message')
+    logging.debug("Exception handler executing")
+    message = context.get("message")
     if not message:
-        message = 'Unhandled exception in event loop'
+        message = "Unhandled exception in event loop"
 
     try:
-        exception = context['exception']
+        exception = context["exception"]
     except KeyError:
         exc_info = False
     else:
         exc_info = (type(exception), exception, exception.__traceback__)
 
     log_lines = [message]
-    for key in [k for k in sorted(context) if k not in {'message', 'exception'}]:
-        log_lines.append('{}: {!r}'.format(key, context[key]))
+    for key in [k for k in sorted(context) if k not in {"message", "exception"}]:
+        log_lines.append("{}: {!r}".format(key, context[key]))
 
-    logging.error('\n'.join(log_lines), exc_info=exc_info)
+    logging.error("\n".join(log_lines), exc_info=exc_info)
     for line in log_lines:
-        for ignored in ("feed_appdata", "do_handshake", "Unclosed", "socket.gaierror", "[Errno 110]"):
+        for ignored in (
+            "feed_appdata",
+            "do_handshake",
+            "Unclosed",
+            "socket.gaierror",
+            "[Errno 110]",
+        ):
             if ignored in line:
                 return
 
     if exc_info:
         for line in traceback.format_exception(*exc_info):
-            for ignored in ("feed_appdata", "do_handshake", "Unclosed", "socket.gaierror", "[Errno 110]"):
+            for ignored in (
+                "feed_appdata",
+                "do_handshake",
+                "Unclosed",
+                "socket.gaierror",
+                "[Errno 110]",
+            ):
                 if ignored in line:
                     return
     exception_message(log_lines, exc_info)
 
 
 def exception_handler(*exc_info):
-    logging.error("An unhandled exception occured",
-                  exc_info=exc_info)
+    logging.error("An unhandled exception occured", exc_info=exc_info)
     exception_message(["An unhandled exception occured"], exc_info)
 
 
@@ -93,10 +104,17 @@ def exception_message(log_lines, exc_info):
 
     ----
     {stacktrace}
-    """.format(log_lines='\n'.join(log_lines), stacktrace='\n'.join(stacktrace))
-    mb = QMessageBox(QMessageBox.Critical, "Critical error", """A critical error occured. Select the details to display it.
+    """.format(
+        log_lines="\n".join(log_lines), stacktrace="\n".join(stacktrace)
+    )
+    mb = QMessageBox(
+        QMessageBox.Critical,
+        "Critical error",
+        """A critical error occured. Select the details to display it.
                   Please report it to <a href='https://github.com/duniter/sakia/issues/new/'>the developers github</a>""",
-                     QMessageBox.Ok, QApplication.activeWindow())
+        QMessageBox.Ok,
+        QApplication.activeWindow(),
+    )
     mb.setDetailedText(message)
     mb.setTextFormat(Qt.RichText)
 
@@ -104,16 +122,16 @@ def exception_message(log_lines, exc_info):
 
 
 def main():
-    # activate ctrl-c interrupt
+    #  activate ctrl-c interrupt
     signal.signal(signal.SIGINT, signal.SIG_DFL)
     sakia = QApplication(sys.argv)
 
     sys.excepthook = exception_handler
 
-    #sakia.setStyle('Fusion')
+    # sakia.setStyle('Fusion')
     loop = QSelectorEventLoop(sakia)
     loop.set_exception_handler(async_exception_handler)
-    #loop.set_debug(True)
+    # loop.set_debug(True)
     asyncio.set_event_loop(loop)
 
     with loop:
@@ -123,8 +141,7 @@ def main():
         if not lock:
             lock = single_instance_lock(app.currency)
             if not lock:
-                QMessageBox.critical(None, "Sakia",
-                                 "Sakia is already running.")
+                QMessageBox.critical(None, "Sakia", "Sakia is already running.")
 
                 sys.exit(1)
         app.start_coroutines()
@@ -143,15 +160,23 @@ def main():
                 loop.run_until_complete(app.initialize_blockchain())
                 box.hide()
             except (DuniterError, NoPeerAvailable) as e:
-                reply = QMessageBox.critical(None, "Error", "Error connecting to the network : {:}. Keep Trying ?".format(str(e)),
-                                             QMessageBox.Ok | QMessageBox.Abort)
+                reply = QMessageBox.critical(
+                    None,
+                    "Error",
+                    "Error connecting to the network : {:}. Keep Trying ?".format(
+                        str(e)
+                    ),
+                    QMessageBox.Ok | QMessageBox.Abort,
+                )
                 if reply == QMessageBox.Ok:
                     loop.run_until_complete(PreferencesDialog(app).async_exec())
                 else:
                     break
         else:
             if not app.connection_exists():
-                conn_controller = ConnectionConfigController.create_connection(None, app)
+                conn_controller = ConnectionConfigController.create_connection(
+                    None, app
+                )
                 loop.run_until_complete(conn_controller.async_exec())
             window = MainWindowController.startup(app)
             loop.run_forever()
@@ -160,11 +185,11 @@ def main():
             loop.run_until_complete(app.stop_current_profile())
             logging.debug("Application stopped")
         except asyncio.CancelledError:
-            logging.info('CancelledError')
+            logging.info("CancelledError")
     logging.debug("Exiting")
     cleanup_lock(lock)
     sys.exit()
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     main()
diff --git a/src/sakia/models/generic_tree.py b/src/sakia/models/generic_tree.py
index 65dd15c7c63397c54f7851eea90dc37a58ca7fca..fda3f2708e7ad630bddbb6fef89eb01c85d8f06e 100644
--- a/src/sakia/models/generic_tree.py
+++ b/src/sakia/models/generic_tree.py
@@ -7,8 +7,8 @@ def parse_node(node_data, parent_item):
     node = NodeItem(node_data, parent_item)
     if parent_item:
         parent_item.appendChild(node)
-    if 'children' in node_data:
-        for child in node_data['children']:
+    if "children" in node_data:
+        for child in node_data["children"]:
             parse_node(child, node)
     return node
 
@@ -33,14 +33,14 @@ class NodeItem(QAbstractItemModel):
         return 1
 
     def data(self, index, role):
-        if role == Qt.DisplayRole and 'title' in self.node:
-            return self.node['title']
+        if role == Qt.DisplayRole and "title" in self.node:
+            return self.node["title"]
 
-        if role == Qt.ToolTipRole and 'tooltip' in self.node:
-            return self.node['tooltip']
+        if role == Qt.ToolTipRole and "tooltip" in self.node:
+            return self.node["tooltip"]
 
-        if role == Qt.DecorationRole and 'icon' in self.node:
-            return QIcon(self.node['icon'])
+        if role == Qt.DecorationRole and "icon" in self.node:
+            return QIcon(self.node["icon"])
 
         if role == Qt.SizeHintRole:
             return QSize(1, 22)
@@ -99,12 +99,17 @@ class GenericTreeModel(QAbstractItemModel):
 
         item = index.internalPointer()
 
-        if role in (Qt.DisplayRole,
-                    Qt.DecorationRole,
-                    Qt.ToolTipRole,
-                    Qt.SizeHintRole,
-                    GenericTreeModel.ROLE_RAW_DATA) \
-            and index.column() == 0:
+        if (
+            role
+            in (
+                Qt.DisplayRole,
+                Qt.DecorationRole,
+                Qt.ToolTipRole,
+                Qt.SizeHintRole,
+                GenericTreeModel.ROLE_RAW_DATA,
+            )
+            and index.column() == 0
+        ):
             return item.data(0, role)
 
         return None
@@ -117,8 +122,7 @@ class GenericTreeModel(QAbstractItemModel):
             return Qt.ItemIsEnabled | Qt.ItemIsSelectable
 
     def headerData(self, section, orientation, role):
-        if orientation == Qt.Horizontal \
-        and role == Qt.DisplayRole and section == 0:
+        if orientation == Qt.Horizontal and role == Qt.DisplayRole and section == 0:
             return self.title
         return None
 
diff --git a/src/sakia/money/base_referential.py b/src/sakia/money/base_referential.py
index 3dabb7cc66c2ab304399a0cf0f57791172d02ad8..e990857429a2251cc84ed02413bdb9cf54a5412b 100644
--- a/src/sakia/money/base_referential.py
+++ b/src/sakia/money/base_referential.py
@@ -1,9 +1,8 @@
-
-
 class BaseReferential:
     """
     Interface to all referentials
     """
+
     def __init__(self, amount, currency, app, block_number=None):
         """
 
diff --git a/src/sakia/money/currency.py b/src/sakia/money/currency.py
index 8d1e335666583941cfb26539ed4bfd982f1cc599..6256205a10c0042530159a21a2973be55d153962 100644
--- a/src/sakia/money/currency.py
+++ b/src/sakia/money/currency.py
@@ -7,13 +7,13 @@ def shortened(currency):
 
     :return: The currency name in a shot format.
     """
-    words = re.split('[_\W]+', currency)
+    words = re.split("[_\W]+", currency)
     if len(words) > 1:
-        short = ''.join([w[0] for w in words])
+        short = "".join([w[0] for w in words])
     else:
-        vowels = ('a', 'e', 'i', 'o', 'u', 'y')
+        vowels = ("a", "e", "i", "o", "u", "y")
         short = currency
-        short = ''.join([c for c in short if c not in vowels])
+        short = "".join([c for c in short if c not in vowels])
     return short.upper()
 
 
@@ -24,5 +24,5 @@ def symbol(currency):
     :return: The currency name as a utf-8 circled symbol.
     """
     letter = currency[0]
-    u = ord('\u24B6') + ord(letter) - ord('A')
-    return chr(u)
\ No newline at end of file
+    u = ord("\u24B6") + ord(letter) - ord("A")
+    return chr(u)
diff --git a/src/sakia/money/quant_zerosum.py b/src/sakia/money/quant_zerosum.py
index 3f4cb1703dfe05911772525910e7d90fec9d056e..a6025f4ab5c77fead96feafed593b6780498bd3d 100644
--- a/src/sakia/money/quant_zerosum.py
+++ b/src/sakia/money/quant_zerosum.py
@@ -6,11 +6,12 @@ from ..data.processors import BlockchainProcessor
 
 
 class QuantitativeZSum(BaseReferential):
-    _NAME_STR_ = QT_TRANSLATE_NOOP('QuantitativeZSum', 'Quant Z-sum')
-    _REF_STR_ = QT_TRANSLATE_NOOP('QuantitativeZSum', "{0}{1}{2}")
-    _UNITS_STR_ = QT_TRANSLATE_NOOP('QuantitativeZSum', "Q0 {0}")
-    _FORMULA_STR_ = QT_TRANSLATE_NOOP('QuantitativeZSum',
-                                      """Z0 = Q - ( M(t-1) / N(t) )
+    _NAME_STR_ = QT_TRANSLATE_NOOP("QuantitativeZSum", "Quant Z-sum")
+    _REF_STR_ = QT_TRANSLATE_NOOP("QuantitativeZSum", "{0}{1}{2}")
+    _UNITS_STR_ = QT_TRANSLATE_NOOP("QuantitativeZSum", "Q0 {0}")
+    _FORMULA_STR_ = QT_TRANSLATE_NOOP(
+        "QuantitativeZSum",
+        """Z0 = Q - ( M(t-1) / N(t) )
                                         <br >
                                         <table>
                                         <tr><td>Z0</td><td>Quantitative value at zero sum</td></tr>
@@ -19,14 +20,18 @@ class QuantitativeZSum(BaseReferential):
                                         <tr><td>N</td><td>Members count</td></tr>
                                         <tr><td>t</td><td>Last UD time</td></tr>
                                         <tr><td>t-1</td><td>Penultimate UD time</td></tr>
-                                        </table>"""
-                                      )
-    _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP('QuantitativeZSum',
-                                          """Quantitative at zero sum is used to display the difference between
+                                        </table>""",
+    )
+    _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP(
+        "QuantitativeZSum",
+        """Quantitative at zero sum is used to display the difference between
                                             the quantitative value and the average quantitative value.
                                             If it is positive, the value is above the average value, and if it is negative,
                                             the value is under the average value.
-                                           """.replace('\n', '<br >'))
+                                           """.replace(
+            "\n", "<br >"
+        ),
+    )
 
     def __init__(self, amount, currency, app, block_number=None):
         super().__init__(amount, currency, app, block_number)
@@ -34,23 +39,33 @@ class QuantitativeZSum(BaseReferential):
 
     @classmethod
     def translated_name(cls):
-        return QCoreApplication.translate('QuantitativeZSum', QuantitativeZSum._NAME_STR_)
+        return QCoreApplication.translate(
+            "QuantitativeZSum", QuantitativeZSum._NAME_STR_
+        )
 
     @property
     def units(self):
-        return QCoreApplication.translate("QuantitativeZSum", QuantitativeZSum._UNITS_STR_).format("units")
+        return QCoreApplication.translate(
+            "QuantitativeZSum", QuantitativeZSum._UNITS_STR_
+        ).format("units")
 
     @property
     def formula(self):
-        return QCoreApplication.translate('QuantitativeZSum', QuantitativeZSum._FORMULA_STR_)
+        return QCoreApplication.translate(
+            "QuantitativeZSum", QuantitativeZSum._FORMULA_STR_
+        )
 
     @property
     def description(self):
-        return QCoreApplication.translate("QuantitativeZSum", QuantitativeZSum._DESCRIPTION_STR_)
+        return QCoreApplication.translate(
+            "QuantitativeZSum", QuantitativeZSum._DESCRIPTION_STR_
+        )
 
     @property
     def diff_units(self):
-        return QCoreApplication.translate("Quantitative", Quantitative._UNITS_STR_).format("units")
+        return QCoreApplication.translate(
+            "Quantitative", Quantitative._UNITS_STR_
+        ).format("units")
 
     def value(self):
         """
@@ -69,13 +84,15 @@ class QuantitativeZSum(BaseReferential):
         :param sakia.core.community.Community community: Community instance
         :return: int
         """
-        last_members_count = self._blockchain_processor.last_members_count(self.currency)
+        last_members_count = self._blockchain_processor.last_members_count(
+            self.currency
+        )
         monetary_mass = self._blockchain_processor.current_mass(self.currency)
         if last_members_count != 0:
             average = int(monetary_mass / last_members_count)
         else:
             average = 0
-        return (self.amount - average)/100
+        return (self.amount - average) / 100
 
     @staticmethod
     def base_str(base):
@@ -97,16 +114,17 @@ class QuantitativeZSum(BaseReferential):
             localized_value = QuantitativeZSum.to_si(value, base)
             prefix = QuantitativeZSum.base_str(base)
         else:
-            localized_value = QLocale().toString(float(value), 'f', 2)
+            localized_value = QLocale().toString(float(value), "f", 2)
 
         if units or show_base:
-            return QCoreApplication.translate("QuantitativeZSum",
-                                              QuantitativeZSum._REF_STR_) \
-                    .format(localized_value, "",
-                            (" " + self.units if units else ""))
+            return QCoreApplication.translate(
+                "QuantitativeZSum", QuantitativeZSum._REF_STR_
+            ).format(localized_value, "", (" " + self.units if units else ""))
         else:
             return localized_value
 
     def diff_localized(self, units=False, show_base=False):
-        localized = Quantitative(self.amount, self.currency, self.app).localized(units, show_base)
+        localized = Quantitative(self.amount, self.currency, self.app).localized(
+            units, show_base
+        )
         return localized
diff --git a/src/sakia/money/quantitative.py b/src/sakia/money/quantitative.py
index 3c69c7fd8e8a01332162cda55864c18c9588a43a..a8cc046b4892f4d3e751d0e247248dbc58bdf620 100644
--- a/src/sakia/money/quantitative.py
+++ b/src/sakia/money/quantitative.py
@@ -5,18 +5,21 @@ from ..data.processors import BlockchainProcessor
 
 
 class Quantitative(BaseReferential):
-    _NAME_STR_ = QT_TRANSLATE_NOOP('Quantitative', 'Units')
-    _REF_STR_ = QT_TRANSLATE_NOOP('Quantitative', "{0} {1}{2}")
-    _UNITS_STR_ = QT_TRANSLATE_NOOP('Quantitative', "{0}")
-    _FORMULA_STR_ = QT_TRANSLATE_NOOP('Quantitative',
-                                      """Q = Q
+    _NAME_STR_ = QT_TRANSLATE_NOOP("Quantitative", "Units")
+    _REF_STR_ = QT_TRANSLATE_NOOP("Quantitative", "{0} {1}{2}")
+    _UNITS_STR_ = QT_TRANSLATE_NOOP("Quantitative", "{0}")
+    _FORMULA_STR_ = QT_TRANSLATE_NOOP(
+        "Quantitative",
+        """Q = Q
                                         <br >
                                         <table>
                                         <tr><td>Q</td><td>Quantitative value</td></tr>
                                         </table>
-                                      """
-                                      )
-    _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP('Quantitative', "Base referential of the money. Units values are used here.")
+                                      """,
+    )
+    _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP(
+        "Quantitative", "Base referential of the money. Units values are used here."
+    )
 
     def __init__(self, amount, currency, app, block_number=None):
         super().__init__(amount, currency, app, block_number)
@@ -24,19 +27,23 @@ class Quantitative(BaseReferential):
 
     @classmethod
     def translated_name(cls):
-        return QCoreApplication.translate('Quantitative', Quantitative._NAME_STR_)
+        return QCoreApplication.translate("Quantitative", Quantitative._NAME_STR_)
 
     @property
     def units(self):
-        return QCoreApplication.translate("Quantitative", Quantitative._UNITS_STR_).format("units")
+        return QCoreApplication.translate(
+            "Quantitative", Quantitative._UNITS_STR_
+        ).format("units")
 
     @property
     def formula(self):
-        return QCoreApplication.translate('Quantitative', Quantitative._FORMULA_STR_)
+        return QCoreApplication.translate("Quantitative", Quantitative._FORMULA_STR_)
 
     @property
     def description(self):
-        return QCoreApplication.translate("Quantitative", Quantitative._DESCRIPTION_STR_)
+        return QCoreApplication.translate(
+            "Quantitative", Quantitative._DESCRIPTION_STR_
+        )
 
     @property
     def diff_units(self):
@@ -58,13 +65,13 @@ class Quantitative(BaseReferential):
     @staticmethod
     def base_str(base):
         unicodes = {
-            '0': ord('\u2070'),
-            '1': ord('\u00B9'),
-            '2': ord('\u00B2'),
-            '3': ord('\u00B3'),
+            "0": ord("\u2070"),
+            "1": ord("\u00B9"),
+            "2": ord("\u00B2"),
+            "3": ord("\u00B3"),
         }
         for n in range(4, 10):
-            unicodes[str(n)] = ord('\u2070') + n
+            unicodes[str(n)] = ord("\u2070") + n
 
         if base > 0:
             return ".10" + "".join([chr(unicodes[e]) for e in str(base)])
@@ -80,12 +87,14 @@ class Quantitative(BaseReferential):
             multiplier = 1
 
         scientific_value = value
-        scientific_value /= 10**base
+        scientific_value /= 10 ** base
 
         if base > 0:
-            localized_value = QLocale().toString(float(scientific_value * multiplier), 'f', 2)
+            localized_value = QLocale().toString(
+                float(scientific_value * multiplier), "f", 2
+            )
         else:
-            localized_value = QLocale().toString(float(value * multiplier), 'f', 2)
+            localized_value = QLocale().toString(float(value * multiplier), "f", 2)
 
         return localized_value
 
@@ -96,11 +105,13 @@ class Quantitative(BaseReferential):
         prefix = Quantitative.base_str(base)
 
         if units or show_base:
-            return QCoreApplication.translate("Quantitative",
-                                              Quantitative._REF_STR_) \
-                .format(localized_value,
-                        prefix,
-                        (" " if prefix and units else "") + (self.units if units else ""))
+            return QCoreApplication.translate(
+                "Quantitative", Quantitative._REF_STR_
+            ).format(
+                localized_value,
+                prefix,
+                (" " if prefix and units else "") + (self.units if units else ""),
+            )
         else:
             return localized_value
 
@@ -111,10 +122,12 @@ class Quantitative(BaseReferential):
         prefix = Quantitative.base_str(base)
 
         if units or show_base:
-            return QCoreApplication.translate("Quantitative",
-                                              Quantitative._REF_STR_) \
-                .format(localized_value,
-                        prefix,
-                        (" " if prefix and units else "") + (self.diff_units if units else ""))
+            return QCoreApplication.translate(
+                "Quantitative", Quantitative._REF_STR_
+            ).format(
+                localized_value,
+                prefix,
+                (" " if prefix and units else "") + (self.diff_units if units else ""),
+            )
         else:
             return localized_value
diff --git a/src/sakia/money/relative.py b/src/sakia/money/relative.py
index 21776aa5806ee1a7b83ad5045978303fb5f3a841..794957944c065750f2f3f956ff7b51b6db520b8c 100644
--- a/src/sakia/money/relative.py
+++ b/src/sakia/money/relative.py
@@ -6,27 +6,32 @@ from PyQt5.QtCore import QCoreApplication, QT_TRANSLATE_NOOP, QLocale
 
 
 class Relative(BaseReferential):
-    _NAME_STR_ = QT_TRANSLATE_NOOP('Relative', 'UD')
-    _REF_STR_ = QT_TRANSLATE_NOOP('Relative', "{0} {1}{2}")
-    _UNITS_STR_ = QT_TRANSLATE_NOOP('Relative', "UD")
-    _FORMULA_STR_ = QT_TRANSLATE_NOOP('Relative',
-                                      """R = Q / UD(t)
+    _NAME_STR_ = QT_TRANSLATE_NOOP("Relative", "UD")
+    _REF_STR_ = QT_TRANSLATE_NOOP("Relative", "{0} {1}{2}")
+    _UNITS_STR_ = QT_TRANSLATE_NOOP("Relative", "UD")
+    _FORMULA_STR_ = QT_TRANSLATE_NOOP(
+        "Relative",
+        """R = Q / UD(t)
                                         <br >
                                         <table>
                                         <tr><td>R</td><td>Relative value</td></tr>
                                         <tr><td>Q</td><td>Quantitative value</td></tr>
                                         <tr><td>UD</td><td>Universal Dividend</td></tr>
                                         <tr><td>t</td><td>Last UD time</td></tr>
-                                        </table>"""
-                                      )
-    _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP('Relative',
-                                          """Relative referential of the money.
+                                        </table>""",
+    )
+    _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP(
+        "Relative",
+        """Relative referential of the money.
                                           Relative value R is calculated by dividing the quantitative value Q by the last
                                            Universal Dividend UD.
                                           This referential is the most practical one to display prices and accounts.
                                           No money creation or destruction is apparent here and every account tend to
                                            the average.
-                                          """.replace('\n', '<br >'))
+                                          """.replace(
+            "\n", "<br >"
+        ),
+    )
 
     def __init__(self, amount, currency, app, block_number=None):
         super().__init__(amount, currency, app, block_number)
@@ -43,22 +48,22 @@ class Relative(BaseReferential):
         :return:
         """
         return cls(amount, currency, app, block_number)
-        
+
     @classmethod
     def translated_name(cls):
-        return QCoreApplication.translate('Relative', Relative._NAME_STR_)
+        return QCoreApplication.translate("Relative", Relative._NAME_STR_)
 
     @property
     def units(self):
-            return QCoreApplication.translate("Relative", Relative._UNITS_STR_)
+        return QCoreApplication.translate("Relative", Relative._UNITS_STR_)
 
     @property
     def formula(self):
-            return QCoreApplication.translate('Relative', Relative._FORMULA_STR_)
+        return QCoreApplication.translate("Relative", Relative._FORMULA_STR_)
 
     @property
     def description(self):
-            return QCoreApplication.translate("Relative", Relative._DESCRIPTION_STR_)
+        return QCoreApplication.translate("Relative", Relative._DESCRIPTION_STR_)
 
     @property
     def diff_units(self):
@@ -80,7 +85,7 @@ class Relative(BaseReferential):
         """
         dividend, base = self._blockchain_processor.last_ud(self.currency)
         if dividend > 0:
-            return self.amount / (float(dividend * (10**base)))
+            return self.amount / (float(dividend * (10 ** base)))
         else:
             return self.amount
 
@@ -89,22 +94,26 @@ class Relative(BaseReferential):
 
     def localized(self, units=False, show_base=False):
         value = self.value()
-        localized_value = QLocale().toString(float(value), 'f', self.app.parameters.digits_after_comma)
+        localized_value = QLocale().toString(
+            float(value), "f", self.app.parameters.digits_after_comma
+        )
 
         if units:
-            return QCoreApplication.translate("Relative", Relative._REF_STR_) \
-                .format(localized_value, "",
-                        (self.units if units else ""))
+            return QCoreApplication.translate("Relative", Relative._REF_STR_).format(
+                localized_value, "", (self.units if units else "")
+            )
         else:
             return localized_value
 
     def diff_localized(self, units=False, show_base=False):
         value = self.differential()
-        localized_value = QLocale().toString(float(value), 'f', self.app.parameters.digits_after_comma)
+        localized_value = QLocale().toString(
+            float(value), "f", self.app.parameters.digits_after_comma
+        )
 
         if units:
-            return QCoreApplication.translate("Relative", Relative._REF_STR_) \
-                .format(localized_value, "",
-                        (self.diff_units if units else ""))
+            return QCoreApplication.translate("Relative", Relative._REF_STR_).format(
+                localized_value, "", (self.diff_units if units else "")
+            )
         else:
             return localized_value
diff --git a/src/sakia/money/relative_zerosum.py b/src/sakia/money/relative_zerosum.py
index 414acc60b7f69535b699ceea8a6193beb6e77f57..7d20268cf9eadc653fc45c27850e2457505f5077 100644
--- a/src/sakia/money/relative_zerosum.py
+++ b/src/sakia/money/relative_zerosum.py
@@ -6,11 +6,12 @@ from ..data.processors import BlockchainProcessor
 
 
 class RelativeZSum(BaseReferential):
-    _NAME_STR_ = QT_TRANSLATE_NOOP('RelativeZSum', 'Relat Z-sum')
-    _REF_STR_ = QT_TRANSLATE_NOOP('RelativeZSum', "{0} {1}{2}")
-    _UNITS_STR_ = QT_TRANSLATE_NOOP('RelativeZSum', "R0 UD")
-    _FORMULA_STR_ = QT_TRANSLATE_NOOP('RelativeZSum',
-                                      """R0 = (Q / UD(t)) - (( M(t-1) / N(t) ) / UD(t))
+    _NAME_STR_ = QT_TRANSLATE_NOOP("RelativeZSum", "Relat Z-sum")
+    _REF_STR_ = QT_TRANSLATE_NOOP("RelativeZSum", "{0} {1}{2}")
+    _UNITS_STR_ = QT_TRANSLATE_NOOP("RelativeZSum", "R0 UD")
+    _FORMULA_STR_ = QT_TRANSLATE_NOOP(
+        "RelativeZSum",
+        """R0 = (Q / UD(t)) - (( M(t-1) / N(t) ) / UD(t))
                                         <br >
                                         <table>
                                         <tr><td>R0</td><td>Relative value at zero sum</td></tr>
@@ -19,13 +20,18 @@ class RelativeZSum(BaseReferential):
                                         <tr><td>N</td><td>Members count</td></tr>
                                         <tr><td>t</td><td>Last UD time</td></tr>
                                         <tr><td>t-1</td><td>Penultimate UD time</td></tr>
-                                        </table>""")
-    _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP('RelativeZSum',
-                                          """Relative at zero sum is used to display the difference between
+                                        </table>""",
+    )
+    _DESCRIPTION_STR_ = QT_TRANSLATE_NOOP(
+        "RelativeZSum",
+        """Relative at zero sum is used to display the difference between
                                             the relative value and the average relative value.
                                             If it is positive, the value is above the average value, and if it is negative,
                                             the value is under the average value.
-                                           """.replace('\n', '<br >'))
+                                           """.replace(
+            "\n", "<br >"
+        ),
+    )
 
     def __init__(self, amount, currency, app, block_number=None):
         super().__init__(amount, currency, app, block_number)
@@ -33,7 +39,7 @@ class RelativeZSum(BaseReferential):
 
     @classmethod
     def translated_name(cls):
-        return QCoreApplication.translate('RelativeZSum', RelativeZSum._NAME_STR_)
+        return QCoreApplication.translate("RelativeZSum", RelativeZSum._NAME_STR_)
 
     @property
     def units(self):
@@ -41,11 +47,13 @@ class RelativeZSum(BaseReferential):
 
     @property
     def formula(self):
-        return QCoreApplication.translate('RelativeZSum', RelativeZSum._FORMULA_STR_)
+        return QCoreApplication.translate("RelativeZSum", RelativeZSum._FORMULA_STR_)
 
     @property
     def description(self):
-        return QCoreApplication.translate("RelativeZSum", RelativeZSum._DESCRIPTION_STR_)
+        return QCoreApplication.translate(
+            "RelativeZSum", RelativeZSum._DESCRIPTION_STR_
+        )
 
     @property
     def diff_units(self):
@@ -71,12 +79,14 @@ class RelativeZSum(BaseReferential):
         :return: float
         """
         dividend, base = self._blockchain_processor.previous_ud(self.currency)
-        previous_monetary_mass = self._blockchain_processor.previous_monetary_mass(self.currency)
+        previous_monetary_mass = self._blockchain_processor.previous_monetary_mass(
+            self.currency
+        )
         members_count = self._blockchain_processor.current_members_count(self.currency)
         if previous_monetary_mass and members_count > 0:
             median = previous_monetary_mass / members_count
-            relative_value = self.amount / float(dividend * 10**base)
-            relative_median = median / float(dividend * 10**base)
+            relative_value = self.amount / float(dividend * 10 ** base)
+            relative_median = median / float(dividend * 10 ** base)
         else:
             relative_value = self.amount
             relative_median = 0
@@ -88,23 +98,27 @@ class RelativeZSum(BaseReferential):
     def localized(self, units=False, show_base=False):
         value = self.value()
 
-        localized_value = QLocale().toString(float(value), 'f', self.app.parameters.digits_after_comma)
+        localized_value = QLocale().toString(
+            float(value), "f", self.app.parameters.digits_after_comma
+        )
 
         if units:
-            return QCoreApplication.translate("RelativeZSum", RelativeZSum._REF_STR_)\
-                .format(localized_value, "",
-                        self.units if units else "")
+            return QCoreApplication.translate(
+                "RelativeZSum", RelativeZSum._REF_STR_
+            ).format(localized_value, "", self.units if units else "")
         else:
             return localized_value
 
     def diff_localized(self, units=False, show_base=False):
         value = self.differential()
 
-        localized_value = QLocale().toString(float(value), 'f', self.app.parameters.digits_after_comma)
+        localized_value = QLocale().toString(
+            float(value), "f", self.app.parameters.digits_after_comma
+        )
 
         if units:
-            return QCoreApplication.translate("Relative", Relative._REF_STR_)\
-                .format(localized_value, "",
-                        (self.diff_units if units else ""))
+            return QCoreApplication.translate("Relative", Relative._REF_STR_).format(
+                localized_value, "", (self.diff_units if units else "")
+            )
         else:
             return localized_value
diff --git a/src/sakia/options.py b/src/sakia/options.py
index 609cdd570c87dd320c945e0357d4a4e6a5313460..54a3a334797bd789ede2cfa22d98231f727330cc 100644
--- a/src/sakia/options.py
+++ b/src/sakia/options.py
@@ -13,11 +13,11 @@ def config_path_factory():
         env_path = environ["XDG_CONFIG_HOME"]
     elif sys.platform.startswith("linux") and "HOME" in environ:
         env_path = path.join(environ["HOME"], ".config")
-    elif sys.platform.startswith("win32") and"APPDATA" in environ:
+    elif sys.platform.startswith("win32") and "APPDATA" in environ:
         env_path = environ["APPDATA"]
     else:
         env_path = path.dirname(__file__)
-    return path.join(env_path, 'sakia')
+    return path.join(env_path, "sakia")
 
 
 @attr.s()
@@ -26,7 +26,7 @@ class SakiaOptions:
     currency = attr.ib(default="gtest")
     profile = attr.ib(default="Default Profile")
     with_plugin = attr.ib(default="")
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def from_arguments(cls, argv):
@@ -41,22 +41,44 @@ class SakiaOptions:
 
     def _parse_arguments(self, argv):
         parser = OptionParser()
-        parser.add_option("-v", "--verbose",
-                          action="store_true", dest="verbose", default=False,
-                          help="Print INFO messages to stdout")
-
-        parser.add_option("-d", "--debug",
-                          action="store_true", dest="debug", default=False,
-                          help="Print DEBUG messages to stdout")
-
-        parser.add_option("--currency",  dest="currency", default="g1",
-                          help="Select a currency between {0}".format(",".join(ROOT_SERVERS.keys())))
-
-        parser.add_option("--profile",  dest="profile", default="Default Profile",
-                          help="Select profile to use")
-
-        parser.add_option("--withplugin",  dest="with_plugin", default="",
-                          help="Load a plugin (for development purpose)")
+        parser.add_option(
+            "-v",
+            "--verbose",
+            action="store_true",
+            dest="verbose",
+            default=False,
+            help="Print INFO messages to stdout",
+        )
+
+        parser.add_option(
+            "-d",
+            "--debug",
+            action="store_true",
+            dest="debug",
+            default=False,
+            help="Print DEBUG messages to stdout",
+        )
+
+        parser.add_option(
+            "--currency",
+            dest="currency",
+            default="g1",
+            help="Select a currency between {0}".format(",".join(ROOT_SERVERS.keys())),
+        )
+
+        parser.add_option(
+            "--profile",
+            dest="profile",
+            default="Default Profile",
+            help="Select profile to use",
+        )
+
+        parser.add_option(
+            "--withplugin",
+            dest="with_plugin",
+            default="",
+            help="Load a plugin (for development purpose)",
+        )
 
         (options, args) = parser.parse_args(argv)
 
@@ -69,21 +91,29 @@ class SakiaOptions:
             self.profile = options.profile
 
         if options.with_plugin:
-            if path.isfile(options.with_plugin) and options.with_plugin.endswith(".zip"):
+            if path.isfile(options.with_plugin) and options.with_plugin.endswith(
+                ".zip"
+            ):
                 self.with_plugin = options.with_plugin
             else:
-                raise RuntimeError("{:} is not a valid path to a zip file".format(options.with_plugin))
+                raise RuntimeError(
+                    "{:} is not a valid path to a zip file".format(options.with_plugin)
+                )
 
         if options.debug:
             self._logger.setLevel(logging.DEBUG)
-            formatter = logging.Formatter('%(levelname)s:%(module)s:%(funcName)s:%(message)s')
+            formatter = logging.Formatter(
+                "%(levelname)s:%(module)s:%(funcName)s:%(message)s"
+            )
         elif options.verbose:
             self._logger.setLevel(logging.INFO)
-            formatter = logging.Formatter('%(levelname)s:%(message)s')
+            formatter = logging.Formatter("%(levelname)s:%(message)s")
 
         if options.debug or options.verbose:
-            logging.getLogger('quamash').setLevel(logging.INFO)
-            file_handler = RotatingFileHandler(path.join(self.config_path, 'sakia.log'), 'a', 1000000, 10)
+            logging.getLogger("quamash").setLevel(logging.INFO)
+            file_handler = RotatingFileHandler(
+                path.join(self.config_path, "sakia.log"), "a", 1000000, 10
+            )
             file_handler.setFormatter(formatter)
             stream_handler = StreamHandler()
             stream_handler.setFormatter(formatter)
diff --git a/src/sakia/services/blockchain.py b/src/sakia/services/blockchain.py
index dabef132ac680b8c43ab1f92c38ed6b3103f765d..99d322a9dcd6db770b9186a50e436eb4ecee2fb6 100644
--- a/src/sakia/services/blockchain.py
+++ b/src/sakia/services/blockchain.py
@@ -12,8 +12,18 @@ class BlockchainService(QObject):
     Blockchain service is managing new blocks received
     to update data locally
     """
-    def __init__(self, app, currency, blockchain_processor, connections_processor, bma_connector,
-                 identities_service, transactions_service, sources_service):
+
+    def __init__(
+        self,
+        app,
+        currency,
+        blockchain_processor,
+        connections_processor,
+        bma_connector,
+        identities_service,
+        transactions_service,
+        sources_service,
+    ):
         """
         Constructor the identities service
 
@@ -35,7 +45,7 @@ class BlockchainService(QObject):
         self._identities_service = identities_service
         self._transactions_service = transactions_service
         self._sources_service = sources_service
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
         self._update_lock = False
 
     def initialized(self):
@@ -47,26 +57,43 @@ class BlockchainService(QObject):
 
         :param duniterpy.documents.BlockUID network_blockstamp:
         """
-        if self._blockchain_processor.initialized(self.currency) and not self._update_lock:
+        if (
+            self._blockchain_processor.initialized(self.currency)
+            and not self._update_lock
+        ):
             try:
                 self._update_lock = True
                 self.app.refresh_started.emit()
-                start = self._blockchain_processor.block_number_30days_ago(self.currency, network_blockstamp)
+                start = self._blockchain_processor.block_number_30days_ago(
+                    self.currency, network_blockstamp
+                )
                 if self.current_buid().number > start:
                     start = self.current_buid().number + 1
                 else:
-                    connections = self._connections_processor.connections_to(self.currency)
-                    time_30days_ago = self._blockchain_processor.rounded_timestamp(self.currency, start)
-                    self._transactions_service.insert_stopline(connections, start, time_30days_ago)
+                    connections = self._connections_processor.connections_to(
+                        self.currency
+                    )
+                    time_30days_ago = self._blockchain_processor.rounded_timestamp(
+                        self.currency, start
+                    )
+                    self._transactions_service.insert_stopline(
+                        connections, start, time_30days_ago
+                    )
                 self._logger.debug("Parsing from {0}".format(start))
                 connections = self._connections_processor.connections_to(self.currency)
                 await self._identities_service.refresh()
-                changed_tx, new_tx, new_dividends = await self._transactions_service.handle_new_blocks(connections,
-                                                                                                       start,
-                                                                                                       network_blockstamp.number)
+                (
+                    changed_tx,
+                    new_tx,
+                    new_dividends,
+                ) = await self._transactions_service.handle_new_blocks(
+                    connections, start, network_blockstamp.number
+                )
                 await self._sources_service.refresh_sources(connections)
 
-                await self._blockchain_processor.handle_new_blocks(self.currency, network_blockstamp)
+                await self._blockchain_processor.handle_new_blocks(
+                    self.currency, network_blockstamp
+                )
 
                 self.app.db.commit()
                 for tx in changed_tx:
@@ -126,7 +153,7 @@ class BlockchainService(QObject):
 
     def adjusted_ts(self, time):
         return self._blockchain_processor.adjusted_ts(self.currency, time)
-    
+
     def next_ud_reeval(self):
         parameters = self._blockchain_processor.parameters(self.currency)
         mediantime = self._blockchain_processor.time(self.currency)
@@ -145,8 +172,14 @@ class BlockchainService(QObject):
         """
         parameters = self.parameters()
         if self.last_members_count():
-            last_ud = self.last_ud()[0] * 10**self.last_ud()[1]
-            next_ud = last_ud + parameters.c * parameters.c * self.previous_monetary_mass() / self.last_members_count()
+            last_ud = self.last_ud()[0] * 10 ** self.last_ud()[1]
+            next_ud = (
+                last_ud
+                + parameters.c
+                * parameters.c
+                * self.previous_monetary_mass()
+                / self.last_members_count()
+            )
         else:
             next_ud = parameters.ud0
         return math.ceil(next_ud)
diff --git a/src/sakia/services/documents.py b/src/sakia/services/documents.py
index fd31cba361caeea8030d6b8ea233ddda41dfabdd..254c9a5304936c6e0d52ba222bccbf4055a5194a 100644
--- a/src/sakia/services/documents.py
+++ b/src/sakia/services/documents.py
@@ -3,16 +3,31 @@ import attr
 import logging
 
 from duniterpy.key import SigningKey
-from duniterpy.documents import Certification, Membership, Revocation, InputSource, \
-    OutputSource, SIGParameter, Unlock, block_uid, BlockUID
+from duniterpy.documents import (
+    Certification,
+    Membership,
+    Revocation,
+    InputSource,
+    OutputSource,
+    SIGParameter,
+    Unlock,
+    block_uid,
+    BlockUID,
+)
 from duniterpy.documents import Identity as IdentityDoc
 from duniterpy.documents import Transaction as TransactionDoc
 from duniterpy.documents.transaction import reduce_base
 from duniterpy.grammars import output
 from duniterpy.api import bma
 from sakia.data.entities import Identity, Transaction, Source
-from sakia.data.processors import BlockchainProcessor, IdentitiesProcessor, NodesProcessor, \
-    TransactionsProcessor, SourcesProcessor, CertificationsProcessor
+from sakia.data.processors import (
+    BlockchainProcessor,
+    IdentitiesProcessor,
+    NodesProcessor,
+    TransactionsProcessor,
+    SourcesProcessor,
+    CertificationsProcessor,
+)
 from sakia.data.connectors import BmaConnector, parse_bma_responses
 from sakia.errors import NotEnoughChangeError
 
@@ -29,13 +44,14 @@ class DocumentsService:
     :param sakia.data.processors.TransactionsProcessor _transactions_processor: the transactions processor
     :param sakia.data.processors.SourcesProcessor _sources_processor: the sources processor
     """
+
     _bma_connector = attr.ib()
     _blockchain_processor = attr.ib()
     _identities_processor = attr.ib()
     _certifications_processor = attr.ib()
     _transactions_processor = attr.ib()
     _sources_processor = attr.ib()
-    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger('sakia')))
+    _logger = attr.ib(default=attr.Factory(lambda: logging.getLogger("sakia")))
 
     @classmethod
     def instanciate(cls, app):
@@ -43,19 +59,25 @@ class DocumentsService:
         Instanciate a blockchain processor
         :param sakia.app.Application app: the app
         """
-        return cls(BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters),
-                   BlockchainProcessor.instanciate(app),
-                   IdentitiesProcessor.instanciate(app),
-                   CertificationsProcessor.instanciate(app),
-                   TransactionsProcessor.instanciate(app),
-                   SourcesProcessor.instanciate(app))
+        return cls(
+            BmaConnector(NodesProcessor(app.db.nodes_repo), app.parameters),
+            BlockchainProcessor.instanciate(app),
+            IdentitiesProcessor.instanciate(app),
+            CertificationsProcessor.instanciate(app),
+            TransactionsProcessor.instanciate(app),
+            SourcesProcessor.instanciate(app),
+        )
 
     def generate_identity(self, connection):
-        identity = self._identities_processor.get_identity(connection.currency, connection.pubkey, connection.uid)
+        identity = self._identities_processor.get_identity(
+            connection.currency, connection.pubkey, connection.uid
+        )
         if not identity:
             identity = Identity(connection.currency, connection.pubkey, connection.uid)
 
-        sig_window = self._blockchain_processor.parameters(connection.currency).sig_window
+        sig_window = self._blockchain_processor.parameters(
+            connection.currency
+        ).sig_window
         current_time = self._blockchain_processor.time(connection.currency)
 
         if identity.is_obsolete(sig_window, current_time):
@@ -75,18 +97,23 @@ class DocumentsService:
         """
         self._logger.debug("Key publish : {0}".format(identity_doc.signed_raw()))
 
-        responses = await self._bma_connector.broadcast(connection.currency, bma.wot.add,
-                                                        req_args={'identity': identity_doc.signed_raw()})
+        responses = await self._bma_connector.broadcast(
+            connection.currency,
+            bma.wot.add,
+            req_args={"identity": identity_doc.signed_raw()},
+        )
         result = await parse_bma_responses(responses)
 
         return result
 
-    async def broadcast_revocation(self, currency, identity_document, revocation_document):
+    async def broadcast_revocation(
+        self, currency, identity_document, revocation_document
+    ):
         signed_raw = revocation_document.signed_raw(identity_document)
         self._logger.debug("Broadcasting : \n" + signed_raw)
-        responses = await self._bma_connector.broadcast(currency, bma.wot.revoke, req_args={
-                                                            'revocation': signed_raw
-                                                        })
+        responses = await self._bma_connector.broadcast(
+            currency, bma.wot.revoke, req_args={"revocation": signed_raw}
+        )
 
         result = False, ""
         for r in responses:
@@ -115,14 +142,24 @@ class DocumentsService:
         self._logger.debug("Send membership")
 
         blockUID = self._blockchain_processor.current_buid(connection.currency)
-        membership = Membership(10, connection.currency,
-                                connection.pubkey, blockUID, mstype, connection.uid,
-                                connection.blockstamp, None)
+        membership = Membership(
+            10,
+            connection.currency,
+            connection.pubkey,
+            blockUID,
+            mstype,
+            connection.uid,
+            connection.blockstamp,
+            None,
+        )
         key = SigningKey(secret_key, password, connection.scrypt_params)
         membership.sign([key])
         self._logger.debug("Membership : {0}".format(membership.signed_raw()))
-        responses = await self._bma_connector.broadcast(connection.currency, bma.blockchain.membership,
-                                                        req_args={'membership': membership.signed_raw()})
+        responses = await self._bma_connector.broadcast(
+            connection.currency,
+            bma.blockchain.membership,
+            req_args={"membership": membership.signed_raw()},
+        )
         result = await parse_bma_responses(responses)
 
         return result
@@ -139,29 +176,43 @@ class DocumentsService:
         self._logger.debug("Certdata")
         blockUID = self._blockchain_processor.current_buid(connection.currency)
         if not identity.signature:
-            lookup_data = await self._bma_connector.get(connection.currency, bma.wot.lookup,
-                                                     req_args={'search': identity.pubkey})
-            for uid_data in next(data["uids"] for data in lookup_data["results"] if data["pubkey"] == identity.pubkey):
-                if uid_data["uid"] == identity.uid and block_uid(uid_data["meta"]["timestamp"]) == identity.blockstamp:
+            lookup_data = await self._bma_connector.get(
+                connection.currency,
+                bma.wot.lookup,
+                req_args={"search": identity.pubkey},
+            )
+            for uid_data in next(
+                data["uids"]
+                for data in lookup_data["results"]
+                if data["pubkey"] == identity.pubkey
+            ):
+                if (
+                    uid_data["uid"] == identity.uid
+                    and block_uid(uid_data["meta"]["timestamp"]) == identity.blockstamp
+                ):
                     identity.signature = uid_data["self"]
                     break
             else:
                 return False, "Could not find certified identity signature"
 
-        certification = Certification(10, connection.currency,
-                                      connection.pubkey, identity.pubkey, blockUID, None)
+        certification = Certification(
+            10, connection.currency, connection.pubkey, identity.pubkey, blockUID, None
+        )
 
         key = SigningKey(secret_key, password, connection.scrypt_params)
         certification.sign(identity.document(), [key])
         signed_cert = certification.signed_raw(identity.document())
         self._logger.debug("Certification : {0}".format(signed_cert))
         timestamp = self._blockchain_processor.time(connection.currency)
-        responses = await self._bma_connector.broadcast(connection.currency, bma.wot.certify, req_args={'cert': signed_cert})
+        responses = await self._bma_connector.broadcast(
+            connection.currency, bma.wot.certify, req_args={"cert": signed_cert}
+        )
         result = await parse_bma_responses(responses)
         if result[0]:
             self._identities_processor.insert_or_update_identity(identity)
-            self._certifications_processor.create_or_update_certification(connection.currency, certification,
-                                                                          timestamp, None)
+            self._certifications_processor.create_or_update_certification(
+                connection.currency, certification, timestamp, None
+            )
 
         return result
 
@@ -180,16 +231,20 @@ class DocumentsService:
         key = SigningKey(salt, password)
         revocation.sign(self_cert, [key])
 
-        self._logger.debug("Self-Revokation Document : \n{0}".format(revocation.raw(self_cert)))
+        self._logger.debug(
+            "Self-Revokation Document : \n{0}".format(revocation.raw(self_cert))
+        )
         self._logger.debug("Signature : \n{0}".format(revocation.signatures[0]))
 
         data = {
-            'pubkey': identity.pubkey,
-            'self_': self_cert.signed_raw(),
-            'sig': revocation.signatures[0]
+            "pubkey": identity.pubkey,
+            "self_": self_cert.signed_raw(),
+            "sig": revocation.signatures[0],
         }
         self._logger.debug("Posted data : {0}".format(data))
-        responses = await self._bma_connector.broadcast(currency, bma.wot.Revoke, {}, data)
+        responses = await self._bma_connector.broadcast(
+            currency, bma.wot.Revoke, {}, data
+        )
         result = await parse_bma_responses(responses)
         return result
 
@@ -202,11 +257,15 @@ class DocumentsService:
         :param str password: The account SigningKey password
         """
         document = Revocation(10, connection.currency, connection.pubkey, "")
-        identity = self._identities_processor.get_identity(connection.currency, connection.pubkey, connection.uid)
+        identity = self._identities_processor.get_identity(
+            connection.currency, connection.pubkey, connection.uid
+        )
         if not identity:
             identity = self.generate_identity(connection)
             identity_doc = identity.document()
-            key = SigningKey(connection.salt, connection.password, connection.scrypt_params)
+            key = SigningKey(
+                connection.salt, connection.password, connection.scrypt_params
+            )
             identity_doc.sign([key])
             identity.signature = identity_doc.signatures[0]
             self._identities_processor.insert_or_update_identity(identity)
@@ -235,9 +294,9 @@ class DocumentsService:
         def current_value(inputs, overhs):
             i = 0
             for s in inputs:
-                i += s.amount * (10**s.base)
+                i += s.amount * (10 ** s.base)
             for o in overhs:
-                i -= o[0] * (10**o[1])
+                i -= o[0] * (10 ** o[1])
             return i
 
         amount, amount_base = reduce_base(amount, amount_base)
@@ -254,14 +313,21 @@ class DocumentsService:
                     test_sources = sources + [s]
                     val = current_value(test_sources, overheads)
                     # if we have to compute an overhead
-                    if current_value(test_sources, overheads) > amount * (10**amount_base):
-                        overhead = current_value(test_sources, overheads) - int(amount) * (10**amount_base)
+                    if current_value(test_sources, overheads) > amount * (
+                        10 ** amount_base
+                    ):
+                        overhead = current_value(test_sources, overheads) - int(
+                            amount
+                        ) * (10 ** amount_base)
                         # we round the overhead in the current base
                         # exemple : 12 in base 1 -> 1*10^1
-                        overhead = int(round(float(overhead) / (10**current_base)))
-                        source_value = s.amount * (10**s.base)
-                        out = int((source_value - (overhead * (10**current_base)))/(10**current_base))
-                        if out * (10**current_base) <= amount * (10**amount_base):
+                        overhead = int(round(float(overhead) / (10 ** current_base)))
+                        source_value = s.amount * (10 ** s.base)
+                        out = int(
+                            (source_value - (overhead * (10 ** current_base)))
+                            / (10 ** current_base)
+                        )
+                        if out * (10 ** current_base) <= amount * (10 ** amount_base):
                             sources.append(s)
                             buf_sources.remove(s)
                             overheads.append((overhead, current_base))
@@ -271,12 +337,16 @@ class DocumentsService:
                         sources.append(s)
                         buf_sources.remove(s)
                         outputs.append((s.amount, s.base))
-                    if current_value(sources, overheads) == amount * (10 ** amount_base):
+                    if current_value(sources, overheads) == amount * (
+                        10 ** amount_base
+                    ):
                         return sources, outputs, overheads
 
                 current_base -= 1
 
-        raise NotEnoughChangeError(value, currency, len(sources), amount * pow(10, amount_base))
+        raise NotEnoughChangeError(
+            value, currency, len(sources), amount * pow(10, amount_base)
+        )
 
     def tx_inputs(self, sources):
         """
@@ -286,7 +356,9 @@ class DocumentsService:
         """
         inputs = []
         for s in sources:
-            inputs.append(InputSource(s.amount, s.base, s.type, s.identifier, s.noffset))
+            inputs.append(
+                InputSource(s.amount, s.base, s.type, s.identifier, s.noffset)
+            )
         return inputs
 
     def tx_unlocks(self, sources):
@@ -317,7 +389,11 @@ class DocumentsService:
             for o in outputs:
                 if o[1] == base:
                     output_sum += o[0]
-            total.append(OutputSource(output_sum, base, output.Condition.token(output.SIG.token(receiver))))
+            total.append(
+                OutputSource(
+                    output_sum, base, output.Condition.token(output.SIG.token(receiver))
+                )
+            )
 
         overheads_bases = set(o[1] for o in overheads)
         for base in overheads_bases:
@@ -325,7 +401,13 @@ class DocumentsService:
             for o in overheads:
                 if o[1] == base:
                     overheads_sum += o[0]
-            total.append(OutputSource(overheads_sum, base, output.Condition.token(output.SIG.token(issuer))))
+            total.append(
+                OutputSource(
+                    overheads_sum,
+                    base,
+                    output.Condition.token(output.SIG.token(issuer)),
+                )
+            )
 
         return total
 
@@ -339,16 +421,20 @@ class DocumentsService:
         """
         for offset, output in enumerate(txdoc.outputs):
             if output.conditions.left.pubkey == pubkey:
-                source = Source(currency=currency,
-                                pubkey=pubkey,
-                                identifier=txdoc.sha_hash,
-                                type='T',
-                                noffset=offset,
-                                amount=output.amount,
-                                base=output.base)
+                source = Source(
+                    currency=currency,
+                    pubkey=pubkey,
+                    identifier=txdoc.sha_hash,
+                    type="T",
+                    noffset=offset,
+                    amount=output.amount,
+                    base=output.base,
+                )
                 self._sources_processor.insert(source)
 
-    def prepare_tx(self, key, receiver, blockstamp, amount, amount_base, message, currency):
+    def prepare_tx(
+        self, key, receiver, blockstamp, amount, amount_base, message, currency
+    ):
         """
         Prepare a simple Transaction document
         :param SigningKey key: the issuer of the transaction
@@ -362,7 +448,7 @@ class DocumentsService:
         :rtype: List[sakia.data.entities.Transaction]
         """
         forged_tx = []
-        sources = [None]*41
+        sources = [None] * 41
         while len(sources) > 40:
             result = self.tx_sources(int(amount), amount_base, currency, key.pubkey)
             sources = result[0]
@@ -372,10 +458,17 @@ class DocumentsService:
             if len(sources) > 40:
                 sources_value = 0
                 for s in sources[:39]:
-                    sources_value += s.amount * (10**s.base)
+                    sources_value += s.amount * (10 ** s.base)
                 sources_value, sources_base = reduce_base(sources_value, 0)
-                chained_tx = self.prepare_tx(key, key.pubkey, blockstamp,
-                                             sources_value, sources_base, "[CHAINED]", currency)
+                chained_tx = self.prepare_tx(
+                    key,
+                    key.pubkey,
+                    blockstamp,
+                    sources_value,
+                    sources_base,
+                    "[CHAINED]",
+                    currency,
+                )
                 forged_tx += chained_tx
         self._sources_processor.consume(sources)
         logging.debug("Inputs : {0}".format(sources))
@@ -384,32 +477,45 @@ class DocumentsService:
         unlocks = self.tx_unlocks(sources)
         outputs = self.tx_outputs(key.pubkey, receiver, computed_outputs, overheads)
         logging.debug("Outputs : {0}".format(outputs))
-        txdoc = TransactionDoc(10, currency, blockstamp, 0,
-                               [key.pubkey], inputs, unlocks,
-                               outputs, message, None)
+        txdoc = TransactionDoc(
+            10,
+            currency,
+            blockstamp,
+            0,
+            [key.pubkey],
+            inputs,
+            unlocks,
+            outputs,
+            message,
+            None,
+        )
         txdoc.sign([key])
         self.commit_outputs_to_self(currency, key.pubkey, txdoc)
         time = self._blockchain_processor.time(currency)
-        tx = Transaction(currency=currency,
-                         pubkey=key.pubkey,
-                         sha_hash=txdoc.sha_hash,
-                         written_block=0,
-                         blockstamp=blockstamp,
-                         timestamp=time,
-                         signatures=txdoc.signatures,
-                         issuers=[key.pubkey],
-                         receivers=[receiver],
-                         amount=amount,
-                         amount_base=amount_base,
-                         comment=txdoc.comment,
-                         txid=0,
-                         state=Transaction.TO_SEND,
-                         local=True,
-                         raw=txdoc.signed_raw())
+        tx = Transaction(
+            currency=currency,
+            pubkey=key.pubkey,
+            sha_hash=txdoc.sha_hash,
+            written_block=0,
+            blockstamp=blockstamp,
+            timestamp=time,
+            signatures=txdoc.signatures,
+            issuers=[key.pubkey],
+            receivers=[receiver],
+            amount=amount,
+            amount_base=amount_base,
+            comment=txdoc.comment,
+            txid=0,
+            state=Transaction.TO_SEND,
+            local=True,
+            raw=txdoc.signed_raw(),
+        )
         forged_tx.append(tx)
         return forged_tx
 
-    async def send_money(self, connection, secret_key, password, recipient, amount, amount_base, message):
+    async def send_money(
+        self, connection, secret_key, password, recipient, amount, amount_base, message
+    ):
         """
         Send money to a given recipient in a specified community
         :param sakia.data.entities.Connection connection: The account salt
@@ -426,13 +532,22 @@ class DocumentsService:
         tx_entities = []
         result = (True, ""), tx_entities
         try:
-            tx_entities = self.prepare_tx(key, recipient, blockstamp, amount, amount_base,
-                                           message, connection.currency)
+            tx_entities = self.prepare_tx(
+                key,
+                recipient,
+                blockstamp,
+                amount,
+                amount_base,
+                message,
+                connection.currency,
+            )
 
             for i, tx in enumerate(tx_entities):
                 logging.debug("Transaction : [{0}]".format(tx.raw))
                 tx.txid = i
-                tx_res, tx_entities[i] = await self._transactions_processor.send(tx, connection.currency)
+                tx_res, tx_entities[i] = await self._transactions_processor.send(
+                    tx, connection.currency
+                )
 
                 # Result can be negative if a tx is not accepted by the network
                 if result[0]:
diff --git a/src/sakia/services/identities.py b/src/sakia/services/identities.py
index b35e22f0a6f9d6f69a131c867f3826de7b7768c0..4c4eb0873021abda0dca79ac81250ed5b7010c5c 100644
--- a/src/sakia/services/identities.py
+++ b/src/sakia/services/identities.py
@@ -12,8 +12,16 @@ class IdentitiesService(QObject):
     Identities service is managing identities data received
     to update data locally
     """
-    def __init__(self, currency, connections_processor, identities_processor, certs_processor,
-                 blockchain_processor, bma_connector):
+
+    def __init__(
+        self,
+        currency,
+        connections_processor,
+        identities_processor,
+        certs_processor,
+        blockchain_processor,
+        bma_connector,
+    ):
         """
         Constructor the identities service
 
@@ -31,7 +39,7 @@ class IdentitiesService(QObject):
         self._blockchain_processor = blockchain_processor
         self._bma_connector = bma_connector
         self.currency = currency
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
 
     def certification_expired(self, cert_time):
         """
@@ -51,7 +59,10 @@ class IdentitiesService(QObject):
         """
         parameters = self._blockchain_processor.parameters(self.currency)
         blockchain_time = self._blockchain_processor.time(self.currency)
-        return blockchain_time - cert_time < parameters.sig_window * parameters.avg_gen_time
+        return (
+            blockchain_time - cert_time
+            < parameters.sig_window * parameters.avg_gen_time
+        )
 
     def expiration_date(self, identity):
         """
@@ -73,7 +84,9 @@ class IdentitiesService(QObject):
         connections = self._connections_processor.connections_with_uids(self.currency)
         identities = []
         for c in connections:
-            identities.append(self._identities_processor.get_identity(self.currency, c.pubkey))
+            identities.append(
+                self._identities_processor.get_identity(self.currency, c.pubkey)
+            )
         return identities
 
     def is_identity_of_connection(self, identity):
@@ -86,18 +99,22 @@ class IdentitiesService(QObject):
         :param sakia.data.entities.Identity identity: the identity
         """
         try:
-            search = await self._bma_connector.get(self.currency, bma.blockchain.memberships,
-                                                   req_args={'search': identity.pubkey})
+            search = await self._bma_connector.get(
+                self.currency,
+                bma.blockchain.memberships,
+                req_args={"search": identity.pubkey},
+            )
             blockstamp = BlockUID.empty()
             membership_data = None
 
-            for ms in search['memberships']:
-                if ms['blockNumber'] > blockstamp.number:
-                    blockstamp = BlockUID(ms["blockNumber"], ms['blockHash'])
+            for ms in search["memberships"]:
+                if ms["blockNumber"] > blockstamp.number:
+                    blockstamp = BlockUID(ms["blockNumber"], ms["blockHash"])
                     membership_data = ms
             if membership_data:
-                identity.membership_timestamp = await self._blockchain_processor.timestamp(self.currency,
-                                                                                           blockstamp.number)
+                identity.membership_timestamp = await self._blockchain_processor.timestamp(
+                    self.currency, blockstamp.number
+                )
                 identity.membership_buid = blockstamp
                 identity.membership_type = ms["membership"]
                 identity.membership_written_on = ms["written"]
@@ -108,7 +125,10 @@ class IdentitiesService(QObject):
                 self._identities_processor.insert_or_update_identity(identity)
         except errors.DuniterError as e:
             logging.debug(str(e))
-            if e.ucode in (errors.NO_MATCHING_IDENTITY, errors.NO_MEMBER_MATCHING_PUB_OR_UID):
+            if e.ucode in (
+                errors.NO_MATCHING_IDENTITY,
+                errors.NO_MEMBER_MATCHING_PUB_OR_UID,
+            ):
                 identity.written = False
                 if self.is_identity_of_connection(identity):
                     self._identities_processor.insert_or_update_identity(identity)
@@ -123,47 +143,65 @@ class IdentitiesService(QObject):
         :param dict[sakia.data.entities.Certification] certified: the list of certified got in /wot/certified-by
         """
         try:
-            lookup_data = await self._bma_connector.get(self.currency, bma.wot.lookup, {'search': identity.pubkey})
-            for result in lookup_data['results']:
+            lookup_data = await self._bma_connector.get(
+                self.currency, bma.wot.lookup, {"search": identity.pubkey}
+            )
+            for result in lookup_data["results"]:
                 if result["pubkey"] == identity.pubkey:
-                    for uid_data in result['uids']:
+                    for uid_data in result["uids"]:
                         if not identity.uid or uid_data["uid"] == identity.uid:
-                            if not identity.blockstamp or identity.blockstamp == block_uid(uid_data["meta"]["timestamp"]):
+                            if (
+                                not identity.blockstamp
+                                or identity.blockstamp
+                                == block_uid(uid_data["meta"]["timestamp"])
+                            ):
                                 for other_data in uid_data["others"]:
-                                    cert = Certification(currency=self.currency,
-                                                         certified=identity.pubkey,
-                                                         certifier=other_data["pubkey"],
-                                                         block=other_data["meta"]["block_number"],
-                                                         timestamp=0,
-                                                         signature=other_data['signature'])
-                                    certifier = Identity(currency=self.currency,
-                                                         pubkey=other_data["pubkey"],
-                                                         uid=other_data["uids"][0],
-                                                         member=other_data["isMember"])
+                                    cert = Certification(
+                                        currency=self.currency,
+                                        certified=identity.pubkey,
+                                        certifier=other_data["pubkey"],
+                                        block=other_data["meta"]["block_number"],
+                                        timestamp=0,
+                                        signature=other_data["signature"],
+                                    )
+                                    certifier = Identity(
+                                        currency=self.currency,
+                                        pubkey=other_data["pubkey"],
+                                        uid=other_data["uids"][0],
+                                        member=other_data["isMember"],
+                                    )
                                     if cert not in certifiers:
-                                        cert.timestamp = self._blockchain_processor.rounded_timestamp(self.currency,
-                                                                                                    cert.block)
+                                        cert.timestamp = self._blockchain_processor.rounded_timestamp(
+                                            self.currency, cert.block
+                                        )
                                         certifiers[cert] = certifier
                                         # We save connections pubkeys
                                         if self.is_identity_of_connection(identity):
-                                            self._certs_processor.insert_or_update_certification(cert)
+                                            self._certs_processor.insert_or_update_certification(
+                                                cert
+                                            )
                 for signed_data in result["signed"]:
-                    cert = Certification(currency=self.currency,
-                                         certified=signed_data["pubkey"],
-                                         certifier=identity.pubkey,
-                                         block=signed_data["cert_time"]["block"],
-                                         timestamp=0,
-                                         signature=signed_data['signature'])
-                    certified_idty = Identity(currency=self.currency,
-                                              pubkey=signed_data["pubkey"],
-                                              uid=signed_data["uid"],
-                                              member=signed_data["isMember"])
+                    cert = Certification(
+                        currency=self.currency,
+                        certified=signed_data["pubkey"],
+                        certifier=identity.pubkey,
+                        block=signed_data["cert_time"]["block"],
+                        timestamp=0,
+                        signature=signed_data["signature"],
+                    )
+                    certified_idty = Identity(
+                        currency=self.currency,
+                        pubkey=signed_data["pubkey"],
+                        uid=signed_data["uid"],
+                        member=signed_data["isMember"],
+                    )
                     if cert not in certified:
                         certified[cert] = certified_idty
                         # We save connections pubkeys
                         if self.is_identity_of_connection(identity):
-                            cert.timestamp = self._blockchain_processor.rounded_timestamp(self.currency,
-                                                                                        cert.block)
+                            cert.timestamp = self._blockchain_processor.rounded_timestamp(
+                                self.currency, cert.block
+                            )
                             self._certs_processor.insert_or_update_certification(cert)
         except errors.DuniterError as e:
             logging.debug("Certified by error : {0}".format(str(e)))
@@ -179,21 +217,26 @@ class IdentitiesService(QObject):
         """
         certifications = {}
         try:
-            data = await self._bma_connector.get(self.currency, bma.wot.certifiers_of,
-                                                 {'search': identity.pubkey})
-            for certifier_data in data['certifications']:
-                cert = Certification(currency=self.currency,
-                                     certified=data["pubkey"],
-                                     certifier=certifier_data["pubkey"],
-                                     block=certifier_data["cert_time"]["block"],
-                                     timestamp=certifier_data["cert_time"]["medianTime"],
-                                     signature=certifier_data['signature'])
-                certifier = Identity(currency=self.currency,
-                                     pubkey=certifier_data["pubkey"],
-                                     uid=certifier_data["uid"],
-                                     member=certifier_data["isMember"])
-                if certifier_data['written']:
-                    cert.written_on = certifier_data['written']['number']
+            data = await self._bma_connector.get(
+                self.currency, bma.wot.certifiers_of, {"search": identity.pubkey}
+            )
+            for certifier_data in data["certifications"]:
+                cert = Certification(
+                    currency=self.currency,
+                    certified=data["pubkey"],
+                    certifier=certifier_data["pubkey"],
+                    block=certifier_data["cert_time"]["block"],
+                    timestamp=certifier_data["cert_time"]["medianTime"],
+                    signature=certifier_data["signature"],
+                )
+                certifier = Identity(
+                    currency=self.currency,
+                    pubkey=certifier_data["pubkey"],
+                    uid=certifier_data["uid"],
+                    member=certifier_data["isMember"],
+                )
+                if certifier_data["written"]:
+                    cert.written_on = certifier_data["written"]["number"]
                 certifications[cert] = certifier
                 # We save connections pubkeys
                 if identity.pubkey in self._connections_processor.pubkeys():
@@ -203,7 +246,10 @@ class IdentitiesService(QObject):
             if self.is_identity_of_connection(identity):
                 self._identities_processor.insert_or_update_identity(identity)
         except errors.DuniterError as e:
-            if e.ucode in (errors.NO_MATCHING_IDENTITY, errors.NO_MEMBER_MATCHING_PUB_OR_UID):
+            if e.ucode in (
+                errors.NO_MATCHING_IDENTITY,
+                errors.NO_MEMBER_MATCHING_PUB_OR_UID,
+            ):
                 identity.written = False
                 if identity.pubkey in self._connections_processor.pubkeys():
                     self._identities_processor.insert_or_update_identity(identity)
@@ -220,20 +266,26 @@ class IdentitiesService(QObject):
         """
         certifications = {}
         try:
-            data = await self._bma_connector.get(self.currency, bma.wot.certified_by, {'search': identity.pubkey})
-            for certified_data in data['certifications']:
-                cert = Certification(currency=self.currency,
-                                     certifier=data["pubkey"],
-                                     certified=certified_data["pubkey"],
-                                     block=certified_data["cert_time"]["block"],
-                                     timestamp=certified_data["cert_time"]["medianTime"],
-                                     signature=certified_data['signature'])
-                certified = Identity(currency=self.currency,
-                                     pubkey=certified_data["pubkey"],
-                                     uid=certified_data["uid"],
-                                     member=certified_data["isMember"])
-                if certified_data['written']:
-                    cert.written_on = certified_data['written']['number']
+            data = await self._bma_connector.get(
+                self.currency, bma.wot.certified_by, {"search": identity.pubkey}
+            )
+            for certified_data in data["certifications"]:
+                cert = Certification(
+                    currency=self.currency,
+                    certifier=data["pubkey"],
+                    certified=certified_data["pubkey"],
+                    block=certified_data["cert_time"]["block"],
+                    timestamp=certified_data["cert_time"]["medianTime"],
+                    signature=certified_data["signature"],
+                )
+                certified = Identity(
+                    currency=self.currency,
+                    pubkey=certified_data["pubkey"],
+                    uid=certified_data["uid"],
+                    member=certified_data["isMember"],
+                )
+                if certified_data["written"]:
+                    cert.written_on = certified_data["written"]["number"]
                 certifications[cert] = certified
                 # We save connections pubkeys
                 if identity.pubkey in self._connections_processor.pubkeys():
@@ -243,7 +295,10 @@ class IdentitiesService(QObject):
             if self.is_identity_of_connection(identity):
                 self._identities_processor.insert_or_update_identity(identity)
         except errors.DuniterError as e:
-            if e.ucode in (errors.NO_MATCHING_IDENTITY, errors.NO_MEMBER_MATCHING_PUB_OR_UID):
+            if e.ucode in (
+                errors.NO_MATCHING_IDENTITY,
+                errors.NO_MEMBER_MATCHING_PUB_OR_UID,
+            ):
                 logging.debug("Certified by error : {0}".format(str(e)))
                 identity.written = False
                 if identity.pubkey in self._connections_processor.pubkeys():
@@ -269,7 +324,9 @@ class IdentitiesService(QObject):
 
         if log_stream:
             log_stream("Requesting lookup data")
-        certifiers, certified = await self.load_certs_in_lookup(identity, certifiers, certified)
+        certifiers, certified = await self.load_certs_in_lookup(
+            identity, certifiers, certified
+        )
 
         if log_stream:
             log_stream("Requesting identities of certifications")
@@ -281,7 +338,7 @@ class IdentitiesService(QObject):
                 log_stream("Requesting identity... {0}/{1}".format(i, nb_certs))
             i += 1
             if progress:
-                progress(1/nb_certs)
+                progress(1 / nb_certs)
             if not self.get_identity(cert.certifier):
                 identities.append(certifiers[cert])
 
@@ -290,7 +347,7 @@ class IdentitiesService(QObject):
                 log_stream("Requesting identity... {0}/{1}".format(i, nb_certs))
             i += 1
             if progress:
-                progress(1/nb_certs)
+                progress(1 / nb_certs)
             if not self.get_identity(cert.certified):
                 identities.append(certified[cert])
         if log_stream:
@@ -309,7 +366,11 @@ class IdentitiesService(QObject):
         connections_identities = self._get_connections_identities()
         parameters = self._blockchain_processor.parameters(block.currency)
         for idty in connections_identities:
-            if idty.member and idty.membership_timestamp + parameters.ms_validity < block.mediantime:
+            if (
+                idty.member
+                and idty.membership_timestamp + parameters.ms_validity
+                < block.mediantime
+            ):
                 identities.append(idty)
         return identities
 
@@ -320,24 +381,41 @@ class IdentitiesService(QObject):
         :return:
         """
         try:
-            requirements = await self._bma_connector.get(self.currency, bma.wot.requirements,
-                                                         req_args={'search': identity.pubkey})
-            for identity_data in requirements['identities']:
+            requirements = await self._bma_connector.get(
+                self.currency,
+                bma.wot.requirements,
+                req_args={"search": identity.pubkey},
+            )
+            for identity_data in requirements["identities"]:
                 if not identity.uid or identity.uid == identity_data["uid"]:
-                    if not identity.blockstamp or identity.blockstamp == block_uid(identity_data["meta"]["timestamp"]):
+                    if not identity.blockstamp or identity.blockstamp == block_uid(
+                        identity_data["meta"]["timestamp"]
+                    ):
                         identity.uid = identity_data["uid"]
-                        identity.blockstamp = block_uid(identity_data["meta"]["timestamp"])
-                        identity.timestamp = self._blockchain_processor.rounded_timestamp(self.currency, identity.blockstamp.number)
+                        identity.blockstamp = block_uid(
+                            identity_data["meta"]["timestamp"]
+                        )
+                        identity.timestamp = self._blockchain_processor.rounded_timestamp(
+                            self.currency, identity.blockstamp.number
+                        )
                         identity.outdistanced = identity_data["outdistanced"]
                         identity.written = identity_data["wasMember"]
                         identity.sentry = identity_data["isSentry"]
                         identity.member = identity_data["membershipExpiresIn"] > 0
                         median_time = self._blockchain_processor.time(self.currency)
-                        expiration_time = self._blockchain_processor.parameters(self.currency).ms_validity
-                        identity.membership_timestamp = median_time - (expiration_time - identity_data["membershipExpiresIn"])
+                        expiration_time = self._blockchain_processor.parameters(
+                            self.currency
+                        ).ms_validity
+                        identity.membership_timestamp = median_time - (
+                            expiration_time - identity_data["membershipExpiresIn"]
+                        )
                         # We save connections pubkeys
-                        if self._identities_processor.get_identity(self.currency, identity.pubkey, identity.uid):
-                            self._identities_processor.insert_or_update_identity(identity)
+                        if self._identities_processor.get_identity(
+                            self.currency, identity.pubkey, identity.uid
+                        ):
+                            self._identities_processor.insert_or_update_identity(
+                                identity
+                            )
         except errors.DuniterError as e:
             if e.ucode == errors.NO_MEMBER_MATCHING_PUB_OR_UID:
                 pass
@@ -380,7 +458,9 @@ class IdentitiesService(QObject):
         return await self._identities_processor.find_from_pubkey(self.currency, pubkey)
 
     def ms_time_remaining(self, identity):
-        return self.expiration_date(identity) - self._blockchain_processor.time(identity.currency)
+        return self.expiration_date(identity) - self._blockchain_processor.time(
+            identity.currency
+        )
 
     def certifications_received(self, pubkey):
         """
diff --git a/src/sakia/services/network.py b/src/sakia/services/network.py
index dc35159e943a548dd50fff77f7a659a70b286af4..db811789886cc6e85f7a15fa8b61db78510384ee 100644
--- a/src/sakia/services/network.py
+++ b/src/sakia/services/network.py
@@ -20,13 +20,22 @@ class NetworkService(QObject):
     A network is managing nodes polling and crawling of a
     given community.
     """
+
     node_changed = pyqtSignal(Node)
     new_node_found = pyqtSignal(Node)
     node_removed = pyqtSignal(Node)
     latest_block_changed = pyqtSignal(BlockUID)
     root_nodes_changed = pyqtSignal()
 
-    def __init__(self, app, currency, node_processor, connectors, blockchain_service, identities_service):
+    def __init__(
+        self,
+        app,
+        currency,
+        node_processor,
+        connectors,
+        blockchain_service,
+        identities_service,
+    ):
         """
         Constructor of a network
 
@@ -39,7 +48,7 @@ class NetworkService(QObject):
         """
         super().__init__()
         self._app = app
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
         self._processor = node_processor
         self._connectors = []
         for c in connectors:
@@ -66,11 +75,18 @@ class NetworkService(QObject):
         """
         connectors = [node_connector]
         node_processor.insert_node(node_connector.node)
-        network = cls(node_connector.node.currency, node_processor, connectors, node_connector.session)
+        network = cls(
+            node_connector.node.currency,
+            node_processor,
+            connectors,
+            node_connector.session,
+        )
         return network
 
     @classmethod
-    def load(cls, app, currency, node_processor, blockchain_service, identities_service):
+    def load(
+        cls, app, currency, node_processor, blockchain_service, identities_service
+    ):
         """
         Create a new network with all known nodes
 
@@ -90,7 +106,14 @@ class NetworkService(QObject):
 
         for node in random.sample(sample, min(len(sample), 6)):
             connectors.append(NodeConnector(node, app.parameters))
-        network = cls(app, currency, node_processor, connectors, blockchain_service, identities_service)
+        network = cls(
+            app,
+            currency,
+            node_processor,
+            connectors,
+            blockchain_service,
+            identities_service,
+        )
         return network
 
     def start_coroutines(self):
@@ -136,10 +159,18 @@ class NetworkService(QObject):
         Add a nod to the network.
         """
         self._connectors.append(node_connector)
-        node_connector.block_found.connect(self.handle_new_block, type=Qt.UniqueConnection|Qt.QueuedConnection)
-        node_connector.changed.connect(self.handle_change, type=Qt.UniqueConnection|Qt.QueuedConnection)
-        node_connector.identity_changed.connect(self.handle_identity_change, type=Qt.UniqueConnection|Qt.QueuedConnection)
-        node_connector.neighbour_found.connect(self.handle_new_node, type=Qt.UniqueConnection|Qt.QueuedConnection)
+        node_connector.block_found.connect(
+            self.handle_new_block, type=Qt.UniqueConnection | Qt.QueuedConnection
+        )
+        node_connector.changed.connect(
+            self.handle_change, type=Qt.UniqueConnection | Qt.QueuedConnection
+        )
+        node_connector.identity_changed.connect(
+            self.handle_identity_change, type=Qt.UniqueConnection | Qt.QueuedConnection
+        )
+        node_connector.neighbour_found.connect(
+            self.handle_new_node, type=Qt.UniqueConnection | Qt.QueuedConnection
+        )
         self._logger.debug("{:} connected".format(node_connector.node.pubkey[:5]))
 
     @asyncify
@@ -161,7 +192,10 @@ class NetworkService(QObject):
         while self.continue_crawling():
             if not first_loop:
                 for node in self._processor.nodes(self.currency):
-                    if node.state > Node.FAILURE_THRESHOLD and node.last_state_change + 3600 < time.time():
+                    if (
+                        node.state > Node.FAILURE_THRESHOLD
+                        and node.last_state_change + 3600 < time.time()
+                    ):
                         for connector in self._connectors:
                             if connector.node.pubkey == node.pubkey:
                                 await connector.close_ws()
@@ -180,7 +214,6 @@ class NetworkService(QObject):
                         for node in random.sample(sample, min(len(sample), 1)):
                             self.add_connector(NodeConnector(node, self.app.parameters))
 
-
                 self.run_ws2p_check()
             first_loop = False
             await asyncio.sleep(15)
@@ -203,7 +236,9 @@ class NetworkService(QObject):
                 if not node:
                     self._logger.debug("New node found : {0}".format(peer.pubkey[:5]))
                     try:
-                        connector = NodeConnector.from_peer(self.currency, peer, self._app.parameters)
+                        connector = NodeConnector.from_peer(
+                            self.currency, peer, self._app.parameters
+                        )
                         node = connector.node
                         self._processor.insert_node(connector.node)
                         self.new_node_found.emit(node)
@@ -212,8 +247,12 @@ class NetworkService(QObject):
                 if self._blockchain_service.initialized():
                     self._processor.handle_success(node)
                     try:
-                        identity = await self._identities_service.find_from_pubkey(node.pubkey)
-                        identity = await self._identities_service.load_requirements(identity)
+                        identity = await self._identities_service.find_from_pubkey(
+                            node.pubkey
+                        )
+                        identity = await self._identities_service.load_requirements(
+                            identity
+                        )
                         node.member = identity.member
                         node.uid = identity.uid
                         self._processor.update_node(node)
@@ -224,13 +263,20 @@ class NetworkService(QObject):
     def handle_new_node(self, peer):
         key = VerifyingKey(peer.pubkey)
         if key.verify_document(peer):
-            if len(self._discovery_stack) < 1000 \
-               and peer.blockUID.number + 2400 > self.current_buid().number \
-               and peer.signatures not in [p.signatures[0] for p in self._discovery_stack]:
-                self._logger.debug("Stacking new peer document : {0}".format(peer.pubkey))
+            if (
+                len(self._discovery_stack) < 1000
+                and peer.blockUID.number + 2400 > self.current_buid().number
+                and peer.signatures
+                not in [p.signatures[0] for p in self._discovery_stack]
+            ):
+                self._logger.debug(
+                    "Stacking new peer document : {0}".format(peer.pubkey)
+                )
                 self._discovery_stack.append(peer)
         else:
-            self._logger.debug("Wrong document received : {0}".format(peer.signed_raw()))
+            self._logger.debug(
+                "Wrong document received : {0}".format(peer.signed_raw())
+            )
 
     @pyqtSlot()
     def handle_identity_change(self):
@@ -267,9 +313,13 @@ class NetworkService(QObject):
                     for head_data in r["heads"]:
                         try:
                             if "messageV2" in head_data:
-                                head, _ = HeadV2.from_inline(head_data["messageV2"], head_data["sigV2"])
+                                head, _ = HeadV2.from_inline(
+                                    head_data["messageV2"], head_data["sigV2"]
+                                )
                             else:
-                                head, _ = HeadV1.from_inline(head_data["message"], head_data["sig"])
+                                head, _ = HeadV1.from_inline(
+                                    head_data["message"], head_data["sig"]
+                                )
 
                             VerifyingKey(head.pubkey).verify_ws2p_head(head)
                             if head.pubkey in ws2p_heads:
@@ -288,13 +338,19 @@ class NetworkService(QObject):
         self._ws2p_heads_refreshing = False
 
         current_buid = self._processor.current_buid(self.currency)
-        self._logger.debug("{0} -> {1}".format(self._block_found.sha_hash[:10], current_buid.sha_hash[:10]))
+        self._logger.debug(
+            "{0} -> {1}".format(
+                self._block_found.sha_hash[:10], current_buid.sha_hash[:10]
+            )
+        )
         if self._block_found.sha_hash != current_buid.sha_hash:
             self._logger.debug("Latest block changed : {0}".format(current_buid.number))
             self.latest_block_changed.emit(current_buid)
             self._logger.debug("Start refresh")
             self._block_found = current_buid
-            asyncio.ensure_future(self._blockchain_service.handle_blockchain_progress(self._block_found))
+            asyncio.ensure_future(
+                self._blockchain_service.handle_blockchain_progress(self._block_found)
+            )
 
     def handle_change(self):
         node_connector = self.sender()
diff --git a/src/sakia/services/sources.py b/src/sakia/services/sources.py
index be0a2db94cfef00fd6b150f53c49ca1a1d3179e6..70ac3b7b75adb98f210f2d8f4476bf8d97d8e06a 100644
--- a/src/sakia/services/sources.py
+++ b/src/sakia/services/sources.py
@@ -1,203 +1,243 @@
-from PyQt5.QtCore import QObject
-from duniterpy.api import bma, errors
-from duniterpy.documents import Transaction as TransactionDoc
-from duniterpy.grammars.output import Condition
-from duniterpy.documents import BlockUID
-import logging
-import pypeg2
-from sakia.data.entities import Source, Transaction,Dividend
-import hashlib
-
-
-class SourcesServices(QObject):
-    """
-    Source service is managing sources received
-    to update data locally
-    """
-    def __init__(self, currency, sources_processor, connections_processor,
-                 transactions_processor, blockchain_processor, bma_connector):
-        """
-        Constructor the identities service
-
-        :param str currency: The currency name of the community
-        :param sakia.data.processors.SourcesProcessor sources_processor: the sources processor for given currency
-        :param sakia.data.processors.ConnectionsProcessor connections_processor: the connections processor
-        :param sakia.data.processors.TransactionsProcessor transactions_processor: the transactions processor
-        :param sakia.data.processors.BlockchainProcessor blockchain_processor: the blockchain processor
-        :param sakia.data.connectors.BmaConnector bma_connector: The connector to BMA API
-        """
-        super().__init__()
-        self._sources_processor = sources_processor
-        self._connections_processor = connections_processor
-        self._transactions_processor = transactions_processor
-        self._blockchain_processor = blockchain_processor
-        self._bma_connector = bma_connector
-        self.currency = currency
-        self._logger = logging.getLogger('sakia')
-
-    def amount(self, pubkey):
-        return self._sources_processor.amount(self.currency, pubkey)
-
-    def parse_transaction_outputs(self, pubkey, transaction):
-        """
-        Parse a transaction
-        :param sakia.data.entities.Transaction transaction:
-        """
-        txdoc = TransactionDoc.from_signed_raw(transaction.raw)
-        for offset, output in enumerate(txdoc.outputs):
-            if output.conditions.left.pubkey == pubkey:
-                source = Source(currency=self.currency,
-                                pubkey=pubkey,
-                                identifier=txdoc.sha_hash,
-                                type='T',
-                                noffset=offset,
-                                amount=output.amount,
-                                base=output.base)
-                self._sources_processor.insert(source)
-
-    def parse_transaction_inputs(self, pubkey, transaction):
-        """
-        Parse a transaction
-        :param sakia.data.entities.Transaction transaction:
-        """
-        txdoc = TransactionDoc.from_signed_raw(transaction.raw)
-        for index, input in enumerate(txdoc.inputs):
-            source = Source(currency=self.currency,
-                            pubkey=txdoc.issuers[0],
-                            identifier=input.origin_id,
-                            type=input.source,
-                            noffset=input.index,
-                            amount=input.amount,
-                            base=input.base)
-            if source.pubkey == pubkey:
-                self._sources_processor.drop(source)
-
-    def _parse_ud(self, pubkey, dividend):
-        """
-        :param str pubkey:
-        :param sakia.data.entities.Dividend dividend:
-        :return:
-        """
-        source = Source(currency=self.currency,
-                        pubkey=pubkey,
-                        identifier=pubkey,
-                        type='D',
-                        noffset=dividend.block_number,
-                        amount=dividend.amount,
-                        base=dividend.base)
-        self._sources_processor.insert(source)
-
-    async def initialize_sources(self, pubkey, log_stream, progress):
-        sources_data = await self._bma_connector.get(self.currency, bma.tx.sources, req_args={'pubkey': pubkey})
-        nb_sources = len(sources_data["sources"])
-        for i, s in enumerate(sources_data["sources"]):
-            log_stream("Parsing source ud/tx {:}/{:}".format(i, nb_sources))
-            progress(1/nb_sources)
-            conditions = pypeg2.parse(s["conditions"], Condition)
-            if conditions.left.pubkey == pubkey:
-                try:
-                    if conditions.left.pubkey == pubkey:
-                        source = Source(currency=self.currency,
-                                        pubkey=pubkey,
-                                        identifier=s["identifier"],
-                                        type=s["type"],
-                                        noffset=s["noffset"],
-                                        amount=s["amount"],
-                                        base=s["base"])
-                        self._sources_processor.insert(source)
-                except AttributeError as e:
-                    self._logger.error(str(e))
-
-    async def check_destruction(self, pubkey, block_number, unit_base):
-        amount = self._sources_processor.amount(self.currency, pubkey)
-        if amount < 100 * 10 ** unit_base:
-            if self._sources_processor.available(self.currency, pubkey):
-                self._sources_processor.drop_all_of(self.currency, pubkey)
-                timestamp = await self._blockchain_processor.timestamp(self.currency, block_number)
-                next_txid = self._transactions_processor.next_txid(self.currency, block_number)
-                sha_identifier = hashlib.sha256("Destruction{0}{1}{2}".format(block_number, pubkey, amount).encode("ascii")).hexdigest().upper()
-                destruction = Transaction(currency=self.currency,
-                                          pubkey=pubkey,
-                                          sha_hash=sha_identifier,
-                                          written_block=block_number,
-                                          blockstamp=BlockUID.empty(),
-                                          timestamp=timestamp,
-                                          signatures=[],
-                                          issuers=[pubkey],
-                                          receivers=[],
-                                          amount=amount,
-                                          amount_base=0,
-                                          comment="Too low balance",
-                                          txid=next_txid,
-                                          state=Transaction.VALIDATED,
-                                          local=True,
-                                          raw="")
-                self._transactions_processor.commit(destruction)
-                return destruction
-
-    async def refresh_sources_of_pubkey(self, pubkey):
-        """
-        Refresh the sources for a given pubkey
-        :param str pubkey:
-        :return: the destruction of sources
-        """
-        sources_data = await self._bma_connector.get(self.currency, bma.tx.sources, req_args={'pubkey': pubkey})
-        self._sources_processor.drop_all_of(self.currency, pubkey)
-        for i, s in enumerate(sources_data["sources"]):
-            conditions = pypeg2.parse(s["conditions"], Condition)
-            if conditions.left.pubkey == pubkey:
-                try:
-                    if conditions.left.pubkey == pubkey:
-                        source = Source(currency=self.currency,
-                                        pubkey=pubkey,
-                                        identifier=s["identifier"],
-                                        type=s["type"],
-                                        noffset=s["noffset"],
-                                        amount=s["amount"],
-                                        base=s["base"])
-                        self._sources_processor.insert(source)
-                except AttributeError as e:
-                    self._logger.error(str(e))
-
-    async def refresh_sources(self, connections):
-        """
-
-        :param list[sakia.data.entities.Connection] connections:
-        :param dict[sakia.data.entities.Transaction] transactions:
-        :param dict[sakia.data.entities.Dividend] dividends:
-        :return: the destruction of sources
-        """
-        for conn in connections:
-            _, current_base = self._blockchain_processor.last_ud(self.currency)
-            # there can be bugs if the current base switch during the parsing of blocks
-            # but since it only happens every 23 years and that its only on accounts having less than 100
-            # this is acceptable I guess
-
-            await self.refresh_sources_of_pubkey(conn.pubkey)
-
-    def restore_sources(self, pubkey, tx):
-        """
-        Restore the sources of a cancelled tx
-        :param sakia.entities.Transaction tx:
-        """
-        txdoc = TransactionDoc.from_signed_raw(tx.raw)
-        for offset, output in enumerate(txdoc.outputs):
-            if output.conditions.left.pubkey == pubkey:
-                source = Source(currency=self.currency,
-                                pubkey=pubkey,
-                                identifier=txdoc.sha_hash,
-                                type='T',
-                                noffset=offset,
-                                amount=output.amount,
-                                base=output.base)
-                self._sources_processor.drop(source)
-        for index, input in enumerate(txdoc.inputs):
-            source = Source(currency=self.currency,
-                            pubkey=txdoc.issuers[0],
-                            identifier=input.origin_id,
-                            type=input.source,
-                            noffset=input.index,
-                            amount=input.amount,
-                            base=input.base)
-            if source.pubkey == pubkey:
-                self._sources_processor.insert(source)
+from PyQt5.QtCore import QObject
+from duniterpy.api import bma, errors
+from duniterpy.documents import Transaction as TransactionDoc
+from duniterpy.grammars.output import Condition
+from duniterpy.documents import BlockUID
+import logging
+import pypeg2
+from sakia.data.entities import Source, Transaction, Dividend
+import hashlib
+
+
+class SourcesServices(QObject):
+    """
+    Source service is managing sources received
+    to update data locally
+    """
+
+    def __init__(
+        self,
+        currency,
+        sources_processor,
+        connections_processor,
+        transactions_processor,
+        blockchain_processor,
+        bma_connector,
+    ):
+        """
+        Constructor the identities service
+
+        :param str currency: The currency name of the community
+        :param sakia.data.processors.SourcesProcessor sources_processor: the sources processor for given currency
+        :param sakia.data.processors.ConnectionsProcessor connections_processor: the connections processor
+        :param sakia.data.processors.TransactionsProcessor transactions_processor: the transactions processor
+        :param sakia.data.processors.BlockchainProcessor blockchain_processor: the blockchain processor
+        :param sakia.data.connectors.BmaConnector bma_connector: The connector to BMA API
+        """
+        super().__init__()
+        self._sources_processor = sources_processor
+        self._connections_processor = connections_processor
+        self._transactions_processor = transactions_processor
+        self._blockchain_processor = blockchain_processor
+        self._bma_connector = bma_connector
+        self.currency = currency
+        self._logger = logging.getLogger("sakia")
+
+    def amount(self, pubkey):
+        return self._sources_processor.amount(self.currency, pubkey)
+
+    def parse_transaction_outputs(self, pubkey, transaction):
+        """
+        Parse a transaction
+        :param sakia.data.entities.Transaction transaction:
+        """
+        txdoc = TransactionDoc.from_signed_raw(transaction.raw)
+        for offset, output in enumerate(txdoc.outputs):
+            if output.conditions.left.pubkey == pubkey:
+                source = Source(
+                    currency=self.currency,
+                    pubkey=pubkey,
+                    identifier=txdoc.sha_hash,
+                    type="T",
+                    noffset=offset,
+                    amount=output.amount,
+                    base=output.base,
+                )
+                self._sources_processor.insert(source)
+
+    def parse_transaction_inputs(self, pubkey, transaction):
+        """
+        Parse a transaction
+        :param sakia.data.entities.Transaction transaction:
+        """
+        txdoc = TransactionDoc.from_signed_raw(transaction.raw)
+        for index, input in enumerate(txdoc.inputs):
+            source = Source(
+                currency=self.currency,
+                pubkey=txdoc.issuers[0],
+                identifier=input.origin_id,
+                type=input.source,
+                noffset=input.index,
+                amount=input.amount,
+                base=input.base,
+            )
+            if source.pubkey == pubkey:
+                self._sources_processor.drop(source)
+
+    def _parse_ud(self, pubkey, dividend):
+        """
+        :param str pubkey:
+        :param sakia.data.entities.Dividend dividend:
+        :return:
+        """
+        source = Source(
+            currency=self.currency,
+            pubkey=pubkey,
+            identifier=pubkey,
+            type="D",
+            noffset=dividend.block_number,
+            amount=dividend.amount,
+            base=dividend.base,
+        )
+        self._sources_processor.insert(source)
+
+    async def initialize_sources(self, pubkey, log_stream, progress):
+        sources_data = await self._bma_connector.get(
+            self.currency, bma.tx.sources, req_args={"pubkey": pubkey}
+        )
+        nb_sources = len(sources_data["sources"])
+        for i, s in enumerate(sources_data["sources"]):
+            log_stream("Parsing source ud/tx {:}/{:}".format(i, nb_sources))
+            progress(1 / nb_sources)
+            conditions = pypeg2.parse(s["conditions"], Condition)
+            if conditions.left.pubkey == pubkey:
+                try:
+                    if conditions.left.pubkey == pubkey:
+                        source = Source(
+                            currency=self.currency,
+                            pubkey=pubkey,
+                            identifier=s["identifier"],
+                            type=s["type"],
+                            noffset=s["noffset"],
+                            amount=s["amount"],
+                            base=s["base"],
+                        )
+                        self._sources_processor.insert(source)
+                except AttributeError as e:
+                    self._logger.error(str(e))
+
+    async def check_destruction(self, pubkey, block_number, unit_base):
+        amount = self._sources_processor.amount(self.currency, pubkey)
+        if amount < 100 * 10 ** unit_base:
+            if self._sources_processor.available(self.currency, pubkey):
+                self._sources_processor.drop_all_of(self.currency, pubkey)
+                timestamp = await self._blockchain_processor.timestamp(
+                    self.currency, block_number
+                )
+                next_txid = self._transactions_processor.next_txid(
+                    self.currency, block_number
+                )
+                sha_identifier = (
+                    hashlib.sha256(
+                        "Destruction{0}{1}{2}".format(
+                            block_number, pubkey, amount
+                        ).encode("ascii")
+                    )
+                    .hexdigest()
+                    .upper()
+                )
+                destruction = Transaction(
+                    currency=self.currency,
+                    pubkey=pubkey,
+                    sha_hash=sha_identifier,
+                    written_block=block_number,
+                    blockstamp=BlockUID.empty(),
+                    timestamp=timestamp,
+                    signatures=[],
+                    issuers=[pubkey],
+                    receivers=[],
+                    amount=amount,
+                    amount_base=0,
+                    comment="Too low balance",
+                    txid=next_txid,
+                    state=Transaction.VALIDATED,
+                    local=True,
+                    raw="",
+                )
+                self._transactions_processor.commit(destruction)
+                return destruction
+
+    async def refresh_sources_of_pubkey(self, pubkey):
+        """
+        Refresh the sources for a given pubkey
+        :param str pubkey:
+        :return: the destruction of sources
+        """
+        sources_data = await self._bma_connector.get(
+            self.currency, bma.tx.sources, req_args={"pubkey": pubkey}
+        )
+        self._sources_processor.drop_all_of(self.currency, pubkey)
+        for i, s in enumerate(sources_data["sources"]):
+            conditions = pypeg2.parse(s["conditions"], Condition)
+            if conditions.left.pubkey == pubkey:
+                try:
+                    if conditions.left.pubkey == pubkey:
+                        source = Source(
+                            currency=self.currency,
+                            pubkey=pubkey,
+                            identifier=s["identifier"],
+                            type=s["type"],
+                            noffset=s["noffset"],
+                            amount=s["amount"],
+                            base=s["base"],
+                        )
+                        self._sources_processor.insert(source)
+                except AttributeError as e:
+                    self._logger.error(str(e))
+
+    async def refresh_sources(self, connections):
+        """
+
+        :param list[sakia.data.entities.Connection] connections:
+        :param dict[sakia.data.entities.Transaction] transactions:
+        :param dict[sakia.data.entities.Dividend] dividends:
+        :return: the destruction of sources
+        """
+        for conn in connections:
+            _, current_base = self._blockchain_processor.last_ud(self.currency)
+            # there can be bugs if the current base switch during the parsing of blocks
+            # but since it only happens every 23 years and that its only on accounts having less than 100
+            # this is acceptable I guess
+
+            await self.refresh_sources_of_pubkey(conn.pubkey)
+
+    def restore_sources(self, pubkey, tx):
+        """
+        Restore the sources of a cancelled tx
+        :param sakia.entities.Transaction tx:
+        """
+        txdoc = TransactionDoc.from_signed_raw(tx.raw)
+        for offset, output in enumerate(txdoc.outputs):
+            if output.conditions.left.pubkey == pubkey:
+                source = Source(
+                    currency=self.currency,
+                    pubkey=pubkey,
+                    identifier=txdoc.sha_hash,
+                    type="T",
+                    noffset=offset,
+                    amount=output.amount,
+                    base=output.base,
+                )
+                self._sources_processor.drop(source)
+        for index, input in enumerate(txdoc.inputs):
+            source = Source(
+                currency=self.currency,
+                pubkey=txdoc.issuers[0],
+                identifier=input.origin_id,
+                type=input.source,
+                noffset=input.index,
+                amount=input.amount,
+                base=input.base,
+            )
+            if source.pubkey == pubkey:
+                self._sources_processor.insert(source)
diff --git a/src/sakia/services/transactions.py b/src/sakia/services/transactions.py
index c865061ba00a35a311550303b69ee97f87be5514..ca2c91f59c47762a0b03b94053c1a25bc5fab22f 100644
--- a/src/sakia/services/transactions.py
+++ b/src/sakia/services/transactions.py
@@ -1,5 +1,9 @@
 from PyQt5.QtCore import QObject
-from sakia.data.entities.transaction import parse_transaction_doc, Transaction, build_stopline
+from sakia.data.entities.transaction import (
+    parse_transaction_doc,
+    Transaction,
+    build_stopline,
+)
 from duniterpy.documents import Transaction as TransactionDoc
 from duniterpy.documents import SimpleTransaction, Block
 from sakia.data.entities import Dividend
@@ -13,8 +17,16 @@ class TransactionsService(QObject):
     Transaction service is managing sources received
     to update data locally
     """
-    def __init__(self, currency, transactions_processor, dividends_processor,
-                 identities_processor, connections_processor, bma_connector):
+
+    def __init__(
+        self,
+        currency,
+        transactions_processor,
+        dividends_processor,
+        identities_processor,
+        connections_processor,
+        bma_connector,
+    ):
         """
         Constructor the identities service
 
@@ -32,7 +44,7 @@ class TransactionsService(QObject):
         self._connections_processor = connections_processor
         self._bma_connector = bma_connector
         self.currency = currency
-        self._logger = logging.getLogger('sakia')
+        self._logger = logging.getLogger("sakia")
 
     def parse_sent_transaction(self, pubkey, transaction):
         """
@@ -42,8 +54,13 @@ class TransactionsService(QObject):
         """
         if not self._transactions_processor.find_by_hash(pubkey, transaction.sha_hash):
             txid = self._transactions_processor.next_txid(transaction.currency, -1)
-            tx = parse_transaction_doc(transaction.txdoc(), pubkey,
-                                       transaction.blockstamp.number,  transaction.timestamp, txid+1)
+            tx = parse_transaction_doc(
+                transaction.txdoc(),
+                pubkey,
+                transaction.blockstamp.number,
+                transaction.timestamp,
+                txid + 1,
+            )
             if tx:
                 tx.state = Transaction.AWAITING
                 self._transactions_processor.commit(tx)
@@ -53,7 +70,9 @@ class TransactionsService(QObject):
 
     def insert_stopline(self, connections, block_number, time):
         for conn in connections:
-            self._transactions_processor.commit(build_stopline(conn.currency, conn.pubkey, block_number, time))
+            self._transactions_processor.commit(
+                build_stopline(conn.currency, conn.pubkey, block_number, time)
+            )
 
     async def handle_new_blocks(self, connections, start, end):
         """
@@ -62,8 +81,12 @@ class TransactionsService(QObject):
         :param list[duniterpy.documents.Block] blocks: The blocks containing data to parse
         """
         self._logger.debug("Refresh transactions")
-        transfers_changed, new_transfers = await self.parse_transactions_history(connections, start, end)
-        new_dividends = await self.parse_dividends_history(connections, start, end, new_transfers)
+        transfers_changed, new_transfers = await self.parse_transactions_history(
+            connections, start, end
+        )
+        new_dividends = await self.parse_dividends_history(
+            connections, start, end, new_transfers
+        )
         return transfers_changed, new_transfers, new_dividends
 
     async def parse_transactions_history(self, connections, start, end):
@@ -78,21 +101,36 @@ class TransactionsService(QObject):
         for connection in connections:
             txid = 0
             new_transfers[connection] = []
-            history_data = await self._bma_connector.get(self.currency, bma.tx.blocks,
-                                                         req_args={'pubkey': connection.pubkey,
-                                                                   'start': start,
-                                                                   'end': end})
+            history_data = await self._bma_connector.get(
+                self.currency,
+                bma.tx.blocks,
+                req_args={"pubkey": connection.pubkey, "start": start, "end": end},
+            )
             for tx_data in history_data["history"]["sent"]:
-                for tx in [t for t in self._transactions_processor.awaiting(self.currency)]:
-                    if self._transactions_processor.run_state_transitions(tx, tx_data["hash"], tx_data["block_number"]):
+                for tx in [
+                    t for t in self._transactions_processor.awaiting(self.currency)
+                ]:
+                    if self._transactions_processor.run_state_transitions(
+                        tx, tx_data["hash"], tx_data["block_number"]
+                    ):
                         transfers_changed.append(tx)
-                        self._logger.debug("New transaction validated : {0}".format(tx.sha_hash))
+                        self._logger.debug(
+                            "New transaction validated : {0}".format(tx.sha_hash)
+                        )
             for tx_data in history_data["history"]["received"]:
-                tx_doc = TransactionDoc.from_bma_history(history_data["currency"], tx_data)
-                if not self._transactions_processor.find_by_hash(connection.pubkey, tx_doc.sha_hash) \
-                    and SimpleTransaction.is_simple(tx_doc):
-                    tx = parse_transaction_doc(tx_doc, connection.pubkey, tx_data["block_number"],
-                                               tx_data["time"], txid)
+                tx_doc = TransactionDoc.from_bma_history(
+                    history_data["currency"], tx_data
+                )
+                if not self._transactions_processor.find_by_hash(
+                    connection.pubkey, tx_doc.sha_hash
+                ) and SimpleTransaction.is_simple(tx_doc):
+                    tx = parse_transaction_doc(
+                        tx_doc,
+                        connection.pubkey,
+                        tx_data["block_number"],
+                        tx_data["time"],
+                        txid,
+                    )
                     if tx:
                         new_transfers[connection].append(tx)
                         self._transactions_processor.commit(tx)
@@ -110,18 +148,23 @@ class TransactionsService(QObject):
         dividends = {}
         for connection in connections:
             dividends[connection] = []
-            history_data = await self._bma_connector.get(self.currency, bma.ud.history,
-                                                         req_args={'pubkey': connection.pubkey})
+            history_data = await self._bma_connector.get(
+                self.currency, bma.ud.history, req_args={"pubkey": connection.pubkey}
+            )
             block_numbers = []
             for ud_data in history_data["history"]["history"]:
-                dividend = Dividend(currency=self.currency,
-                                    pubkey=connection.pubkey,
-                                    block_number=ud_data["block_number"],
-                                    timestamp=ud_data["time"],
-                                    amount=ud_data["amount"],
-                                    base=ud_data["base"])
+                dividend = Dividend(
+                    currency=self.currency,
+                    pubkey=connection.pubkey,
+                    block_number=ud_data["block_number"],
+                    timestamp=ud_data["time"],
+                    amount=ud_data["amount"],
+                    base=ud_data["base"],
+                )
                 if start <= dividend.block_number <= end:
-                    self._logger.debug("Dividend of block {0}".format(dividend.block_number))
+                    self._logger.debug(
+                        "Dividend of block {0}".format(dividend.block_number)
+                    )
                     block_numbers.append(dividend.block_number)
                     if self._dividends_processor.commit(dividend):
                         dividends[connection].append(dividend)
@@ -130,17 +173,30 @@ class TransactionsService(QObject):
                 txdoc = TransactionDoc.from_signed_raw(tx.raw)
                 for input in txdoc.inputs:
                     # For each dividends inputs, if it is consumed (not present in ud history)
-                    if input.source == "D" and input.origin_id == connection.pubkey and input.index not in block_numbers:
-                        block_data = await self._bma_connector.get(self.currency, bma.blockchain.block,
-                                                              req_args={'number': input.index})
-                        block = Block.from_signed_raw(block_data["raw"] + block_data["signature"] + "\n")
-                        dividend = Dividend(currency=self.currency,
-                                            pubkey=connection.pubkey,
-                                            block_number=input.index,
-                                            timestamp=block.mediantime,
-                                            amount=block.ud,
-                                            base=block.unit_base)
-                        self._logger.debug("Dividend of block {0}".format(dividend.block_number))
+                    if (
+                        input.source == "D"
+                        and input.origin_id == connection.pubkey
+                        and input.index not in block_numbers
+                    ):
+                        block_data = await self._bma_connector.get(
+                            self.currency,
+                            bma.blockchain.block,
+                            req_args={"number": input.index},
+                        )
+                        block = Block.from_signed_raw(
+                            block_data["raw"] + block_data["signature"] + "\n"
+                        )
+                        dividend = Dividend(
+                            currency=self.currency,
+                            pubkey=connection.pubkey,
+                            block_number=input.index,
+                            timestamp=block.mediantime,
+                            amount=block.ud,
+                            base=block.unit_base,
+                        )
+                        self._logger.debug(
+                            "Dividend of block {0}".format(dividend.block_number)
+                        )
                         if self._dividends_processor.commit(dividend):
                             dividends[connection].append(dividend)
         return dividends
@@ -161,4 +217,4 @@ class TransactionsService(QObject):
         :return: the list of Dividend entities
         :rtype: List[sakia.data.entities.Dividend]
         """
-        return self._dividends_processor.dividends(self.currency, pubkey)
\ No newline at end of file
+        return self._dividends_processor.dividends(self.currency, pubkey)
diff --git a/tests/conftest.py b/tests/conftest.py
index adf119901e38ed47e99622ed3bc0bbc00104866a..5a6a09ff197bd0b2cde0b33ca02d0593a28c7f13 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -7,7 +7,7 @@ import sys
 import os
 import locale
 
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src')))
+sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
 
 from sakia.constants import ROOT_SERVERS
 from duniterpy.documents import BlockUID
@@ -21,12 +21,15 @@ from sakia.services import DocumentsService
 
 _application_ = []
 
+
 @pytest.yield_fixture
 def event_loop():
     qapplication = get_application()
     loop = quamash.QSelectorEventLoop(qapplication)
     exceptions = []
-    loop.set_exception_handler(lambda l, c: unitttest_exception_handler(exceptions, l, c))
+    loop.set_exception_handler(
+        lambda l, c: unitttest_exception_handler(exceptions, l, c)
+    )
     yield loop
     try:
         loop.close()
@@ -43,11 +46,18 @@ def meta_repo(version=0):
     sqlite3.register_adapter(bool, int)
     sqlite3.register_converter("BOOLEAN", lambda v: bool(int(v)))
     con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_DECLTYPES)
-    meta_repo = SakiaDatabase(con,
-                              ConnectionsRepo(con), IdentitiesRepo(con),
-                              BlockchainsRepo(con), CertificationsRepo(con), TransactionsRepo(con),
-                              NodesRepo(con), SourcesRepo(con), DividendsRepo(con),
-                              ContactsRepo(con))
+    meta_repo = SakiaDatabase(
+        con,
+        ConnectionsRepo(con),
+        IdentitiesRepo(con),
+        BlockchainsRepo(con),
+        CertificationsRepo(con),
+        TransactionsRepo(con),
+        NodesRepo(con),
+        SourcesRepo(con),
+        DividendsRepo(con),
+        ContactsRepo(con),
+    )
     meta_repo.prepare()
     meta_repo.upgrade_database(version)
     return meta_repo
@@ -67,73 +77,100 @@ def app_data(sakia_options):
 def user_parameters():
     return UserParameters()
 
+
 @pytest.fixture
 def plugins_dir(sakia_options):
     return PluginsDirectory.in_config_path(sakia_options.config_path).load_or_init()
 
+
 @pytest.fixture
-def application(event_loop, meta_repo, sakia_options, app_data, user_parameters, plugins_dir):
-
-    ROOT_SERVERS["test_currency"] = {'display': "Fake Currency", 'nodes': []}
-    app = Application(qapp=get_application(),
-                      loop=event_loop,
-                      options=sakia_options,
-                      app_data=app_data,
-                      parameters=user_parameters,
-                      db=meta_repo,
-                      currency="test_currency",
-                      plugins_dir=plugins_dir)
+def application(
+    event_loop, meta_repo, sakia_options, app_data, user_parameters, plugins_dir
+):
+
+    ROOT_SERVERS["test_currency"] = {"display": "Fake Currency", "nodes": []}
+    app = Application(
+        qapp=get_application(),
+        loop=event_loop,
+        options=sakia_options,
+        app_data=app_data,
+        parameters=user_parameters,
+        db=meta_repo,
+        currency="test_currency",
+        plugins_dir=plugins_dir,
+    )
     return app
 
 
 @pytest.fixture()
 def simple_forge():
-    return mirage.BlockForge.start("test_currency", "12356", "123456", ScryptParams(2 ** 12, 16, 1))
+    return mirage.BlockForge.start(
+        "test_currency", "12356", "123456", ScryptParams(2 ** 12, 16, 1)
+    )
 
 
 @pytest.fixture
 def fake_server(application, event_loop):
-    server = event_loop.run_until_complete(mirage.Node.start(None, "test_currency", "12356", "123456", event_loop))
-
-    application.db.nodes_repo.insert(Node(currency=server.forge.currency,
-                                          pubkey=server.forge.key.pubkey,
-                                          endpoints=server.peer_doc().endpoints,
-                                          peer_blockstamp=server.peer_doc().blockUID,
-                                          uid="",
-                                          current_buid=BlockUID.empty(),
-                                          current_ts=0,
-                                          state=0,
-                                          software="duniter",
-                                          version="0.40.2"))
+    server = event_loop.run_until_complete(
+        mirage.Node.start(None, "test_currency", "12356", "123456", event_loop)
+    )
+
+    application.db.nodes_repo.insert(
+        Node(
+            currency=server.forge.currency,
+            pubkey=server.forge.key.pubkey,
+            endpoints=server.peer_doc().endpoints,
+            peer_blockstamp=server.peer_doc().blockUID,
+            uid="",
+            current_buid=BlockUID.empty(),
+            current_ts=0,
+            state=0,
+            software="duniter",
+            version="0.40.2",
+        )
+    )
     application.instanciate_services()
     return server
 
 
 @pytest.fixture
 def alice():
-    return mirage.User.create("test_currency", "alice", "alicesalt", "alicepassword", BlockUID.empty())
+    return mirage.User.create(
+        "test_currency", "alice", "alicesalt", "alicepassword", BlockUID.empty()
+    )
 
 
 @pytest.fixture
 def bob():
-    return mirage.User.create("test_currency", "bob", "bobsalt", "bobpassword", BlockUID.empty())
+    return mirage.User.create(
+        "test_currency", "bob", "bobsalt", "bobpassword", BlockUID.empty()
+    )
 
 
 @pytest.fixture
 def john(simple_blockchain_forge):
     # John is not written in the blockchain
-    return mirage.User.create("test_currency", "john", "johnsalt", "johnpassword",
-                              simple_blockchain_forge.blocks[-1].blockUID)
+    return mirage.User.create(
+        "test_currency",
+        "john",
+        "johnsalt",
+        "johnpassword",
+        simple_blockchain_forge.blocks[-1].blockUID,
+    )
 
 
 @pytest.fixture
 def wrong_bob_uid():
-    return mirage.User.create("test_currency", "wrong_bob", "bobsalt", "bobpassword", BlockUID.empty())
+    return mirage.User.create(
+        "test_currency", "wrong_bob", "bobsalt", "bobpassword", BlockUID.empty()
+    )
 
 
 @pytest.fixture
 def wrong_bob_pubkey():
-    return mirage.User.create("test_currency", "bob", "wrongbobsalt", "bobpassword", BlockUID.empty())
+    return mirage.User.create(
+        "test_currency", "bob", "wrongbobsalt", "bobpassword", BlockUID.empty()
+    )
 
 
 @pytest.fixture
@@ -148,9 +185,13 @@ def simple_blockchain_forge(simple_forge, alice, bob):
     simple_forge.set_member(alice.key.pubkey, True)
     simple_forge.set_member(bob.key.pubkey, True)
     for i in range(0, 10):
-        new_user = mirage.User.create("test_currency", "user{0}".format(i),
-                                       "salt{0}".format(i), "password{0}".format(i),
-                                      simple_forge.blocks[-1].blockUID)
+        new_user = mirage.User.create(
+            "test_currency",
+            "user{0}".format(i),
+            "salt{0}".format(i),
+            "password{0}".format(i),
+            simple_forge.blocks[-1].blockUID,
+        )
         simple_forge.push(new_user.identity())
         simple_forge.push(new_user.join(simple_forge.blocks[-1].blockUID))
         simple_forge.forge_block()
@@ -180,87 +221,109 @@ def application_with_one_connection(application, simple_blockchain_forge, bob):
     last_ud_block = [b for b in simple_blockchain_forge.blocks if b.ud][-1]
     previous_ud_block = [b for b in simple_blockchain_forge.blocks if b.ud][-2]
     origin_block = simple_blockchain_forge.blocks[0]
-    connection = Connection(currency="test_currency",
-                      pubkey=bob.key.pubkey, uid=bob.uid,
-                      scrypt_N=mirage.User.SCRYPT_PARAMS.N,
-                      scrypt_r=mirage.User.SCRYPT_PARAMS.r,
-                      scrypt_p=mirage.User.SCRYPT_PARAMS.p,
-                      blockstamp=bob.blockstamp)
+    connection = Connection(
+        currency="test_currency",
+        pubkey=bob.key.pubkey,
+        uid=bob.uid,
+        scrypt_N=mirage.User.SCRYPT_PARAMS.N,
+        scrypt_r=mirage.User.SCRYPT_PARAMS.r,
+        scrypt_p=mirage.User.SCRYPT_PARAMS.p,
+        blockstamp=bob.blockstamp,
+    )
     application.db.connections_repo.insert(connection)
 
     parameters = origin_block.parameters
     blockchain_parameters = BlockchainParameters(*parameters)
-    blockchain = Blockchain(parameters=blockchain_parameters,
-                            current_buid=current_block.blockUID,
-                            current_members_count=current_block.members_count,
-                            current_mass=simple_blockchain_forge.monetary_mass(current_block.number),
-                            median_time=current_block.mediantime,
-                            last_members_count=previous_ud_block.members_count,
-                            last_ud=last_ud_block.ud,
-                            last_ud_base=last_ud_block.unit_base,
-                            last_ud_time=last_ud_block.mediantime,
-                            previous_mass=simple_blockchain_forge.monetary_mass(previous_ud_block.number),
-                            previous_members_count=previous_ud_block.members_count,
-                            previous_ud=previous_ud_block.ud,
-                            previous_ud_base=previous_ud_block.unit_base,
-                            previous_ud_time=previous_ud_block.mediantime,
-                            currency=simple_blockchain_forge.currency)
+    blockchain = Blockchain(
+        parameters=blockchain_parameters,
+        current_buid=current_block.blockUID,
+        current_members_count=current_block.members_count,
+        current_mass=simple_blockchain_forge.monetary_mass(current_block.number),
+        median_time=current_block.mediantime,
+        last_members_count=previous_ud_block.members_count,
+        last_ud=last_ud_block.ud,
+        last_ud_base=last_ud_block.unit_base,
+        last_ud_time=last_ud_block.mediantime,
+        previous_mass=simple_blockchain_forge.monetary_mass(previous_ud_block.number),
+        previous_members_count=previous_ud_block.members_count,
+        previous_ud=previous_ud_block.ud,
+        previous_ud_base=previous_ud_block.unit_base,
+        previous_ud_time=previous_ud_block.mediantime,
+        currency=simple_blockchain_forge.currency,
+    )
     application.db.blockchains_repo.insert(blockchain)
     for s in simple_blockchain_forge.user_identities[bob.key.pubkey].sources:
-        application.db.sources_repo.insert(Source(currency=simple_blockchain_forge.currency,
-                                                  pubkey=bob.key.pubkey,
-                                                  identifier=s.origin_id,
-                                                  noffset=s.index,
-                                                  type=s.source,
-                                                  amount=s.amount,
-                                                  base=s.base))
+        application.db.sources_repo.insert(
+            Source(
+                currency=simple_blockchain_forge.currency,
+                pubkey=bob.key.pubkey,
+                identifier=s.origin_id,
+                noffset=s.index,
+                type=s.source,
+                amount=s.amount,
+                base=s.base,
+            )
+        )
     bob_blockstamp = simple_blockchain_forge.user_identities[bob.key.pubkey].blockstamp
     bob_user_identity = simple_blockchain_forge.user_identities[bob.key.pubkey]
     bob_ms = bob_user_identity.memberships[-1]
-    bob_identity = Identity(currency=simple_blockchain_forge.currency,
-                            pubkey=bob.key.pubkey,
-                            uid=bob.uid,
-                            blockstamp=bob_blockstamp,
-                            signature=bob_user_identity.signature,
-                            timestamp=simple_blockchain_forge.blocks[bob_blockstamp.number].mediantime,
-                            written=True,
-                            revoked_on=0,
-                            member=bob_user_identity.member,
-                            membership_buid=bob_ms.blockstamp,
-                            membership_timestamp=simple_blockchain_forge.blocks[bob_ms.blockstamp.number].mediantime,
-                            membership_type=bob_ms.type,
-                            membership_written_on=simple_blockchain_forge.blocks[bob_ms.written_on].number)
+    bob_identity = Identity(
+        currency=simple_blockchain_forge.currency,
+        pubkey=bob.key.pubkey,
+        uid=bob.uid,
+        blockstamp=bob_blockstamp,
+        signature=bob_user_identity.signature,
+        timestamp=simple_blockchain_forge.blocks[bob_blockstamp.number].mediantime,
+        written=True,
+        revoked_on=0,
+        member=bob_user_identity.member,
+        membership_buid=bob_ms.blockstamp,
+        membership_timestamp=simple_blockchain_forge.blocks[
+            bob_ms.blockstamp.number
+        ].mediantime,
+        membership_type=bob_ms.type,
+        membership_written_on=simple_blockchain_forge.blocks[bob_ms.written_on].number,
+    )
     application.db.identities_repo.insert(bob_identity)
     application.switch_language()
 
     return application
 
 
-
 @pytest.fixture
-def application_with_two_connections(application_with_one_connection, big_blockchain_forge, bob, john):
-    connection = Connection(currency="test_currency",
-                      pubkey=john.key.pubkey, uid="",
-                      scrypt_N=mirage.User.SCRYPT_PARAMS.N,
-                      scrypt_r=mirage.User.SCRYPT_PARAMS.r,
-                      scrypt_p=mirage.User.SCRYPT_PARAMS.p,
-                      blockstamp=str(BlockUID.empty()))
+def application_with_two_connections(
+    application_with_one_connection, big_blockchain_forge, bob, john
+):
+    connection = Connection(
+        currency="test_currency",
+        pubkey=john.key.pubkey,
+        uid="",
+        scrypt_N=mirage.User.SCRYPT_PARAMS.N,
+        scrypt_r=mirage.User.SCRYPT_PARAMS.r,
+        scrypt_p=mirage.User.SCRYPT_PARAMS.p,
+        blockstamp=str(BlockUID.empty()),
+    )
     application_with_one_connection.db.connections_repo.insert(connection)
 
     for s in big_blockchain_forge.user_identities[bob.key.pubkey].sources:
         try:
-            application_with_one_connection.db.sources_repo.insert(Source(currency=big_blockchain_forge.currency,
-                                                  pubkey=bob.key.pubkey,
-                                                  identifier=s.origin_id,
-                                                  noffset=s.index,
-                                                  type=s.source,
-                                                  amount=s.amount,
-                                                  base=s.base))
+            application_with_one_connection.db.sources_repo.insert(
+                Source(
+                    currency=big_blockchain_forge.currency,
+                    pubkey=bob.key.pubkey,
+                    identifier=s.origin_id,
+                    noffset=s.index,
+                    type=s.source,
+                    amount=s.amount,
+                    base=s.base,
+                )
+            )
         except sqlite3.IntegrityError:
             pass
 
     return application_with_one_connection
 
+
 def unitttest_exception_handler(exceptions, loop, context):
     """
     An exception handler which exists the program if the exception
@@ -268,22 +331,23 @@ def unitttest_exception_handler(exceptions, loop, context):
     :param loop: the asyncio loop
     :param context: the exception context
     """
-    if 'exception' in context:
-        exception = context['exception']
+    if "exception" in context:
+        exception = context["exception"]
     else:
-        exception = BaseException(context['message'])
+        exception = BaseException(context["message"])
     exceptions.append(exception)
 
 
 def get_application():
     """Get the singleton QApplication"""
     from quamash import QApplication
+
     if not len(_application_):
         application = QApplication.instance()
         if not application:
             import sys
+
             application = QApplication(sys.argv)
         application.setQuitOnLastWindowClosed(False)
         _application_.append(application)
     return _application_[0]
-
diff --git a/tests/functional/test_certification_dialog.py b/tests/functional/test_certification_dialog.py
index 633f02da4c9be56c6aaaf06b6d862f8c8a436ffc..83ae63dbab2883083956336560060603f3856f97 100644
--- a/tests/functional/test_certification_dialog.py
+++ b/tests/functional/test_certification_dialog.py
@@ -9,8 +9,12 @@ from ..helpers import click_on_top_message_box_button
 
 
 @pytest.mark.asyncio
-async def test_certification_init_community(application_with_one_connection, fake_server_with_blockchain, bob, alice):
-    certification_dialog = CertificationController.create(None, application_with_one_connection)
+async def test_certification_init_community(
+    application_with_one_connection, fake_server_with_blockchain, bob, alice
+):
+    certification_dialog = CertificationController.create(
+        None, application_with_one_connection
+    )
 
     def close_dialog():
         if certification_dialog.view.isVisible():
@@ -18,14 +22,19 @@ async def test_certification_init_community(application_with_one_connection, fak
 
     async def exec_test():
         certification_dialog.model.connection.password = bob.password
-        QTest.keyClicks(certification_dialog.search_user.view.combobox_search.lineEdit(), "nothing")
+        QTest.keyClicks(
+            certification_dialog.search_user.view.combobox_search.lineEdit(), "nothing"
+        )
         await asyncio.sleep(1)
         certification_dialog.search_user.view.search("")
         await asyncio.sleep(1)
         assert certification_dialog.user_information.model.identity is None
         assert not certification_dialog.view.button_process.isEnabled()
         certification_dialog.search_user.view.combobox_search.lineEdit().clear()
-        QTest.keyClicks(certification_dialog.search_user.view.combobox_search.lineEdit(), alice.key.pubkey)
+        QTest.keyClicks(
+            certification_dialog.search_user.view.combobox_search.lineEdit(),
+            alice.key.pubkey,
+        )
         await asyncio.sleep(0.5)
         certification_dialog.search_user.view.search("")
         await asyncio.sleep(1)
@@ -38,10 +47,19 @@ async def test_certification_init_community(application_with_one_connection, fak
         await asyncio.sleep(0.5)
         QTest.mouseClick(certification_dialog.view.button_accept, Qt.LeftButton)
         await asyncio.sleep(0.5)
-        QTest.keyClicks(certification_dialog.password_input.view.edit_secret_key, bob.salt)
-        QTest.keyClicks(certification_dialog.password_input.view.edit_password, bob.password)
-        assert certification_dialog.view.button_box.button(QDialogButtonBox.Ok).isEnabled()
-        QTest.mouseClick(certification_dialog.view.button_box.button(QDialogButtonBox.Ok), Qt.LeftButton)
+        QTest.keyClicks(
+            certification_dialog.password_input.view.edit_secret_key, bob.salt
+        )
+        QTest.keyClicks(
+            certification_dialog.password_input.view.edit_password, bob.password
+        )
+        assert certification_dialog.view.button_box.button(
+            QDialogButtonBox.Ok
+        ).isEnabled()
+        QTest.mouseClick(
+            certification_dialog.view.button_box.button(QDialogButtonBox.Ok),
+            Qt.LeftButton,
+        )
         await asyncio.sleep(0.5)
         click_on_top_message_box_button(QMessageBox.Yes)
         await asyncio.sleep(0.5)
diff --git a/tests/functional/test_connection_cfg_dialog.py b/tests/functional/test_connection_cfg_dialog.py
index 54ebcf8204b20c24884d4c784d2cd4306fcc5e25..ab9f176ebf94b0f8b250a6313a5837d4247177cb 100644
--- a/tests/functional/test_connection_cfg_dialog.py
+++ b/tests/functional/test_connection_cfg_dialog.py
@@ -17,7 +17,9 @@ def assert_key_parameters_behaviour(connection_config_dialog, user):
     QTest.keyClicks(connection_config_dialog.view.edit_password, user.password)
     assert connection_config_dialog.view.button_next.isEnabled() is False
     assert connection_config_dialog.view.button_generate.isEnabled() is False
-    QTest.keyClicks(connection_config_dialog.view.edit_password_repeat, user.password + "wrong")
+    QTest.keyClicks(
+        connection_config_dialog.view.edit_password_repeat, user.password + "wrong"
+    )
     assert connection_config_dialog.view.button_next.isEnabled() is False
     assert connection_config_dialog.view.button_generate.isEnabled() is False
     connection_config_dialog.view.edit_password_repeat.setText("")
@@ -39,8 +41,12 @@ async def test_register_empty_blockchain(application, fake_server, bob, tmpdir):
     tmpdir.mkdir("test_register")
     revocation_file = tmpdir.join("test_register").join("revocation.txt")
     identity_file = tmpdir.join("test_register").join("identity.txt")
-    await BlockchainProcessor.instanciate(application).initialize_blockchain(application.currency)
-    connection_config_dialog = ConnectionConfigController.create_connection(None, application)
+    await BlockchainProcessor.instanciate(application).initialize_blockchain(
+        application.currency
+    )
+    connection_config_dialog = ConnectionConfigController.create_connection(
+        None, application
+    )
 
     def close_dialog():
         if connection_config_dialog.view.isVisible():
@@ -52,7 +58,10 @@ async def test_register_empty_blockchain(application, fake_server, bob, tmpdir):
         QTest.mouseClick(connection_config_dialog.view.button_accept, Qt.LeftButton)
         await asyncio.sleep(0.1)
 
-        assert connection_config_dialog.view.stacked_pages.currentWidget() == connection_config_dialog.view.page_connection
+        assert (
+            connection_config_dialog.view.stacked_pages.currentWidget()
+            == connection_config_dialog.view.page_connection
+        )
         assert_key_parameters_behaviour(connection_config_dialog, bob)
         QTest.mouseClick(connection_config_dialog.view.button_next, Qt.LeftButton)
         connection_config_dialog.model.connection.password = bob.password
@@ -61,7 +70,10 @@ async def test_register_empty_blockchain(application, fake_server, bob, tmpdir):
         await asyncio.sleep(1)
         await asyncio.sleep(1)
         revocation_file.ensure()
-        assert connection_config_dialog.view.stacked_pages.currentWidget() == connection_config_dialog.view.page_services
+        assert (
+            connection_config_dialog.view.stacked_pages.currentWidget()
+            == connection_config_dialog.view.page_services
+        )
         assert len(ConnectionsProcessor.instanciate(application).connections()) == 1
         accept_dialog("Registration")
 
@@ -73,8 +85,12 @@ async def test_register_empty_blockchain(application, fake_server, bob, tmpdir):
 
 @pytest.mark.asyncio
 async def test_connect(application, fake_server_with_blockchain, bob):
-    await BlockchainProcessor.instanciate(application).initialize_blockchain(application.currency)
-    connection_config_dialog = ConnectionConfigController.create_connection(None, application)
+    await BlockchainProcessor.instanciate(application).initialize_blockchain(
+        application.currency
+    )
+    connection_config_dialog = ConnectionConfigController.create_connection(
+        None, application
+    )
 
     def close_dialog():
         if connection_config_dialog.view.isVisible():
@@ -86,13 +102,20 @@ async def test_connect(application, fake_server_with_blockchain, bob):
         QTest.mouseClick(connection_config_dialog.view.button_accept, Qt.LeftButton)
         await asyncio.sleep(0.1)
 
-        assert connection_config_dialog.view.stacked_pages.currentWidget() == connection_config_dialog.view.page_connection
+        assert (
+            connection_config_dialog.view.stacked_pages.currentWidget()
+            == connection_config_dialog.view.page_connection
+        )
         assert_key_parameters_behaviour(connection_config_dialog, bob)
         QTest.mouseClick(connection_config_dialog.view.button_next, Qt.LeftButton)
         await asyncio.sleep(0.1)
 
-        assert connection_config_dialog.view.stacked_pages.currentWidget() == connection_config_dialog.view.page_services
+        assert (
+            connection_config_dialog.view.stacked_pages.currentWidget()
+            == connection_config_dialog.view.page_services
+        )
         assert len(ConnectionsProcessor.instanciate(application).connections()) == 1
+
     application.loop.call_later(10, close_dialog)
     asyncio.ensure_future(exec_test())
     await connection_config_dialog.async_exec()
@@ -100,8 +123,12 @@ async def test_connect(application, fake_server_with_blockchain, bob):
 
 
 @pytest.mark.asyncio
-async def test_connect_wrong_uid(application, fake_server_with_blockchain, wrong_bob_uid, bob):
-    connection_config_dialog = ConnectionConfigController.create_connection(None, application)
+async def test_connect_wrong_uid(
+    application, fake_server_with_blockchain, wrong_bob_uid, bob
+):
+    connection_config_dialog = ConnectionConfigController.create_connection(
+        None, application
+    )
 
     def close_dialog():
         if connection_config_dialog.view.isVisible():
@@ -112,11 +139,16 @@ async def test_connect_wrong_uid(application, fake_server_with_blockchain, wrong
         await asyncio.sleep(0.6)
         QTest.mouseClick(connection_config_dialog.view.button_accept, Qt.LeftButton)
         await asyncio.sleep(0.1)
-        assert connection_config_dialog.view.stacked_pages.currentWidget() == connection_config_dialog.view.page_connection
+        assert (
+            connection_config_dialog.view.stacked_pages.currentWidget()
+            == connection_config_dialog.view.page_connection
+        )
         assert_key_parameters_behaviour(connection_config_dialog, wrong_bob_uid)
         QTest.mouseClick(connection_config_dialog.view.button_next, Qt.LeftButton)
         assert connection_config_dialog.view.label_info.text(), """Your pubkey or UID is different on the network.
-Yours : {0}, the network : {1}""".format(wrong_bob_uid.uid, bob.uid)
+Yours : {0}, the network : {1}""".format(
+            wrong_bob_uid.uid, bob.uid
+        )
         connection_config_dialog.view.close()
 
     application.loop.call_later(10, close_dialog)
@@ -126,8 +158,12 @@ Yours : {0}, the network : {1}""".format(wrong_bob_uid.uid, bob.uid)
 
 
 @pytest.mark.asyncio
-async def test_connect_wrong_pubkey(application, fake_server_with_blockchain, wrong_bob_pubkey, bob):
-    connection_config_dialog = ConnectionConfigController.create_connection(None, application)
+async def test_connect_wrong_pubkey(
+    application, fake_server_with_blockchain, wrong_bob_pubkey, bob
+):
+    connection_config_dialog = ConnectionConfigController.create_connection(
+        None, application
+    )
 
     def close_dialog():
         if connection_config_dialog.view.isVisible():
@@ -138,11 +174,16 @@ async def test_connect_wrong_pubkey(application, fake_server_with_blockchain, wr
         await asyncio.sleep(0.6)
         QTest.mouseClick(connection_config_dialog.view.button_accept, Qt.LeftButton)
         await asyncio.sleep(0.1)
-        assert connection_config_dialog.view.stacked_pages.currentWidget() == connection_config_dialog.view.page_connection
+        assert (
+            connection_config_dialog.view.stacked_pages.currentWidget()
+            == connection_config_dialog.view.page_connection
+        )
         assert_key_parameters_behaviour(connection_config_dialog, wrong_bob_pubkey)
         QTest.mouseClick(connection_config_dialog.view.button_next, Qt.LeftButton)
         assert connection_config_dialog.view.label_info.text(), """Your pubkey or UID is different on the network.
-Yours : {0}, the network : {1}""".format(wrong_bob_pubkey.pubkey, bob.pubkey)
+Yours : {0}, the network : {1}""".format(
+            wrong_bob_pubkey.pubkey, bob.pubkey
+        )
         connection_config_dialog.view.close()
 
     application.loop.call_later(10, close_dialog)
@@ -151,10 +192,13 @@ Yours : {0}, the network : {1}""".format(wrong_bob_pubkey.pubkey, bob.pubkey)
     await fake_server_with_blockchain.close()
 
 
-
 @pytest.mark.asyncio
-async def test_connect_pubkey_wrong_uid(application, fake_server_with_blockchain, wrong_bob_uid, bob):
-    connection_config_dialog = ConnectionConfigController.create_connection(None, application)
+async def test_connect_pubkey_wrong_uid(
+    application, fake_server_with_blockchain, wrong_bob_uid, bob
+):
+    connection_config_dialog = ConnectionConfigController.create_connection(
+        None, application
+    )
 
     def close_dialog():
         if connection_config_dialog.view.isVisible():
@@ -165,12 +209,20 @@ async def test_connect_pubkey_wrong_uid(application, fake_server_with_blockchain
         await asyncio.sleep(0.6)
         QTest.mouseClick(connection_config_dialog.view.button_accept, Qt.LeftButton)
         await asyncio.sleep(0.1)
-        assert connection_config_dialog.view.stacked_pages.currentWidget() == connection_config_dialog.view.page_connection
+        assert (
+            connection_config_dialog.view.stacked_pages.currentWidget()
+            == connection_config_dialog.view.page_connection
+        )
         assert_pubkey_parameters_behaviour(connection_config_dialog, wrong_bob_uid)
         QTest.mouseClick(connection_config_dialog.view.button_next, Qt.LeftButton)
         await asyncio.sleep(0.6)
-        assert connection_config_dialog.view.label_info.text() == """Your pubkey or UID is different on the network.
-Yours : {0}, the network : {1}""".format(wrong_bob_uid.uid, bob.uid)
+        assert (
+            connection_config_dialog.view.label_info.text()
+            == """Your pubkey or UID is different on the network.
+Yours : {0}, the network : {1}""".format(
+                wrong_bob_uid.uid, bob.uid
+            )
+        )
         connection_config_dialog.view.close()
 
     application.loop.call_later(10, close_dialog)
diff --git a/tests/functional/test_contacts_dialog.py b/tests/functional/test_contacts_dialog.py
index 272783d07711349f07df362fbee9c813423f62a1..ff530d34714c6dfb30a0f4d31f20b98707fd1aaf 100644
--- a/tests/functional/test_contacts_dialog.py
+++ b/tests/functional/test_contacts_dialog.py
@@ -8,7 +8,9 @@ from sakia.gui.dialogs.contact.controller import ContactController
 
 
 @pytest.mark.asyncio
-async def test_add_contact(application_with_one_connection, fake_server_with_blockchain):
+async def test_add_contact(
+    application_with_one_connection, fake_server_with_blockchain
+):
     contact_dialog = ContactController.create(None, application_with_one_connection)
 
     def close_dialog():
@@ -16,11 +18,18 @@ async def test_add_contact(application_with_one_connection, fake_server_with_blo
             contact_dialog.view.close()
 
     async def exec_test():
-        contact_dialog.view.edit_pubkey.setText("7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ")
+        contact_dialog.view.edit_pubkey.setText(
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+        )
         contact_dialog.view.edit_name.setText("john")
         QTest.mouseClick(contact_dialog.view.button_save, Qt.LeftButton)
-        assert len(contact_dialog.view.table_contacts.model().sourceModel().contacts_data) == 1
-        QTest.mouseClick(contact_dialog.view.button_box.button(QDialogButtonBox.Close), Qt.LeftButton)
+        assert (
+            len(contact_dialog.view.table_contacts.model().sourceModel().contacts_data)
+            == 1
+        )
+        QTest.mouseClick(
+            contact_dialog.view.button_box.button(QDialogButtonBox.Close), Qt.LeftButton
+        )
 
     application_with_one_connection.loop.call_later(10, close_dialog)
     asyncio.ensure_future(exec_test())
@@ -29,11 +38,17 @@ async def test_add_contact(application_with_one_connection, fake_server_with_blo
 
 
 @pytest.mark.asyncio
-async def test_edit_contact(application_with_one_connection, fake_server_with_blockchain):
+async def test_edit_contact(
+    application_with_one_connection, fake_server_with_blockchain
+):
     contacts_repo = application_with_one_connection.db.contacts_repo
-    contacts_repo.insert(Contact(currency="test_currency",
-                                 pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                 name="alice"))
+    contacts_repo.insert(
+        Contact(
+            currency="test_currency",
+            pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            name="alice",
+        )
+    )
     contact_dialog = ContactController.create(None, application_with_one_connection)
 
     def close_dialog():
@@ -43,13 +58,24 @@ async def test_edit_contact(application_with_one_connection, fake_server_with_bl
     async def exec_test():
         contact_dialog.view.table_contacts.selectRow(0)
         contact_dialog.edit_contact()
-        assert contact_dialog.view.edit_pubkey.text() == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+        assert (
+            contact_dialog.view.edit_pubkey.text()
+            == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+        )
         assert contact_dialog.view.edit_name.text() == "alice"
         contact_dialog.view.edit_name.setText("john")
         QTest.mouseClick(contact_dialog.view.button_save, Qt.LeftButton)
-        assert len(contact_dialog.view.table_contacts.model().sourceModel().contacts_data) == 1
-        assert contact_dialog.view.table_contacts.model().sourceModel().contacts_data[0][0] == "john"
-        QTest.mouseClick(contact_dialog.view.button_box.button(QDialogButtonBox.Close), Qt.LeftButton)
+        assert (
+            len(contact_dialog.view.table_contacts.model().sourceModel().contacts_data)
+            == 1
+        )
+        assert (
+            contact_dialog.view.table_contacts.model().sourceModel().contacts_data[0][0]
+            == "john"
+        )
+        QTest.mouseClick(
+            contact_dialog.view.button_box.button(QDialogButtonBox.Close), Qt.LeftButton
+        )
 
     application_with_one_connection.loop.call_later(10, close_dialog)
     asyncio.ensure_future(exec_test())
@@ -58,11 +84,17 @@ async def test_edit_contact(application_with_one_connection, fake_server_with_bl
 
 
 @pytest.mark.asyncio
-async def test_remove_contact(application_with_one_connection, fake_server_with_blockchain):
+async def test_remove_contact(
+    application_with_one_connection, fake_server_with_blockchain
+):
     contacts_repo = application_with_one_connection.db.contacts_repo
-    contacts_repo.insert(Contact(currency="test_currency",
-                                 pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                 name="alice"))
+    contacts_repo.insert(
+        Contact(
+            currency="test_currency",
+            pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            name="alice",
+        )
+    )
     contact_dialog = ContactController.create(None, application_with_one_connection)
 
     def close_dialog():
@@ -72,12 +104,20 @@ async def test_remove_contact(application_with_one_connection, fake_server_with_
     async def exec_test():
         contact_dialog.view.table_contacts.selectRow(0)
         contact_dialog.edit_contact()
-        assert contact_dialog.view.edit_pubkey.text() == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+        assert (
+            contact_dialog.view.edit_pubkey.text()
+            == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+        )
         assert contact_dialog.view.edit_name.text() == "alice"
         contact_dialog.view.edit_name.setText("john")
         QTest.mouseClick(contact_dialog.view.button_delete, Qt.LeftButton)
-        assert len(contact_dialog.view.table_contacts.model().sourceModel().contacts_data) == 0
-        QTest.mouseClick(contact_dialog.view.button_box.button(QDialogButtonBox.Close), Qt.LeftButton)
+        assert (
+            len(contact_dialog.view.table_contacts.model().sourceModel().contacts_data)
+            == 0
+        )
+        QTest.mouseClick(
+            contact_dialog.view.button_box.button(QDialogButtonBox.Close), Qt.LeftButton
+        )
 
     application_with_one_connection.loop.call_later(10, close_dialog)
     asyncio.ensure_future(exec_test())
@@ -86,11 +126,17 @@ async def test_remove_contact(application_with_one_connection, fake_server_with_
 
 
 @pytest.mark.asyncio
-async def test_clear_selection(application_with_one_connection, fake_server_with_blockchain):
+async def test_clear_selection(
+    application_with_one_connection, fake_server_with_blockchain
+):
     contacts_repo = application_with_one_connection.db.contacts_repo
-    contacts_repo.insert(Contact(currency="test_currency",
-                                 pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                 name="alice"))
+    contacts_repo.insert(
+        Contact(
+            currency="test_currency",
+            pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            name="alice",
+        )
+    )
     contact_dialog = ContactController.create(None, application_with_one_connection)
 
     def close_dialog():
@@ -100,18 +146,26 @@ async def test_clear_selection(application_with_one_connection, fake_server_with
     async def exec_test():
         contact_dialog.view.table_contacts.selectRow(0)
         contact_dialog.edit_contact()
-        assert contact_dialog.view.edit_pubkey.text() == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+        assert (
+            contact_dialog.view.edit_pubkey.text()
+            == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+        )
         assert contact_dialog.view.edit_name.text() == "alice"
         contact_dialog.view.edit_name.setText("john")
         QTest.mouseClick(contact_dialog.view.button_clear, Qt.LeftButton)
-        assert len(contact_dialog.view.table_contacts.model().sourceModel().contacts_data) == 1
+        assert (
+            len(contact_dialog.view.table_contacts.model().sourceModel().contacts_data)
+            == 1
+        )
         assert contact_dialog.view.edit_pubkey.text() == ""
         assert contact_dialog.view.edit_name.text() == ""
         contact_dialog.edit_contact()
         assert contact_dialog.view.edit_pubkey.text() == ""
         assert contact_dialog.view.edit_name.text() == ""
 
-        QTest.mouseClick(contact_dialog.view.button_box.button(QDialogButtonBox.Close), Qt.LeftButton)
+        QTest.mouseClick(
+            contact_dialog.view.button_box.button(QDialogButtonBox.Close), Qt.LeftButton
+        )
 
     application_with_one_connection.loop.call_later(10, close_dialog)
     asyncio.ensure_future(exec_test())
diff --git a/tests/functional/test_preferences_dialog.py b/tests/functional/test_preferences_dialog.py
index e9e69371427dd063cae795b6dab7c202c0df523d..a3cd3c5328f66fb93810bf865414cad157a400a2 100644
--- a/tests/functional/test_preferences_dialog.py
+++ b/tests/functional/test_preferences_dialog.py
@@ -3,11 +3,34 @@ from sakia.gui.preferences import PreferencesDialog
 
 def test_preferences_default(application):
     preferences_dialog = PreferencesDialog(application)
-    assert preferences_dialog.combo_language.currentText() == application.parameters.lang
-    assert preferences_dialog.combo_referential.currentIndex() == application.parameters.referential
-    assert preferences_dialog.checkbox_expertmode.isChecked() == application.parameters.expert_mode
-    assert preferences_dialog.checkbox_maximize.isChecked() == application.parameters.maximized
-    assert preferences_dialog.checkbox_notifications.isChecked() == application.parameters.notifications
-    assert preferences_dialog.checkbox_proxy.isChecked() == application.parameters.enable_proxy
-    assert preferences_dialog.edit_proxy_address.text() == application.parameters.proxy_address
-    assert preferences_dialog.spinbox_proxy_port.value() == application.parameters.proxy_port
+    assert (
+        preferences_dialog.combo_language.currentText() == application.parameters.lang
+    )
+    assert (
+        preferences_dialog.combo_referential.currentIndex()
+        == application.parameters.referential
+    )
+    assert (
+        preferences_dialog.checkbox_expertmode.isChecked()
+        == application.parameters.expert_mode
+    )
+    assert (
+        preferences_dialog.checkbox_maximize.isChecked()
+        == application.parameters.maximized
+    )
+    assert (
+        preferences_dialog.checkbox_notifications.isChecked()
+        == application.parameters.notifications
+    )
+    assert (
+        preferences_dialog.checkbox_proxy.isChecked()
+        == application.parameters.enable_proxy
+    )
+    assert (
+        preferences_dialog.edit_proxy_address.text()
+        == application.parameters.proxy_address
+    )
+    assert (
+        preferences_dialog.spinbox_proxy_port.value()
+        == application.parameters.proxy_port
+    )
diff --git a/tests/functional/test_transfer_dialog.py b/tests/functional/test_transfer_dialog.py
index bc098c34576456b0216a2d1e56e581baf1674484..52a313154991e5853fb6045b249b6fa3bb72470a 100644
--- a/tests/functional/test_transfer_dialog.py
+++ b/tests/functional/test_transfer_dialog.py
@@ -8,7 +8,9 @@ from duniterpy.documents import Transaction
 
 
 @pytest.mark.asyncio
-async def test_transfer(application_with_one_connection, fake_server_with_blockchain, bob, alice):
+async def test_transfer(
+    application_with_one_connection, fake_server_with_blockchain, bob, alice
+):
     transfer_dialog = TransferController.create(None, application_with_one_connection)
 
     def close_dialog():
@@ -20,12 +22,16 @@ async def test_transfer(application_with_one_connection, fake_server_with_blockc
         QTest.keyClicks(transfer_dialog.view.edit_pubkey, alice.key.pubkey)
         transfer_dialog.view.spinbox_amount.setValue(10)
         await asyncio.sleep(0.1)
-        assert not transfer_dialog.view.button_box.button(QDialogButtonBox.Ok).isEnabled()
+        assert not transfer_dialog.view.button_box.button(
+            QDialogButtonBox.Ok
+        ).isEnabled()
         await asyncio.sleep(0.1)
         QTest.keyClicks(transfer_dialog.view.password_input.edit_secret_key, bob.salt)
         QTest.keyClicks(transfer_dialog.view.password_input.edit_password, bob.password)
         assert transfer_dialog.view.button_box.button(QDialogButtonBox.Ok).isEnabled()
-        QTest.mouseClick(transfer_dialog.view.button_box.button(QDialogButtonBox.Ok), Qt.LeftButton)
+        QTest.mouseClick(
+            transfer_dialog.view.button_box.button(QDialogButtonBox.Ok), Qt.LeftButton
+        )
         await asyncio.sleep(0.2)
         assert isinstance(fake_server_with_blockchain.forge.pool[0], Transaction)
 
@@ -35,7 +41,9 @@ async def test_transfer(application_with_one_connection, fake_server_with_blockc
 
 
 @pytest.mark.asyncio
-async def test_transfer_chained_tx(application_with_two_connections, fake_server_with_blockchain, bob, john):
+async def test_transfer_chained_tx(
+    application_with_two_connections, fake_server_with_blockchain, bob, john
+):
     transfer_dialog = TransferController.create(None, application_with_two_connections)
 
     def close_dialog():
@@ -47,17 +55,22 @@ async def test_transfer_chained_tx(application_with_two_connections, fake_server
         QTest.keyClicks(transfer_dialog.view.edit_pubkey, john.key.pubkey)
         transfer_dialog.view.spinbox_amount.setValue(1000)
         await asyncio.sleep(0.1)
-        assert not transfer_dialog.view.button_box.button(QDialogButtonBox.Ok).isEnabled()
+        assert not transfer_dialog.view.button_box.button(
+            QDialogButtonBox.Ok
+        ).isEnabled()
         await asyncio.sleep(0.1)
         QTest.keyClicks(transfer_dialog.view.password_input.edit_secret_key, bob.salt)
         QTest.keyClicks(transfer_dialog.view.password_input.edit_password, bob.password)
         assert transfer_dialog.view.button_box.button(QDialogButtonBox.Ok).isEnabled()
-        QTest.mouseClick(transfer_dialog.view.button_box.button(QDialogButtonBox.Ok), Qt.LeftButton)
+        QTest.mouseClick(
+            transfer_dialog.view.button_box.button(QDialogButtonBox.Ok), Qt.LeftButton
+        )
         await asyncio.sleep(0.2)
         assert isinstance(fake_server_with_blockchain.forge.pool[0], Transaction)
         assert fake_server_with_blockchain.forge.pool[0].comment == "[CHAINED]"
         assert isinstance(fake_server_with_blockchain.forge.pool[1], Transaction)
 
         application_with_two_connections.loop.call_later(10, close_dialog)
+
     transfer_dialog.view.show()
     await exec_test()
diff --git a/tests/helpers.py b/tests/helpers.py
index aaeb4cdcbb0d8d5d3931295d294ecb35130ac062..89c4556f5ee38872aa69bfc4680f94fa4c474b40 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -3,19 +3,20 @@ from PyQt5.QtCore import Qt
 from PyQt5.QtTest import QTest
 
 
-
 def click_on_top_message_box_button(button):
     topWidgets = QApplication.topLevelWidgets()
     for w in topWidgets:
         if isinstance(w, QMessageBox):
             QTest.mouseClick(w.button(button), Qt.LeftButton)
 
+
 def accept_dialog(title):
     topWidgets = QApplication.topLevelWidgets()
     for w in topWidgets:
         if isinstance(w, QDialog) and w.windowTitle() == title:
             w.accept()
 
+
 def select_file_dialog(filename):
     topWidgets = QApplication.topLevelWidgets()
     for w in topWidgets:
diff --git a/tests/technical/test_blockchain_service.py b/tests/technical/test_blockchain_service.py
index 5801121d95075105fe1463adb557f6821b0deb0f..ab95f4286aa1cf7d5541d7640735dd4f34b7e2b0 100644
--- a/tests/technical/test_blockchain_service.py
+++ b/tests/technical/test_blockchain_service.py
@@ -1,4 +1,2 @@
-
 import pytest
 import time
-
diff --git a/tests/technical/test_documents_service.py b/tests/technical/test_documents_service.py
index d841ce61fa0fce173f603ea859913dcc2044f81d..4ecdda858d9fc33a48adfc27715d88c72b3ff333 100644
--- a/tests/technical/test_documents_service.py
+++ b/tests/technical/test_documents_service.py
@@ -3,30 +3,52 @@ from sakia.data.processors import ConnectionsProcessor
 
 
 @pytest.mark.asyncio
-async def test_send_more_than_40_sources(application_with_one_connection, fake_server_with_blockchain, bob, alice):
+async def test_send_more_than_40_sources(
+    application_with_one_connection, fake_server_with_blockchain, bob, alice
+):
     start = fake_server_with_blockchain.forge.blocks[-1].number + 1
     for i in range(0, 60):
         fake_server_with_blockchain.forge.generate_dividend()
         fake_server_with_blockchain.forge.forge_block()
     end = fake_server_with_blockchain.forge.blocks[-1].number
-    connections = ConnectionsProcessor.instanciate(application_with_one_connection).connections()
-    changed_tx, new_tx, new_ud = await application_with_one_connection.transactions_service.handle_new_blocks(connections,
-                                                                                                              start, end)
+    connections = ConnectionsProcessor.instanciate(
+        application_with_one_connection
+    ).connections()
+    (
+        changed_tx,
+        new_tx,
+        new_ud,
+    ) = await application_with_one_connection.transactions_service.handle_new_blocks(
+        connections, start, end
+    )
 
-    await application_with_one_connection.sources_service.refresh_sources_of_pubkey(bob.key.pubkey)
-    amount_before_send = application_with_one_connection.sources_service.amount(bob.key.pubkey)
-    bob_connection = application_with_one_connection.db.connections_repo.get_one(pubkey=bob.key.pubkey)
+    await application_with_one_connection.sources_service.refresh_sources_of_pubkey(
+        bob.key.pubkey
+    )
+    amount_before_send = application_with_one_connection.sources_service.amount(
+        bob.key.pubkey
+    )
+    bob_connection = application_with_one_connection.db.connections_repo.get_one(
+        pubkey=bob.key.pubkey
+    )
 
-    result, transactions = await application_with_one_connection.documents_service.send_money(bob_connection,
-                                                                       bob.salt,
-                                                                       bob.password,
-                                                                       alice.key.pubkey,
-                                                                       amount_before_send,
-                                                                       0,
-                                                                       "Test comment")
+    (
+        result,
+        transactions,
+    ) = await application_with_one_connection.documents_service.send_money(
+        bob_connection,
+        bob.salt,
+        bob.password,
+        alice.key.pubkey,
+        amount_before_send,
+        0,
+        "Test comment",
+    )
     assert transactions[0].comment == "[CHAINED]"
     assert transactions[1].comment == "Test comment"
-    amount_after_send = application_with_one_connection.sources_service.amount(bob.key.pubkey)
+    amount_after_send = application_with_one_connection.sources_service.amount(
+        bob.key.pubkey
+    )
     assert amount_after_send == 0
 
     await fake_server_with_blockchain.close()
diff --git a/tests/technical/test_identities_service.py b/tests/technical/test_identities_service.py
index 95cecd14b45d841396d4c8171dad61b2141b755f..e70458e2b9107855cb87a2205f4d31a9b60ee132 100644
--- a/tests/technical/test_identities_service.py
+++ b/tests/technical/test_identities_service.py
@@ -2,4 +2,3 @@ from sakia.data.entities import Identity, Connection
 from duniterpy.documents import Certification, BlockUID
 
 import pytest
-
diff --git a/tests/technical/test_network_service.py b/tests/technical/test_network_service.py
index caf6bbd1d167b4ef15c0418a3225794e79298d69..39b9c1bcc609e3816ad2b0e49665371cfe203042 100644
--- a/tests/technical/test_network_service.py
+++ b/tests/technical/test_network_service.py
@@ -3,4 +3,3 @@ import os
 from duniterpy.documents import block_uid
 from sakia.data.entities import Node
 from sakia.data.processors import NodesProcessor
-
diff --git a/tests/technical/test_sources_service.py b/tests/technical/test_sources_service.py
index f9258e5bd9227a7c3c242ae603705425c0fb9aa9..2cc8c698fc218beb25d6a17eb98738a252b7f425 100644
--- a/tests/technical/test_sources_service.py
+++ b/tests/technical/test_sources_service.py
@@ -4,66 +4,115 @@ from sakia.data.processors import TransactionsProcessor, ConnectionsProcessor
 
 
 @pytest.mark.asyncio
-async def test_receive_source(application_with_one_connection, fake_server_with_blockchain, bob, alice):
+async def test_receive_source(
+    application_with_one_connection, fake_server_with_blockchain, bob, alice
+):
     amount = application_with_one_connection.sources_service.amount(bob.key.pubkey)
-    fake_server_with_blockchain.forge.push(alice.send_money(150, fake_server_with_blockchain.forge.user_identities[alice.key.pubkey].sources, bob,
-                                            fake_server_with_blockchain.forge.blocks[-1].blockUID, "Test receive"))
+    fake_server_with_blockchain.forge.push(
+        alice.send_money(
+            150,
+            fake_server_with_blockchain.forge.user_identities[alice.key.pubkey].sources,
+            bob,
+            fake_server_with_blockchain.forge.blocks[-1].blockUID,
+            "Test receive",
+        )
+    )
     start = fake_server_with_blockchain.forge.blocks[-1].number + 1
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.forge_block()
     end = fake_server_with_blockchain.forge.blocks[-1].number + 1
-    connections = ConnectionsProcessor.instanciate(application_with_one_connection).connections()
-    await application_with_one_connection.transactions_service.handle_new_blocks(connections, start, end)
+    connections = ConnectionsProcessor.instanciate(
+        application_with_one_connection
+    ).connections()
+    await application_with_one_connection.transactions_service.handle_new_blocks(
+        connections, start, end
+    )
     await application_with_one_connection.sources_service.refresh_sources(connections)
-    assert amount + 150 == application_with_one_connection.sources_service.amount(bob.key.pubkey)
+    assert amount + 150 == application_with_one_connection.sources_service.amount(
+        bob.key.pubkey
+    )
     await fake_server_with_blockchain.close()
 
 
 @pytest.mark.asyncio
-async def test_send_source(application_with_one_connection, fake_server_with_blockchain, bob, alice):
+async def test_send_source(
+    application_with_one_connection, fake_server_with_blockchain, bob, alice
+):
     amount = application_with_one_connection.sources_service.amount(bob.key.pubkey)
-    fake_server_with_blockchain.forge.push(bob.send_money(150, fake_server_with_blockchain.forge.user_identities[bob.key.pubkey].sources, alice,
-                                            fake_server_with_blockchain.forge.blocks[-1].blockUID, "Test receive"))
+    fake_server_with_blockchain.forge.push(
+        bob.send_money(
+            150,
+            fake_server_with_blockchain.forge.user_identities[bob.key.pubkey].sources,
+            alice,
+            fake_server_with_blockchain.forge.blocks[-1].blockUID,
+            "Test receive",
+        )
+    )
     start = fake_server_with_blockchain.forge.blocks[-1].number + 1
 
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.forge_block()
     end = fake_server_with_blockchain.forge.blocks[-1].number + 1
-    connections = ConnectionsProcessor.instanciate(application_with_one_connection).connections()
-    await application_with_one_connection.transactions_service.handle_new_blocks(connections, start, end)
+    connections = ConnectionsProcessor.instanciate(
+        application_with_one_connection
+    ).connections()
+    await application_with_one_connection.transactions_service.handle_new_blocks(
+        connections, start, end
+    )
     await application_with_one_connection.sources_service.refresh_sources(connections)
-    assert amount - 150 == application_with_one_connection.sources_service.amount(bob.key.pubkey)
+    assert amount - 150 == application_with_one_connection.sources_service.amount(
+        bob.key.pubkey
+    )
     await fake_server_with_blockchain.close()
 
 
 @pytest.mark.asyncio
-async def test_send_tx_then_cancel(application_with_one_connection, fake_server_with_blockchain, bob, alice):
-    tx_before_send = application_with_one_connection.transactions_service.transfers(bob.key.pubkey)
-    sources_before_send = application_with_one_connection.sources_service.amount(bob.key.pubkey)
-    bob_connection = application_with_one_connection.db.connections_repo.get_one(pubkey=bob.key.pubkey)
+async def test_send_tx_then_cancel(
+    application_with_one_connection, fake_server_with_blockchain, bob, alice
+):
+    tx_before_send = application_with_one_connection.transactions_service.transfers(
+        bob.key.pubkey
+    )
+    sources_before_send = application_with_one_connection.sources_service.amount(
+        bob.key.pubkey
+    )
+    bob_connection = application_with_one_connection.db.connections_repo.get_one(
+        pubkey=bob.key.pubkey
+    )
     fake_server_with_blockchain.reject_next_post = True
-    await application_with_one_connection.documents_service.send_money(bob_connection,
-                                                                       bob.salt,
-                                                                       bob.password,
-                                                                       alice.key.pubkey, 10, 0, "Test comment")
-    tx_after_send = application_with_one_connection.transactions_service.transfers(bob.key.pubkey)
-    sources_after_send = application_with_one_connection.sources_service.amount(bob.key.pubkey)
+    await application_with_one_connection.documents_service.send_money(
+        bob_connection, bob.salt, bob.password, alice.key.pubkey, 10, 0, "Test comment"
+    )
+    tx_after_send = application_with_one_connection.transactions_service.transfers(
+        bob.key.pubkey
+    )
+    sources_after_send = application_with_one_connection.sources_service.amount(
+        bob.key.pubkey
+    )
     assert len(tx_before_send) + 1 == len(tx_after_send)
     assert sources_before_send - 10 >= sources_after_send
     assert tx_after_send[-1].state is Transaction.REFUSED
     assert tx_after_send[-1].written_block == 0
 
-    transactions_processor = TransactionsProcessor.instanciate(application_with_one_connection)
+    transactions_processor = TransactionsProcessor.instanciate(
+        application_with_one_connection
+    )
     if transactions_processor.cancel(tx_after_send[-1]):
-        application_with_one_connection.sources_service.restore_sources(bob.key.pubkey, tx_after_send[-1])
+        application_with_one_connection.sources_service.restore_sources(
+            bob.key.pubkey, tx_after_send[-1]
+        )
 
-    tx_after_cancel = application_with_one_connection.transactions_service.transfers(bob.key.pubkey)
-    sources_after_cancel = application_with_one_connection.sources_service.amount(bob.key.pubkey)
+    tx_after_cancel = application_with_one_connection.transactions_service.transfers(
+        bob.key.pubkey
+    )
+    sources_after_cancel = application_with_one_connection.sources_service.amount(
+        bob.key.pubkey
+    )
     assert tx_after_cancel[-1].state is Transaction.DROPPED
     assert tx_after_cancel[-1].written_block == 0
     assert len(tx_before_send) + 1 == len(tx_after_cancel)
     assert sources_before_send == sources_after_cancel
 
-    await fake_server_with_blockchain.close()
\ No newline at end of file
+    await fake_server_with_blockchain.close()
diff --git a/tests/technical/test_transactions_service.py b/tests/technical/test_transactions_service.py
index 0c25f3ff3b0c1f524e7714127088be66d0e38dc3..5791699d0aea6f21256743d41ea4352b6acbfe24 100644
--- a/tests/technical/test_transactions_service.py
+++ b/tests/technical/test_transactions_service.py
@@ -4,14 +4,21 @@ from sakia.data.processors import ConnectionsProcessor
 
 
 @pytest.mark.asyncio
-async def test_send_tx_then_validate(application_with_one_connection, fake_server_with_blockchain, bob, alice):
-    tx_before_send = application_with_one_connection.transactions_service.transfers(bob.key.pubkey)
-    bob_connection = application_with_one_connection.db.connections_repo.get_one(pubkey=bob.key.pubkey)
-    await application_with_one_connection.documents_service.send_money(bob_connection,
-                                                                       bob.salt,
-                                                                       bob.password,
-                                                                       alice.key.pubkey, 10, 0, "Test comment")
-    tx_after_send = application_with_one_connection.transactions_service.transfers(bob.key.pubkey)
+async def test_send_tx_then_validate(
+    application_with_one_connection, fake_server_with_blockchain, bob, alice
+):
+    tx_before_send = application_with_one_connection.transactions_service.transfers(
+        bob.key.pubkey
+    )
+    bob_connection = application_with_one_connection.db.connections_repo.get_one(
+        pubkey=bob.key.pubkey
+    )
+    await application_with_one_connection.documents_service.send_money(
+        bob_connection, bob.salt, bob.password, alice.key.pubkey, 10, 0, "Test comment"
+    )
+    tx_after_send = application_with_one_connection.transactions_service.transfers(
+        bob.key.pubkey
+    )
     assert len(tx_before_send) + 1 == len(tx_after_send)
     assert tx_after_send[-1].state is Transaction.AWAITING
     assert tx_after_send[-1].written_block == 0
@@ -20,35 +27,65 @@ async def test_send_tx_then_validate(application_with_one_connection, fake_serve
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.forge_block()
     end = fake_server_with_blockchain.forge.blocks[-1].number
-    connections = ConnectionsProcessor.instanciate(application_with_one_connection).connections()
-    await application_with_one_connection.transactions_service.handle_new_blocks(connections, start, end)
-    tx_after_parse = application_with_one_connection.transactions_service.transfers(bob.key.pubkey)
+    connections = ConnectionsProcessor.instanciate(
+        application_with_one_connection
+    ).connections()
+    await application_with_one_connection.transactions_service.handle_new_blocks(
+        connections, start, end
+    )
+    tx_after_parse = application_with_one_connection.transactions_service.transfers(
+        bob.key.pubkey
+    )
     assert tx_after_parse[-1].state is Transaction.VALIDATED
-    assert tx_after_parse[-1].written_block == fake_server_with_blockchain.forge.blocks[-3].number
+    assert (
+        tx_after_parse[-1].written_block
+        == fake_server_with_blockchain.forge.blocks[-3].number
+    )
     await fake_server_with_blockchain.close()
 
 
 @pytest.mark.asyncio
-async def test_receive_tx(application_with_one_connection, fake_server_with_blockchain, bob, alice):
-    tx_before_send = application_with_one_connection.transactions_service.transfers(bob.key.pubkey)
-    fake_server_with_blockchain.forge.push(alice.send_money(10, fake_server_with_blockchain.forge.user_identities[alice.key.pubkey].sources, bob,
-                                            fake_server_with_blockchain.forge.blocks[-1].blockUID, "Test receive"))
+async def test_receive_tx(
+    application_with_one_connection, fake_server_with_blockchain, bob, alice
+):
+    tx_before_send = application_with_one_connection.transactions_service.transfers(
+        bob.key.pubkey
+    )
+    fake_server_with_blockchain.forge.push(
+        alice.send_money(
+            10,
+            fake_server_with_blockchain.forge.user_identities[alice.key.pubkey].sources,
+            bob,
+            fake_server_with_blockchain.forge.blocks[-1].blockUID,
+            "Test receive",
+        )
+    )
     start = fake_server_with_blockchain.forge.blocks[-1].number
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.forge_block()
     end = fake_server_with_blockchain.forge.blocks[-1].number
-    connections = ConnectionsProcessor.instanciate(application_with_one_connection).connections()
-    await application_with_one_connection.transactions_service.handle_new_blocks(connections, start, end)
-    tx_after_parse = application_with_one_connection.transactions_service.transfers(bob.key.pubkey)
+    connections = ConnectionsProcessor.instanciate(
+        application_with_one_connection
+    ).connections()
+    await application_with_one_connection.transactions_service.handle_new_blocks(
+        connections, start, end
+    )
+    tx_after_parse = application_with_one_connection.transactions_service.transfers(
+        bob.key.pubkey
+    )
     assert tx_after_parse[-1].state is Transaction.VALIDATED
     assert len(tx_before_send) + 1 == len(tx_after_parse)
     await fake_server_with_blockchain.close()
 
 
 @pytest.mark.asyncio
-async def test_issue_dividend(application_with_one_connection, fake_server_with_blockchain, bob):
-    dividends_before_send = application_with_one_connection.transactions_service.dividends(bob.key.pubkey)
+async def test_issue_dividend(
+    application_with_one_connection, fake_server_with_blockchain, bob
+):
+    dividends_before_send = application_with_one_connection.transactions_service.dividends(
+        bob.key.pubkey
+    )
     start = fake_server_with_blockchain.forge.blocks[-1].number + 1
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.generate_dividend()
@@ -58,8 +95,14 @@ async def test_issue_dividend(application_with_one_connection, fake_server_with_
     fake_server_with_blockchain.forge.forge_block()
     fake_server_with_blockchain.forge.forge_block()
     end = fake_server_with_blockchain.forge.blocks[-1].number
-    connections = ConnectionsProcessor.instanciate(application_with_one_connection).connections()
-    await application_with_one_connection.transactions_service.handle_new_blocks(connections, start, end)
-    dividends_after_parse = application_with_one_connection.transactions_service.dividends(bob.key.pubkey)
+    connections = ConnectionsProcessor.instanciate(
+        application_with_one_connection
+    ).connections()
+    await application_with_one_connection.transactions_service.handle_new_blocks(
+        connections, start, end
+    )
+    dividends_after_parse = application_with_one_connection.transactions_service.dividends(
+        bob.key.pubkey
+    )
     assert len(dividends_before_send) + 2 == len(dividends_after_parse)
     await fake_server_with_blockchain.close()
diff --git a/tests/unit/data/test_blockchains_repo.py b/tests/unit/data/test_blockchains_repo.py
index c202c1b4c624226f57a89d4f3bd8f423c0ebd90f..d419530ff645849cd31b33f58010f4127cf79b45 100644
--- a/tests/unit/data/test_blockchains_repo.py
+++ b/tests/unit/data/test_blockchains_repo.py
@@ -7,146 +7,158 @@ from sakia.data.repositories import BlockchainsRepo
 
 def test_add_get_drop_blockchain(meta_repo):
     blockchains_repo = BlockchainsRepo(meta_repo.conn)
-    blockchains_repo.insert(Blockchain(
-        parameters=BlockchainParameters(
-            0.1,
-            86400,
-            100000,
-            10800,
-            40,
-            2629800,
-            31557600,
-            1,
-            0.9,
-            604800,
-            5,
-            12,
-            300,
-            25,
-            10,
-            0.66,
-            2,
-            10800,
-            2629800),
-        current_buid="20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-        current_members_count = 10,
-        current_mass = 1000000,
-        median_time = 86400,
-        last_members_count = 5,
-        last_ud = 100000,
-        last_ud_base = 0,
-        last_ud_time = 86400,
-        previous_mass = 999999,
-        previous_members_count = 10,
-        previous_ud = 6543,
-        previous_ud_base = 0,
-        previous_ud_time = 86400,
-        currency = "testcurrency"
-    ))
+    blockchains_repo.insert(
+        Blockchain(
+            parameters=BlockchainParameters(
+                0.1,
+                86400,
+                100000,
+                10800,
+                40,
+                2629800,
+                31557600,
+                1,
+                0.9,
+                604800,
+                5,
+                12,
+                300,
+                25,
+                10,
+                0.66,
+                2,
+                10800,
+                2629800,
+            ),
+            current_buid="20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            current_members_count=10,
+            current_mass=1000000,
+            median_time=86400,
+            last_members_count=5,
+            last_ud=100000,
+            last_ud_base=0,
+            last_ud_time=86400,
+            previous_mass=999999,
+            previous_members_count=10,
+            previous_ud=6543,
+            previous_ud_base=0,
+            previous_ud_time=86400,
+            currency="testcurrency",
+        )
+    )
     blockchain = blockchains_repo.get_one(currency="testcurrency")
     assert blockchain.parameters == BlockchainParameters(
-            0.1,
-            86400,
-            100000,
-            10800,
-            40,
-            2629800,
-            31557600,
-            1,
-            0.9,
-            604800,
-            5,
-            12,
-            300,
-            25,
-            10,
-            0.66,
-            2,
-            10800,
-            2629800)
+        0.1,
+        86400,
+        100000,
+        10800,
+        40,
+        2629800,
+        31557600,
+        1,
+        0.9,
+        604800,
+        5,
+        12,
+        300,
+        25,
+        10,
+        0.66,
+        2,
+        10800,
+        2629800,
+    )
     assert blockchain.currency == "testcurrency"
-    assert blockchain.current_buid == BlockUID(20, "7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67")
+    assert blockchain.current_buid == BlockUID(
+        20, "7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    )
     assert blockchain.current_members_count == 10
 
     blockchains_repo.drop(blockchain)
     blockchain = blockchains_repo.get_one(currency="testcurrency")
     assert blockchain is None
 
+
 def test_add_get_multiple_blockchain(meta_repo):
     blockchains_repo = BlockchainsRepo(meta_repo.conn)
-    blockchains_repo.insert(Blockchain(
-        parameters=BlockchainParameters(
-            0.1,
-            86400,
-            100000,
-            10800,
-            40,
-            2629800,
-            31557600,
-            1,
-            0.9,
-            604800,
-            5,
-            12,
-            300,
-            25,
-            10,
-            0.66,
-            2,
-            10800,
-            2629800),
-
-        current_buid="20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-        current_members_count = 10,
-        current_mass = 1000000,
-        median_time = 86400,
-        last_members_count = 5,
-        last_ud = 100000,
-        last_ud_base = 0,
-        last_ud_time = 86400,
-        previous_mass = 999999,
-        previous_members_count = 10,
-        previous_ud = 6543,
-        previous_ud_base = 0,
-        previous_ud_time = 86400,
-        currency = "testcurrency"
-    ))
-    blockchains_repo.insert(Blockchain(
-        BlockchainParameters(
-            0.1,
-            86400 * 365,
-            100000,
-            10800,
-            40,
-            2629800,
-            31557600,
-            1,
-            0.9,
-            604800,
-            5,
-            12,
-            300,
-            25,
-            10,
-            0.66,
-            2,
-            10800,
-            2629800),
-        current_buid="20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-        current_members_count = 20,
-        current_mass = 1000000,
-        median_time = 86400,
-        last_members_count = 5,
-        last_ud = 100000,
-        last_ud_base = 0,
-        last_ud_time = 86400,
-        previous_mass = 999999,
-        previous_members_count = 10,
-        previous_ud = 6543,
-        previous_ud_base = 0,
-        previous_ud_time = 86400,
-        currency = "testcurrency2"
-    ))
+    blockchains_repo.insert(
+        Blockchain(
+            parameters=BlockchainParameters(
+                0.1,
+                86400,
+                100000,
+                10800,
+                40,
+                2629800,
+                31557600,
+                1,
+                0.9,
+                604800,
+                5,
+                12,
+                300,
+                25,
+                10,
+                0.66,
+                2,
+                10800,
+                2629800,
+            ),
+            current_buid="20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            current_members_count=10,
+            current_mass=1000000,
+            median_time=86400,
+            last_members_count=5,
+            last_ud=100000,
+            last_ud_base=0,
+            last_ud_time=86400,
+            previous_mass=999999,
+            previous_members_count=10,
+            previous_ud=6543,
+            previous_ud_base=0,
+            previous_ud_time=86400,
+            currency="testcurrency",
+        )
+    )
+    blockchains_repo.insert(
+        Blockchain(
+            BlockchainParameters(
+                0.1,
+                86400 * 365,
+                100000,
+                10800,
+                40,
+                2629800,
+                31557600,
+                1,
+                0.9,
+                604800,
+                5,
+                12,
+                300,
+                25,
+                10,
+                0.66,
+                2,
+                10800,
+                2629800,
+            ),
+            current_buid="20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            current_members_count=20,
+            current_mass=1000000,
+            median_time=86400,
+            last_members_count=5,
+            last_ud=100000,
+            last_ud_base=0,
+            last_ud_time=86400,
+            previous_mass=999999,
+            previous_members_count=10,
+            previous_ud=6543,
+            previous_ud_base=0,
+            previous_ud_time=86400,
+            currency="testcurrency2",
+        )
+    )
 
     blockchains = blockchains_repo.get_all()
     # result sorted by currency name by default
@@ -154,7 +166,7 @@ def test_add_get_multiple_blockchain(meta_repo):
     assert "testcurrency" == blockchains[0].currency
     assert 10 == blockchains[0].current_members_count
 
-    assert 86400*365 == blockchains[1].parameters.dt
+    assert 86400 * 365 == blockchains[1].parameters.dt
     assert "testcurrency2" == blockchains[1].currency
     assert 20 == blockchains[1].current_members_count
 
@@ -181,21 +193,22 @@ def test_add_update_blockchain(meta_repo):
             0.66,
             2,
             10800,
-            2629800),
+            2629800,
+        ),
         current_buid="20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-        current_members_count = 10,
-        current_mass = 1000000,
-        median_time = 86400,
-        last_members_count = 5,
-        last_ud = 100000,
-        last_ud_base = 0,
-        last_ud_time = 86400,
-        previous_mass = 999999,
-        previous_members_count = 10,
-        previous_ud = 6543,
-        previous_ud_base = 0,
-        previous_ud_time = 86400,
-        currency = "testcurrency"
+        current_members_count=10,
+        current_mass=1000000,
+        median_time=86400,
+        last_members_count=5,
+        last_ud=100000,
+        last_ud_base=0,
+        last_ud_time=86400,
+        previous_mass=999999,
+        previous_members_count=10,
+        previous_ud=6543,
+        previous_ud_base=0,
+        previous_ud_time=86400,
+        currency="testcurrency",
     )
     blockchains_repo.insert(blockchain)
     blockchain.current_members_count = 30
@@ -204,7 +217,7 @@ def test_add_update_blockchain(meta_repo):
     assert 30 == blockchain2.current_members_count
 
 
-@pytest.mark.parametrize('meta_repo', [0], indirect=True)
+@pytest.mark.parametrize("meta_repo", [0], indirect=True)
 def test_update_blockchain_table_to_v2(meta_repo):
     blockchains_repo = BlockchainsRepo(meta_repo.conn)
     blockchain = Blockchain(
@@ -224,24 +237,24 @@ def test_update_blockchain_table_to_v2(meta_repo):
             300,
             25,
             10,
-            0.66),
+            0.66,
+        ),
         current_buid="20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-        current_members_count = 10,
-        current_mass = 1000000,
-        median_time = 86400,
-        last_members_count = 5,
-        last_ud = 100000,
-        last_ud_base = 0,
-        last_ud_time = 86400,
-        previous_mass = 999999,
-        previous_members_count = 10,
-        previous_ud = 6543,
-        previous_ud_base = 0,
-        previous_ud_time = 86400,
-        currency = "testcurrency"
+        current_members_count=10,
+        current_mass=1000000,
+        median_time=86400,
+        last_members_count=5,
+        last_ud=100000,
+        last_ud_base=0,
+        last_ud_time=86400,
+        previous_mass=999999,
+        previous_members_count=10,
+        previous_ud=6543,
+        previous_ud_base=0,
+        previous_ud_time=86400,
+        currency="testcurrency",
     )
     blockchains_repo.insert(blockchain)
     meta_repo.upgrade_database()
     blockchain2 = blockchains_repo.get_one(currency="testcurrency")
     assert 0 == blockchain2.parameters.ud_time_0
-
diff --git a/tests/unit/data/test_certifications_repo.py b/tests/unit/data/test_certifications_repo.py
index cf468c14a38f82fcf195ba499cacac3adca4e257..500be61efb3ba890bfdf5835689977cd06b9450e 100644
--- a/tests/unit/data/test_certifications_repo.py
+++ b/tests/unit/data/test_certifications_repo.py
@@ -5,97 +5,150 @@ from sakia.data.entities import Certification
 
 def test_add_get_drop_blockchain(meta_repo):
     certifications_repo = CertificationsRepo(meta_repo.conn)
-    certifications_repo.insert(Certification("testcurrency",
-                                             "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                             "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                             20,
-                                             1473108382,
-                                             "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                             0))
-    certification = certifications_repo.get_one(currency="testcurrency",
-                                                certifier="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                                certified="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                                block=20)
+    certifications_repo.insert(
+        Certification(
+            "testcurrency",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            20,
+            1473108382,
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            0,
+        )
+    )
+    certification = certifications_repo.get_one(
+        currency="testcurrency",
+        certifier="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        certified="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+        block=20,
+    )
     assert certification.currency == "testcurrency"
     assert certification.certifier == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
     assert certification.certified == "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn"
     assert certification.block == 20
     assert certification.timestamp == 1473108382
-    assert certification.signature == "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw=="
+    assert (
+        certification.signature
+        == "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw=="
+    )
     assert certification.written_on == 0
     certifications_repo.drop(certification)
-    certification = certifications_repo.get_one(currency="testcurrency",
-                                       certifier="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                       certified="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                       block=20)
+    certification = certifications_repo.get_one(
+        currency="testcurrency",
+        certifier="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        certified="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+        block=20,
+    )
     assert certification is None
 
 
 def test_add_get_multiple_certification(meta_repo):
     certifications_repo = CertificationsRepo(meta_repo.conn)
-    certifications_repo.insert(Certification("testcurrency",
-                                             "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                             "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                             20, 1473108382,
-                                             "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                             22))
-    certifications_repo.insert(Certification("testcurrency",
-                                             "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                             "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                             101, 1473108382,
-                                             "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                             105))
+    certifications_repo.insert(
+        Certification(
+            "testcurrency",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            20,
+            1473108382,
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            22,
+        )
+    )
+    certifications_repo.insert(
+        Certification(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            101,
+            1473108382,
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            105,
+        )
+    )
     certifications = certifications_repo.get_all(currency="testcurrency")
     assert "testcurrency" in [i.currency for i in certifications]
-    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [i.certifier for i in certifications]
-    assert "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ" in [i.certifier for i in certifications]
-    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [i.certified for i in certifications]
-    assert "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ" in [i.certified for i in certifications]
+    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [
+        i.certifier for i in certifications
+    ]
+    assert "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ" in [
+        i.certifier for i in certifications
+    ]
+    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [
+        i.certified for i in certifications
+    ]
+    assert "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ" in [
+        i.certified for i in certifications
+    ]
 
 
 def test_add_update_certification(meta_repo):
     certifications_repo = CertificationsRepo(meta_repo.conn)
-    certification = Certification("testcurrency",
-                             "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                             "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                             20,
-                             1473108382,
-                             "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                             0)
+    certification = Certification(
+        "testcurrency",
+        "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+        20,
+        1473108382,
+        "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+        0,
+    )
 
     certifications_repo.insert(certification)
     certification.written_on = 22
     certifications_repo.update(certification)
-    cert2 = certifications_repo.get_one(currency="testcurrency",
-                                        certifier="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                        certified="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                        block=20)
+    cert2 = certifications_repo.get_one(
+        currency="testcurrency",
+        certifier="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        certified="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+        block=20,
+    )
     assert cert2.written_on == 22
 
 
-
 def test_expired(meta_repo):
     certifications_repo = CertificationsRepo(meta_repo.conn)
-    not_written_expired = Certification("testcurrency",
-                             "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                             "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                             20,
-                             1000,
-                             "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                             0)
-    written_expired = attr.assoc(not_written_expired, certifier="8Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                 written_on=10)
-    written_not_expired = attr.assoc(not_written_expired, certifier="9Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                     written_on=10, timestamp=3200)
-    not_written_not_expired = attr.assoc(not_written_expired, certifier="1Bqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                         timestamp=4900)
-    for c in (written_expired, written_not_expired, not_written_expired, not_written_not_expired):
+    not_written_expired = Certification(
+        "testcurrency",
+        "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+        20,
+        1000,
+        "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+        0,
+    )
+    written_expired = attr.assoc(
+        not_written_expired,
+        certifier="8Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        written_on=10,
+    )
+    written_not_expired = attr.assoc(
+        not_written_expired,
+        certifier="9Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        written_on=10,
+        timestamp=3200,
+    )
+    not_written_not_expired = attr.assoc(
+        not_written_expired,
+        certifier="1Bqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        timestamp=4900,
+    )
+    for c in (
+        written_expired,
+        written_not_expired,
+        not_written_expired,
+        not_written_not_expired,
+    ):
         certifications_repo.insert(c)
 
-    certs = certifications_repo.expired("testcurrency", "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                        current_ts=5000, sig_window=500, sig_validity=2000)
+    certs = certifications_repo.expired(
+        "testcurrency",
+        "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+        current_ts=5000,
+        sig_window=500,
+        sig_validity=2000,
+    )
     assert written_expired in certs
     assert not_written_expired in certs
     assert not_written_not_expired not in certs
     assert written_not_expired not in certs
-
diff --git a/tests/unit/data/test_connections_repo.py b/tests/unit/data/test_connections_repo.py
index 10156e119d9599b48c994be9cab12610fb167d1b..e6380b25a383e0f89e889fe72e46d900c88464a6 100644
--- a/tests/unit/data/test_connections_repo.py
+++ b/tests/unit/data/test_connections_repo.py
@@ -1,19 +1,26 @@
 from sakia.data.repositories import ConnectionsRepo
 from sakia.data.entities import Connection
 
+
 def test_add_get_drop_connection(meta_repo):
     connections_repo = ConnectionsRepo(meta_repo.conn)
-    connections_repo.insert(Connection("testcurrency",
-                                             "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                             "someuid"))
-    connection = connections_repo.get_one(currency="testcurrency",
-                                       pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                       uid="someuid")
+    connections_repo.insert(
+        Connection(
+            "testcurrency", "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ", "someuid"
+        )
+    )
+    connection = connections_repo.get_one(
+        currency="testcurrency",
+        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        uid="someuid",
+    )
     assert connection.currency == "testcurrency"
     assert connection.pubkey == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
     assert connection.uid == "someuid"
     connections_repo.drop(connection)
-    connection = connections_repo.get_one(currency="testcurrency",
-                                       pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                       uid="someuid")
+    connection = connections_repo.get_one(
+        currency="testcurrency",
+        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        uid="someuid",
+    )
     assert connection is None
diff --git a/tests/unit/data/test_contacts_repo.py b/tests/unit/data/test_contacts_repo.py
index 927c5a078d226e03dc582c3614c915cf43c0888c..0b28afe9a9211fada78fcfb30ff66cafb37ba9bc 100644
--- a/tests/unit/data/test_contacts_repo.py
+++ b/tests/unit/data/test_contacts_repo.py
@@ -4,20 +4,24 @@ from sakia.data.entities import Contact
 
 def test_add_get_drop_contact(meta_repo):
     contacts_repo = ContactsRepo(meta_repo.conn)
-    new_contact = Contact("testcurrency",
-                          "john",
-                          "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ")
+    new_contact = Contact(
+        "testcurrency", "john", "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+    )
     contacts_repo.insert(new_contact)
-    contact = contacts_repo.get_one(currency="testcurrency",
-                                    pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                    name="john")
+    contact = contacts_repo.get_one(
+        currency="testcurrency",
+        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        name="john",
+    )
     assert contact.currency == "testcurrency"
     assert contact.pubkey == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
     assert contact.name == "john"
     assert contact.contact_id == new_contact.contact_id
     contacts_repo.drop(contact)
     meta_repo.conn.commit()
-    contact = contacts_repo.get_one(currency="testcurrency",
-                                    pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                    name="john")
+    contact = contacts_repo.get_one(
+        currency="testcurrency",
+        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        name="john",
+    )
     assert contact is None
diff --git a/tests/unit/data/test_dividends_repo.py b/tests/unit/data/test_dividends_repo.py
index d211b08f288e0d35e32bf707eaefba14c1947e3d..afb4612a1307b40a087cfbb9036c28b2e8f4d665 100644
--- a/tests/unit/data/test_dividends_repo.py
+++ b/tests/unit/data/test_dividends_repo.py
@@ -4,10 +4,19 @@ from sakia.data.entities import Dividend
 
 def test_add_get_drop_dividend(meta_repo):
     dividends_repo = DividendsRepo(meta_repo.conn)
-    dividends_repo.insert(Dividend("testcurrency",
-                               "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                               3, 1346543453, 1565, 1))
-    dividend = dividends_repo.get_one(pubkey="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn")
+    dividends_repo.insert(
+        Dividend(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            3,
+            1346543453,
+            1565,
+            1,
+        )
+    )
+    dividend = dividends_repo.get_one(
+        pubkey="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn"
+    )
     assert dividend.currency == "testcurrency"
     assert dividend.pubkey == "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn"
     assert dividend.timestamp == 1346543453
@@ -16,21 +25,41 @@ def test_add_get_drop_dividend(meta_repo):
     assert dividend.amount == 1565
 
     dividends_repo.drop(dividend)
-    source = dividends_repo.get_one(pubkey="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn")
+    source = dividends_repo.get_one(
+        pubkey="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn"
+    )
     assert source is None
 
 
 def test_add_get_multiple_dividends(meta_repo):
     dividends_repo = DividendsRepo(meta_repo.conn)
-    dividends_repo.insert(Dividend("testcurrency",
-                               "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                               3, 1346543453, 1565, 1))
-    dividends_repo.insert(Dividend("testcurrency",
-                               "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                               243, 4235252353, 45565, 2))
-    dividends = dividends_repo.get_all(currency="testcurrency", pubkey="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn")
+    dividends_repo.insert(
+        Dividend(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            3,
+            1346543453,
+            1565,
+            1,
+        )
+    )
+    dividends_repo.insert(
+        Dividend(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            243,
+            4235252353,
+            45565,
+            2,
+        )
+    )
+    dividends = dividends_repo.get_all(
+        currency="testcurrency", pubkey="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn"
+    )
     assert "testcurrency" in [s.currency for s in dividends]
-    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [s.pubkey for s in dividends]
+    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [
+        s.pubkey for s in dividends
+    ]
     assert 4235252353 in [s.timestamp for s in dividends]
     assert 1346543453 in [s.timestamp for s in dividends]
     assert 45565 in [s.amount for s in dividends]
diff --git a/tests/unit/data/test_identies_repo.py b/tests/unit/data/test_identies_repo.py
index 42fa6ad057b9ab7d2a4ac79d24087c67b951d89d..65ca017a9df0b030c405867c8e2c6b76cd2c9cef 100644
--- a/tests/unit/data/test_identies_repo.py
+++ b/tests/unit/data/test_identies_repo.py
@@ -5,50 +5,75 @@ from duniterpy.documents import BlockUID
 
 def test_add_get_drop_identity(meta_repo):
     identities_repo = IdentitiesRepo(meta_repo.conn)
-    identities_repo.insert(Identity("testcurrency", "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                    "john",
-                                    "20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                                    "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                    1473108382))
-    identity = identities_repo.get_one(currency="testcurrency",
-                                       pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                       uid="john",
-                                       blockstamp=BlockUID(20,
-                                                "7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67")
-                                       )
+    identities_repo.insert(
+        Identity(
+            "testcurrency",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "john",
+            "20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            1473108382,
+        )
+    )
+    identity = identities_repo.get_one(
+        currency="testcurrency",
+        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        uid="john",
+        blockstamp=BlockUID(
+            20, "7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+        ),
+    )
     assert identity.currency == "testcurrency"
     assert identity.pubkey == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
     assert identity.uid == "john"
     assert identity.blockstamp.number == 20
-    assert identity.blockstamp.sha_hash == "7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    assert (
+        identity.blockstamp.sha_hash
+        == "7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    )
     assert identity.timestamp == 1473108382
-    assert identity.signature == "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw=="
+    assert (
+        identity.signature
+        == "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw=="
+    )
     assert identity.member == False
     assert identity.membership_buid == BlockUID.empty()
     assert identity.membership_timestamp == 0
     assert identity.membership_written_on == 0
     identities_repo.drop(identity)
-    identity = identities_repo.get_one(currency="testcurrency",
-                                       pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                       uid="john",
-                                       blockstamp=BlockUID(20,
-                                                "7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67")
-                                        )
+    identity = identities_repo.get_one(
+        currency="testcurrency",
+        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        uid="john",
+        blockstamp=BlockUID(
+            20, "7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+        ),
+    )
     assert identity is None
 
 
 def test_add_get_multiple_identity(meta_repo):
     identities_repo = IdentitiesRepo(meta_repo.conn)
-    identities_repo.insert(Identity("testcurrency", "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                    "john",
-                                    "20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                                    "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                    1473108382))
-    identities_repo.insert(Identity("testcurrency", "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                    "doe",
-                                    "101-BAD49448A1AD73C978CEDCB8F137D20A5715EBAA739DAEF76B1E28EE67B2C00C",
-                                    "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                    1455433535))
+    identities_repo.insert(
+        Identity(
+            "testcurrency",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "john",
+            "20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            1473108382,
+        )
+    )
+    identities_repo.insert(
+        Identity(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            "doe",
+            "101-BAD49448A1AD73C978CEDCB8F137D20A5715EBAA739DAEF76B1E28EE67B2C00C",
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            1455433535,
+        )
+    )
     identities = identities_repo.get_all(currency="testcurrency")
     assert "testcurrency" in [i.currency for i in identities]
     assert "john" in [i.uid for i in identities]
@@ -57,14 +82,18 @@ def test_add_get_multiple_identity(meta_repo):
 
 def test_add_update_identity(meta_repo):
     identities_repo = IdentitiesRepo(meta_repo.conn)
-    identity = Identity("testcurrency", "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                    "john",
-                                    "20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                                    "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                    1473108382)
+    identity = Identity(
+        "testcurrency",
+        "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        "john",
+        "20-7518C700E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+        "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+        1473108382,
+    )
     identities_repo.insert(identity)
     identity.member = True
     identities_repo.update(identity)
-    identity2 = identities_repo.get_one(currency="testcurrency",
-                                        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ")
+    identity2 = identities_repo.get_one(
+        currency="testcurrency", pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+    )
     assert identity2.member is True
diff --git a/tests/unit/data/test_node_connector.py b/tests/unit/data/test_node_connector.py
index 8f0515aaf6f07c11484c3fbfac07d63490889d6f..cc9f465f160731bfe056c59711f36dfd51211d49 100644
--- a/tests/unit/data/test_node_connector.py
+++ b/tests/unit/data/test_node_connector.py
@@ -3,7 +3,8 @@ from sakia.data.connectors import NodeConnector
 
 
 def test_from_peer():
-    peer = Peer.from_signed_raw("""Version: 2
+    peer = Peer.from_signed_raw(
+        """Version: 2
 Type: Peer
 Currency: meta_brouzouf
 PublicKey: 8Fi1VSTbjkXguwThF4v2ZxC5whK7pwG2vcGTkPUPjPGU
@@ -11,8 +12,11 @@ Block: 48698-000005E0F228038E4DDD4F6CA4ACB01EC88FBAF8
 Endpoints:
 BASIC_MERKLED_API duniter.inso.ovh 80
 82o1sNCh1bLpUXU6nacbK48HBcA9Eu2sPkL1/3c2GtDPxBUZd2U2sb7DxwJ54n6ce9G0Oy7nd1hCxN3fS0oADw==
-""")
-    connector = NodeConnector.from_peer('meta_brouzouf', peer, None)
+"""
+    )
+    connector = NodeConnector.from_peer("meta_brouzouf", peer, None)
     assert connector.node.pubkey == "8Fi1VSTbjkXguwThF4v2ZxC5whK7pwG2vcGTkPUPjPGU"
-    assert connector.node.endpoints[0].inline() == "BASIC_MERKLED_API duniter.inso.ovh 80"
+    assert (
+        connector.node.endpoints[0].inline() == "BASIC_MERKLED_API duniter.inso.ovh 80"
+    )
     assert connector.node.currency == "meta_brouzouf"
diff --git a/tests/unit/data/test_nodes_repo.py b/tests/unit/data/test_nodes_repo.py
index e06d11bf1a33e199da0498e5a3d1a8f68ec0b3fd..1ea58771ad7ad93ff07b7a292e17b29a7c6b9ea4 100644
--- a/tests/unit/data/test_nodes_repo.py
+++ b/tests/unit/data/test_nodes_repo.py
@@ -5,29 +5,40 @@ from duniterpy.documents import BlockUID, BMAEndpoint, UnknownEndpoint, block_ui
 
 def test_add_get_drop_node(meta_repo):
     nodes_repo = NodesRepo(meta_repo.conn)
-    inserted = Node(currency="testcurrency",
-                    pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                    endpoints="""BASIC_MERKLED_API test-net.duniter.fr 13.222.11.22 9201
+    inserted = Node(
+        currency="testcurrency",
+        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        endpoints="""BASIC_MERKLED_API test-net.duniter.fr 13.222.11.22 9201
 BASIC_MERKLED_API testnet.duniter.org 80
 UNKNOWNAPI some useless information""",
-                     peer_blockstamp=BlockUID.empty(),
-                     uid="doe",
-                     current_buid="15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                     current_ts=12376543345,
-                     previous_buid="14-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                     state=0,
-                     software="duniter",
-                     version="0.30.17")
+        peer_blockstamp=BlockUID.empty(),
+        uid="doe",
+        current_buid="15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+        current_ts=12376543345,
+        previous_buid="14-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+        state=0,
+        software="duniter",
+        version="0.30.17",
+    )
     nodes_repo.insert(inserted)
-    node = nodes_repo.get_one(currency="testcurrency",
-                              pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ")
+    node = nodes_repo.get_one(
+        currency="testcurrency", pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
+    )
     assert node.currency == "testcurrency"
     assert node.pubkey == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
-    assert node.endpoints[0] == BMAEndpoint("test-net.duniter.fr", "13.222.11.22", None, 9201)
+    assert node.endpoints[0] == BMAEndpoint(
+        "test-net.duniter.fr", "13.222.11.22", None, 9201
+    )
     assert node.endpoints[1] == BMAEndpoint("testnet.duniter.org", None, None, 80)
-    assert node.endpoints[2] == UnknownEndpoint("UNKNOWNAPI", ["some", "useless", "information"])
-    assert node.previous_buid == block_uid("14-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67")
-    assert node.current_buid == block_uid("15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67")
+    assert node.endpoints[2] == UnknownEndpoint(
+        "UNKNOWNAPI", ["some", "useless", "information"]
+    )
+    assert node.previous_buid == block_uid(
+        "14-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    )
+    assert node.current_buid == block_uid(
+        "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    )
     assert node.state == 0
     assert node.software == "duniter"
     assert node.version == "0.30.17"
@@ -41,54 +52,70 @@ UNKNOWNAPI some useless information""",
 
 def test_add_get_multiple_node(meta_repo):
     nodes_repo = NodesRepo(meta_repo.conn)
-    nodes_repo.insert(Node("testcurrency",
-                           "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                           """BASIC_MERKLED_API test-net.duniter.fr 13.222.11.22 9201
+    nodes_repo.insert(
+        Node(
+            "testcurrency",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            """BASIC_MERKLED_API test-net.duniter.fr 13.222.11.22 9201
 BASIC_MERKLED_API testnet.duniter.org 80
 UNKNOWNAPI some useless information""",
-                           BlockUID.empty(),
-                           "doe",
-                           "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                           12376543345,
-                           "14-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                           0,
-                           "duniter",
-                           "0.30.17"))
-    nodes_repo.insert(Node("testcurrency",
-                           "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                           "BASIC_MERKLED_API test-net.duniter.org 22.22.22.22 9201",
-                           BlockUID.empty(),
-                           "doe",
-                           "18-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                           12376543345,
-                           "12-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                           0,
-                           "duniter",
-                           "0.30.2a5"))
+            BlockUID.empty(),
+            "doe",
+            "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            12376543345,
+            "14-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            0,
+            "duniter",
+            "0.30.17",
+        )
+    )
+    nodes_repo.insert(
+        Node(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            "BASIC_MERKLED_API test-net.duniter.org 22.22.22.22 9201",
+            BlockUID.empty(),
+            "doe",
+            "18-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            12376543345,
+            "12-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            0,
+            "duniter",
+            "0.30.2a5",
+        )
+    )
     nodes = nodes_repo.get_all(currency="testcurrency")
-    assert "testcurrency" in  [t.currency for t in nodes]
-    assert "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ" in  [n.pubkey for n in nodes]
-    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in  [n.pubkey for n in nodes]
+    assert "testcurrency" in [t.currency for t in nodes]
+    assert "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ" in [n.pubkey for n in nodes]
+    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [n.pubkey for n in nodes]
 
 
 def test_add_update_node(meta_repo):
     nodes_repo = NodesRepo(meta_repo.conn)
-    node = Node("testcurrency",
-                "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                """BASIC_MERKLED_API test-net.duniter.fr 13.222.11.22 9201
+    node = Node(
+        "testcurrency",
+        "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        """BASIC_MERKLED_API test-net.duniter.fr 13.222.11.22 9201
 BASIC_MERKLED_API testnet.duniter.org 80
 UNKNOWNAPI some useless information""",
-                BlockUID.empty(),
-                "doe",
-                "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                12376543345,
-                "14-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                0,
-                "duniter")
+        BlockUID.empty(),
+        "doe",
+        "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+        12376543345,
+        "14-AEFFCB00E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+        0,
+        "duniter",
+    )
     nodes_repo.insert(node)
     node.previous_buid = node.current_buid
-    node.current_buid = "16-77543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    node.current_buid = (
+        "16-77543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    )
     nodes_repo.update(node)
     node2 = nodes_repo.get_one(pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ")
-    assert node2.current_buid == block_uid("16-77543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67")
-    assert node2.previous_buid == block_uid("15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67")
+    assert node2.current_buid == block_uid(
+        "16-77543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    )
+    assert node2.previous_buid == block_uid(
+        "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    )
diff --git a/tests/unit/data/test_sources_repo.py b/tests/unit/data/test_sources_repo.py
index 89fadbfb6e2268396a2edab7562ca2a9af29953f..858011baf228f9939472f0f7ba2e5d8f107ad1e7 100644
--- a/tests/unit/data/test_sources_repo.py
+++ b/tests/unit/data/test_sources_repo.py
@@ -2,16 +2,22 @@ from sakia.data.repositories import SourcesRepo
 from sakia.data.entities import Source
 
 
-def test_add_get_drop_source( meta_repo):
+def test_add_get_drop_source(meta_repo):
     sources_repo = SourcesRepo(meta_repo.conn)
-    sources_repo.insert(Source("testcurrency",
-                               "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                               "0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843",
-                               3,
-                               "T",
-                               1565,
-                               1))
-    source = sources_repo.get_one(identifier="0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843")
+    sources_repo.insert(
+        Source(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            "0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843",
+            3,
+            "T",
+            1565,
+            1,
+        )
+    )
+    source = sources_repo.get_one(
+        identifier="0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843"
+    )
     assert source.currency == "testcurrency"
     assert source.pubkey == "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn"
     assert source.type == "T"
@@ -20,32 +26,48 @@ def test_add_get_drop_source( meta_repo):
     assert source.noffset == 3
 
     sources_repo.drop(source)
-    source = sources_repo.get_one(identifier="0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843")
+    source = sources_repo.get_one(
+        identifier="0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843"
+    )
     assert source is None
 
 
 def test_add_get_multiple_source(meta_repo):
     sources_repo = SourcesRepo(meta_repo.conn)
-    sources_repo.insert(Source("testcurrency",
-                               "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                               "0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843",
-                               3,
-                               "T",
-                               1565,
-                               1))
-    sources_repo.insert(Source("testcurrency",
-                               "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                               "2pyPsXM8UCB88jP2NRM4rUHxb63qm89JMEWbpoRrhyDK",
-                               22635,
-                               "D",
-                               726946,
-                               1))
-    sources = sources_repo.get_all(currency="testcurrency", pubkey="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn")
+    sources_repo.insert(
+        Source(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            "0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843",
+            3,
+            "T",
+            1565,
+            1,
+        )
+    )
+    sources_repo.insert(
+        Source(
+            "testcurrency",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            "2pyPsXM8UCB88jP2NRM4rUHxb63qm89JMEWbpoRrhyDK",
+            22635,
+            "D",
+            726946,
+            1,
+        )
+    )
+    sources = sources_repo.get_all(
+        currency="testcurrency", pubkey="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn"
+    )
     assert "testcurrency" in [s.currency for s in sources]
     assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [s.pubkey for s in sources]
-    assert "2pyPsXM8UCB88jP2NRM4rUHxb63qm89JMEWbpoRrhyDK" in [s.identifier for s in sources]
+    assert "2pyPsXM8UCB88jP2NRM4rUHxb63qm89JMEWbpoRrhyDK" in [
+        s.identifier for s in sources
+    ]
     assert "T" in [s.type for s in sources]
     assert "D" in [s.type for s in sources]
     assert 726946 in [s.amount for s in sources]
     assert 1565 in [s.amount for s in sources]
-    assert "0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843" in [s.identifier for s in sources]
+    assert "0835CEE9B4766B3866DD942971B3EE2CF953599EB9D35BFD5F1345879498B843" in [
+        s.identifier for s in sources
+    ]
diff --git a/tests/unit/data/test_transactions_repo.py b/tests/unit/data/test_transactions_repo.py
index 1efda6a1f6584e59e200bc5942acfaca84a91368..c717bcad0d7f1589f69d61cabbe95ed880d549cd 100644
--- a/tests/unit/data/test_transactions_repo.py
+++ b/tests/unit/data/test_transactions_repo.py
@@ -4,28 +4,43 @@ from sakia.data.entities import Transaction
 
 def test_add_get_drop_transaction(meta_repo):
     transactions_repo = TransactionsRepo(meta_repo.conn)
-    transactions_repo.insert(Transaction("testcurrency",
-                                         "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                         "FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365",
-                                         20,
-                                         "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                                         1473108382,
-                                         "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                         "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                         "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                         1565,
-                                         1,
-                                         "",
-                                         0,
-                                         Transaction.TO_SEND))
-    transaction = transactions_repo.get_one(sha_hash="FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365")
+    transactions_repo.insert(
+        Transaction(
+            "testcurrency",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365",
+            20,
+            "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            1473108382,
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            1565,
+            1,
+            "",
+            0,
+            Transaction.TO_SEND,
+        )
+    )
+    transaction = transactions_repo.get_one(
+        sha_hash="FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365"
+    )
     assert transaction.currency == "testcurrency"
-    assert transaction.sha_hash == "FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365"
+    assert (
+        transaction.sha_hash
+        == "FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365"
+    )
     assert transaction.written_block == 20
     assert transaction.blockstamp.number == 15
-    assert transaction.blockstamp.sha_hash == "76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    assert (
+        transaction.blockstamp.sha_hash
+        == "76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67"
+    )
     assert transaction.timestamp == 1473108382
-    assert transaction.signatures[0] == "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw=="
+    assert (
+        transaction.signatures[0]
+        == "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw=="
+    )
     assert transaction.amount == 1565
     assert transaction.amount_base == 1
     assert transaction.issuers[0] == "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
@@ -33,64 +48,82 @@ def test_add_get_drop_transaction(meta_repo):
     assert transaction.comment == ""
     assert transaction.txid == 0
     transactions_repo.drop(transaction)
-    transaction = transactions_repo.get_one(sha_hash="FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365")
+    transaction = transactions_repo.get_one(
+        sha_hash="FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365"
+    )
     assert transaction is None
 
 
 def test_add_get_multiple_transaction(meta_repo):
     transactions_repo = TransactionsRepo(meta_repo.conn)
-    transactions_repo.insert(Transaction("testcurrency",
-                                         "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                         "A0AC57E2E4B24D66F2D25E66D8501D8E881D9E6453D1789ED753D7D426537ED5",
-                                         12,
-                                         "543-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                                         1473108382,
-                                         "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                         "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                         "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                         14,
-                                         2,
-                                         "Test",
-                                         2,
-                                         Transaction.TO_SEND))
-    transactions_repo.insert(Transaction("testcurrency",
-                                         "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                         "FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365",
-                                         20,
-                                         "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                                         1473108382,
-                                         "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                                         "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                                         "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                                         1565,
-                                         1,
-                                         "",
-                                         0,
-                                         Transaction.TO_SEND))
+    transactions_repo.insert(
+        Transaction(
+            "testcurrency",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "A0AC57E2E4B24D66F2D25E66D8501D8E881D9E6453D1789ED753D7D426537ED5",
+            12,
+            "543-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            1473108382,
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            14,
+            2,
+            "Test",
+            2,
+            Transaction.TO_SEND,
+        )
+    )
+    transactions_repo.insert(
+        Transaction(
+            "testcurrency",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365",
+            20,
+            "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+            1473108382,
+            "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+            "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+            "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+            1565,
+            1,
+            "",
+            0,
+            Transaction.TO_SEND,
+        )
+    )
     transactions = transactions_repo.get_all(currency="testcurrency")
     assert "testcurrency" in [t.currency for t in transactions]
-    assert "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ" in [t.receivers[0] for t in transactions]
-    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [t.issuers[0] for t in transactions]
+    assert "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ" in [
+        t.receivers[0] for t in transactions
+    ]
+    assert "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn" in [
+        t.issuers[0] for t in transactions
+    ]
 
 
 def test_add_update_transaction(meta_repo):
     transactions_repo = TransactionsRepo(meta_repo.conn)
-    transaction = Transaction(currency      = "testcurrency",
-                              pubkey        = "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                              sha_hash      = "FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365",
-                              written_block = 20,
-                              blockstamp    = "15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
-                              timestamp     = 1473108382,
-                              signatures    = "H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
-                              issuers       = "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
-                              receivers     = "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
-                              amount        = 1565,
-                              amount_base   = 1,
-                              comment       = "",
-                              txid          = 0,
-                              state         = Transaction.TO_SEND)
+    transaction = Transaction(
+        currency="testcurrency",
+        pubkey="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        sha_hash="FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365",
+        written_block=20,
+        blockstamp="15-76543400E78B56CC21FB1DDC6CBAB24E0FACC9A798F5ED8736EA007F38617D67",
+        timestamp=1473108382,
+        signatures="H41/8OGV2W4CLKbE35kk5t1HJQsb3jEM0/QGLUf80CwJvGZf3HvVCcNtHPUFoUBKEDQO9mPK3KJkqOoxHpqHCw==",
+        issuers="7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ",
+        receivers="FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn",
+        amount=1565,
+        amount_base=1,
+        comment="",
+        txid=0,
+        state=Transaction.TO_SEND,
+    )
     transactions_repo.insert(transaction)
     transaction.written_on = None
     transactions_repo.update(transaction)
-    transaction2 = transactions_repo.get_one(sha_hash="FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365")
+    transaction2 = transactions_repo.get_one(
+        sha_hash="FCAD5A388AC8A811B45A9334A375585E77071AA9F6E5B6896582961A6C66F365"
+    )
     assert transaction2.written_block == 20
diff --git a/tests/unit/gui/test_generic_tree.py b/tests/unit/gui/test_generic_tree.py
index 8a462f5ffe6319a2fd57451e29f1b6056b1332d1..cc298f4841ca47800b0c170966d908fab3e3772f 100644
--- a/tests/unit/gui/test_generic_tree.py
+++ b/tests/unit/gui/test_generic_tree.py
@@ -5,49 +5,22 @@ from sakia.models.generic_tree import GenericTreeModel
 def test_generic_tree():
     data = [
         {
-            'node': {
-                'title': "Default Profile"
-            },
-            'children': [
+            "node": {"title": "Default Profile"},
+            "children": [
                 {
-                    'node': {
-                        'title': "Test net (inso)"
-                    },
-                    'children': [
-                        {
-                            'node': {
-                                'title': "Transactions"
-                            },
-                            'children': []
-                        },
-                        {
-                            'node': {
-                                'title': "Network"
-                            },
-                            'children': []
-                        }
-                    ]
+                    "node": {"title": "Test net (inso)"},
+                    "children": [
+                        {"node": {"title": "Transactions"}, "children": []},
+                        {"node": {"title": "Network"}, "children": []},
+                    ],
                 },
                 {
-                    'node': {
-                        'title': "Le sou"
-                    },
-                    'children': [
-                        {
-                            'node': {
-                                'title': "Transactions"
-                            },
-                            'children': {}
-                        },
-                        {
-                            'node': {
-                                'title': "Network"
-                            },
-                            'children': {
-                            }
-                        }
-                    ]
-                }
+                    "node": {"title": "Le sou"},
+                    "children": [
+                        {"node": {"title": "Transactions"}, "children": {}},
+                        {"node": {"title": "Network"}, "children": {}},
+                    ],
+                },
             ],
         }
     ]
diff --git a/tests/unit/money/test_quantitative.py b/tests/unit/money/test_quantitative.py
index 38085d0d4fa82565bd8cce3e2cf5346e864f9b32..95f8134f82751144aecbdea7055a65048492a253 100644
--- a/tests/unit/money/test_quantitative.py
+++ b/tests/unit/money/test_quantitative.py
@@ -2,7 +2,9 @@ from sakia.money import Quantitative
 
 
 def test_value(application_with_one_connection, bob):
-    referential = Quantitative(101010110, bob.currency, application_with_one_connection, None)
+    referential = Quantitative(
+        101010110, bob.currency, application_with_one_connection, None
+    )
     value = referential.value()
     assert value == 1010101.10
 
@@ -14,15 +16,21 @@ def test_differential(application_with_one_connection, bob):
 
 
 def test_localized_no_si(application_with_one_connection, bob):
-    referential = Quantitative(101010110, bob.currency, application_with_one_connection, None)
+    referential = Quantitative(
+        101010110, bob.currency, application_with_one_connection, None
+    )
     value = referential.localized(units=True)
     assert value == "1,010,101.10 units"
 
 
 def test_localized_with_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = Quantitative(101010000, bob.currency, application_with_one_connection, None)
-    blockchain = application_with_one_connection.db.blockchains_repo.get_one(currency=bob.currency)
+    referential = Quantitative(
+        101010000, bob.currency, application_with_one_connection, None
+    )
+    blockchain = application_with_one_connection.db.blockchains_repo.get_one(
+        currency=bob.currency
+    )
     blockchain.last_ud_base = 3
     application_with_one_connection.db.blockchains_repo.update(blockchain)
     value = referential.localized(units=True, show_base=True)
@@ -31,15 +39,21 @@ def test_localized_with_si(application_with_one_connection, bob):
 
 def test_localized_no_units_no_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = Quantitative(101010110, bob.currency, application_with_one_connection, None)
+    referential = Quantitative(
+        101010110, bob.currency, application_with_one_connection, None
+    )
     value = referential.localized(units=False, show_base=False)
     assert value == "1,010,101.10"
 
 
 def test_localized_no_units_with_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = Quantitative(101010000, bob.currency, application_with_one_connection, None)
-    blockchain = application_with_one_connection.db.blockchains_repo.get_one(currency=bob.currency)
+    referential = Quantitative(
+        101010000, bob.currency, application_with_one_connection, None
+    )
+    blockchain = application_with_one_connection.db.blockchains_repo.get_one(
+        currency=bob.currency
+    )
     blockchain.last_ud_base = 3
     application_with_one_connection.db.blockchains_repo.update(blockchain)
     value = referential.localized(units=False, show_base=True)
@@ -47,15 +61,21 @@ def test_localized_no_units_with_si(application_with_one_connection, bob):
 
 
 def test_diff_localized_no_si(application_with_one_connection, bob):
-    referential = Quantitative(101010110, bob.currency, application_with_one_connection, None)
+    referential = Quantitative(
+        101010110, bob.currency, application_with_one_connection, None
+    )
     value = referential.diff_localized(units=True)
     assert value == "1,010,101.10 units"
 
 
 def test_diff_localized_with_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = Quantitative(101010000, bob.currency, application_with_one_connection, None)
-    blockchain = application_with_one_connection.db.blockchains_repo.get_one(currency=bob.currency)
+    referential = Quantitative(
+        101010000, bob.currency, application_with_one_connection, None
+    )
+    blockchain = application_with_one_connection.db.blockchains_repo.get_one(
+        currency=bob.currency
+    )
     blockchain.last_ud_base = 3
     application_with_one_connection.db.blockchains_repo.update(blockchain)
 
@@ -65,15 +85,21 @@ def test_diff_localized_with_si(application_with_one_connection, bob):
 
 def test_diff_localized_no_units_no_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = Quantitative(101010110, bob.currency, application_with_one_connection, None)
+    referential = Quantitative(
+        101010110, bob.currency, application_with_one_connection, None
+    )
     value = referential.diff_localized(units=False, show_base=False)
     assert value == "1,010,101.10"
 
 
 def test_diff_localized_no_units_with_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = Quantitative(10100000000, bob.currency, application_with_one_connection, None)
-    blockchain = application_with_one_connection.db.blockchains_repo.get_one(currency=bob.currency)
+    referential = Quantitative(
+        10100000000, bob.currency, application_with_one_connection, None
+    )
+    blockchain = application_with_one_connection.db.blockchains_repo.get_one(
+        currency=bob.currency
+    )
     blockchain.last_ud_base = 6
     application_with_one_connection.db.blockchains_repo.update(blockchain)
     value = referential.diff_localized(units=False, show_base=True)
@@ -82,8 +108,12 @@ def test_diff_localized_no_units_with_si(application_with_one_connection, bob):
 
 def test_diff_localized_no_units_no_base(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = Quantitative(10100000000, bob.currency, application_with_one_connection, None)
-    blockchain = application_with_one_connection.db.blockchains_repo.get_one(currency=bob.currency)
+    referential = Quantitative(
+        10100000000, bob.currency, application_with_one_connection, None
+    )
+    blockchain = application_with_one_connection.db.blockchains_repo.get_one(
+        currency=bob.currency
+    )
     blockchain.last_ud_base = 6
     application_with_one_connection.db.blockchains_repo.update(blockchain)
     value = referential.diff_localized(units=False, show_base=False)
diff --git a/tests/unit/money/test_quantitative_zsum.py b/tests/unit/money/test_quantitative_zsum.py
index 2ef09e7cf4775a067908cc86f2059c4a1076d141..f7269a29df1b4c517fc390755eb3bb9bf350be7f 100644
--- a/tests/unit/money/test_quantitative_zsum.py
+++ b/tests/unit/money/test_quantitative_zsum.py
@@ -2,54 +2,72 @@ from sakia.money import QuantitativeZSum
 
 
 def test_value(application_with_one_connection, bob):
-    referential = QuantitativeZSum(110, bob.currency, application_with_one_connection, None)
+    referential = QuantitativeZSum(
+        110, bob.currency, application_with_one_connection, None
+    )
     value = referential.value()
     assert value == -10.79
 
 
 def test_differential(application_with_one_connection, bob):
-    referential = QuantitativeZSum(110, bob.currency, application_with_one_connection, None)
+    referential = QuantitativeZSum(
+        110, bob.currency, application_with_one_connection, None
+    )
     value = referential.value()
     assert value == -10.79
 
 
 def test_localized_no_si(application_with_one_connection, bob):
-    referential = QuantitativeZSum(110, bob.currency, application_with_one_connection, None)
+    referential = QuantitativeZSum(
+        110, bob.currency, application_with_one_connection, None
+    )
     value = referential.localized(units=True)
     assert value == "-10.79 Q0 units"
 
 
 def test_localized_with_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = QuantitativeZSum(110 * 1000, bob.currency, application_with_one_connection, None)
+    referential = QuantitativeZSum(
+        110 * 1000, bob.currency, application_with_one_connection, None
+    )
     value = referential.localized(units=True, show_base=True)
     assert value == "1,088.11 Q0 units"
 
 
 def test_localized_no_units_no_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = QuantitativeZSum(110, bob.currency, application_with_one_connection, None)
+    referential = QuantitativeZSum(
+        110, bob.currency, application_with_one_connection, None
+    )
     value = referential.localized(units=False, show_base=False)
     assert value == "-10.79"
 
 
 def test_localized_no_units_with_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = QuantitativeZSum(110 * 1000, bob.currency, application_with_one_connection, None)
+    referential = QuantitativeZSum(
+        110 * 1000, bob.currency, application_with_one_connection, None
+    )
     value = referential.localized(units=False, show_base=True)
     assert value == "1,088.11"
 
-    
+
 def test_diff_localized_no_si(application_with_one_connection, bob):
-    referential = QuantitativeZSum(110 * 1000, bob.currency, application_with_one_connection, None)
+    referential = QuantitativeZSum(
+        110 * 1000, bob.currency, application_with_one_connection, None
+    )
     value = referential.diff_localized(units=True)
     assert value == "1,100.00 units"
 
 
 def test_diff_localized_with_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = QuantitativeZSum(101000000, bob.currency, application_with_one_connection, None)
-    blockchain = application_with_one_connection.db.blockchains_repo.get_one(currency=bob.currency)
+    referential = QuantitativeZSum(
+        101000000, bob.currency, application_with_one_connection, None
+    )
+    blockchain = application_with_one_connection.db.blockchains_repo.get_one(
+        currency=bob.currency
+    )
     blockchain.last_ud_base = 3
     application_with_one_connection.db.blockchains_repo.update(blockchain)
     value = referential.diff_localized(units=True, show_base=True)
@@ -58,15 +76,21 @@ def test_diff_localized_with_si(application_with_one_connection, bob):
 
 def test_diff_localized_no_units_no_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = QuantitativeZSum(101010110, bob.currency, application_with_one_connection, None)
+    referential = QuantitativeZSum(
+        101010110, bob.currency, application_with_one_connection, None
+    )
     value = referential.diff_localized(units=False, show_base=False)
     assert value == "1,010,101.10"
 
 
 def test_diff_localized_no_units_with_si(application_with_one_connection, bob):
     application_with_one_connection.parameters.digits_after_comma = 6
-    referential = QuantitativeZSum(101000000, bob.currency, application_with_one_connection, None)
-    blockchain = application_with_one_connection.db.blockchains_repo.get_one(currency=bob.currency)
+    referential = QuantitativeZSum(
+        101000000, bob.currency, application_with_one_connection, None
+    )
+    blockchain = application_with_one_connection.db.blockchains_repo.get_one(
+        currency=bob.currency
+    )
     blockchain.last_ud_base = 3
     application_with_one_connection.db.blockchains_repo.update(blockchain)
     value = referential.diff_localized(units=False, show_base=True)
diff --git a/tests/unit/money/test_relative.py b/tests/unit/money/test_relative.py
index d66053593871d5548394aebf4f131e8a59326875..d1aa96d84f8d42ba96f05399894516ec934409d3 100644
--- a/tests/unit/money/test_relative.py
+++ b/tests/unit/money/test_relative.py
@@ -3,7 +3,9 @@ from sakia.money import Relative
 
 
 def test_value(application_with_one_connection, bob):
-    referential = Relative(13555300, bob.currency, application_with_one_connection, None)
+    referential = Relative(
+        13555300, bob.currency, application_with_one_connection, None
+    )
     value = referential.value()
     assert value == pytest.approx(58177.253218)
 
diff --git a/tests/unit/money/test_relative_zsum.py b/tests/unit/money/test_relative_zsum.py
index e9f11b1f07fb5f8266cf116599a6c117f6b2207f..d0d1279f13acd4b562f9f414265f4f5ca606866b 100644
--- a/tests/unit/money/test_relative_zsum.py
+++ b/tests/unit/money/test_relative_zsum.py
@@ -3,7 +3,9 @@ from sakia.money import RelativeZSum
 
 
 def test_value(application_with_one_connection, bob):
-    referential = RelativeZSum(2702, bob.currency, application_with_one_connection, None)
+    referential = RelativeZSum(
+        2702, bob.currency, application_with_one_connection, None
+    )
     value = referential.value()
     assert value == approx(8.70007)
 
diff --git a/tests/unit/test_decorators.py b/tests/unit/test_decorators.py
index ca38c4332ca7f254d5e5e74edb9a4f960c657dd7..6834ab63305938e2a0671ad62c65c5c22ce92a39 100644
--- a/tests/unit/test_decorators.py
+++ b/tests/unit/test_decorators.py
@@ -16,7 +16,7 @@ async def test_run_only_once():
             callback(name)
 
     task_runner = TaskRunner()
-    calls = {'A': 0, 'B': 0, 'C': 0}
+    calls = {"A": 0, "B": 0, "C": 0}
 
     def incrementer(name):
         nonlocal calls
@@ -52,7 +52,7 @@ async def test_cancel_once(application):
             cancel_once_task(self, self.some_long_task)
 
     task_runner = TaskRunner()
-    calls = {'A': 0, 'B': 0}
+    calls = {"A": 0, "B": 0}
 
     def incrementer(name):
         nonlocal calls
@@ -87,7 +87,7 @@ async def test_cancel_once_two_times(application):
             cancel_once_task(self, self.some_long_task)
 
     task_runner = TaskRunner()
-    calls = {'A': 0, 'B': 0, 'C': 0, 'D': 0}
+    calls = {"A": 0, "B": 0, "C": 0, "D": 0}
 
     def incrementer(name):
         nonlocal calls
@@ -100,7 +100,9 @@ async def test_cancel_once_two_times(application):
     application.loop.call_soon(lambda: task_runner.some_long_task("B", incrementer))
     application.loop.call_later(1.5, lambda: task_runner.cancel_long_task())
     application.loop.call_later(2, lambda: task_runner.some_long_task("C", incrementer))
-    application.loop.call_later(2.1, lambda: task_runner.some_long_task("D", incrementer))
+    application.loop.call_later(
+        2.1, lambda: task_runner.some_long_task("D", incrementer)
+    )
     application.loop.call_later(3.5, lambda: task_runner.cancel_long_task())
     await exec_test()
     assert calls["A"] == 0
@@ -130,7 +132,7 @@ async def test_two_runners():
         def cancel_long_task(self):
             cancel_once_task(self, self.some_long_task)
 
-    calls = {'A': 0, 'B': 0, 'C': 0}
+    calls = {"A": 0, "B": 0, "C": 0}
 
     def incrementer(name):
         nonlocal calls