From 1a2726c75b9f29fa474547bb129eea22e303c1af Mon Sep 17 00:00:00 2001 From: vtexier <vit@free.fr> Date: Wed, 16 Oct 2019 16:52:42 +0200 Subject: [PATCH] [fix] #58 fix package api.ws2p after rebase --- duniterpy/api/ws2p/__init__.py | 25 +++++++++++++++++++++++++ duniterpy/api/ws2p/requests.py | 7 ++----- 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 duniterpy/api/ws2p/__init__.py diff --git a/duniterpy/api/ws2p/__init__.py b/duniterpy/api/ws2p/__init__.py new file mode 100644 index 00000000..09c79049 --- /dev/null +++ b/duniterpy/api/ws2p/__init__.py @@ -0,0 +1,25 @@ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# Authors: +# Caner Candan <caner@candan.fr>, http://caner.candan.fr +# Inso <insomniak.fr at gmail.com> +import logging +from . import network, requests + +__all__ = ["network", "requests"] + +PROTOCOL_VERSION = 1 + +logger = logging.getLogger("duniter") diff --git a/duniterpy/api/ws2p/requests.py b/duniterpy/api/ws2p/requests.py index 59ae1791..2586253c 100644 --- a/duniterpy/api/ws2p/requests.py +++ b/duniterpy/api/ws2p/requests.py @@ -1,8 +1,5 @@ import json import re -from typing import Optional - -from duniterpy.helpers import get_ws2p_challenge from duniterpy.api.bma.blockchain import BLOCK_SCHEMA, BLOCKS_SCHEMA ERROR_RESPONSE_SCHEMA = { @@ -96,7 +93,7 @@ REQUIREMENTS_SCHEMA = { }, "pendingCerts": { "type": "array", - "items" : { + "items": { "type": "object", "properties": { "block": {"type": "number"}, @@ -118,7 +115,7 @@ REQUIREMENTS_SCHEMA = { }, "pendingMemberships": { "type": "array", - "items" : { + "items": { "type": "object", "properties": { "block": {"type": "string"}, -- GitLab