From 7d13790214e57d1dfda5f15efe89c9b1c355983d Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Wed, 24 Feb 2021 22:30:42 +0100 Subject: [PATCH] [lint] Use duplicating duniterpy.api.bma.network.PEERING_SCHEMA --- duniterpy/api/bma/ws.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/duniterpy/api/bma/ws.py b/duniterpy/api/bma/ws.py index 5ff498c8..60159cea 100644 --- a/duniterpy/api/bma/ws.py +++ b/duniterpy/api/bma/ws.py @@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. import logging from duniterpy.api.bma.blockchain import BLOCK_SCHEMA +from duniterpy.api.bma.network import PEERING_SCHEMA from duniterpy.api.client import Client, WSConnection logger = logging.getLogger("duniter/ws") @@ -25,19 +26,7 @@ logger = logging.getLogger("duniter/ws") MODULE = "ws" WS_BLOCK_SCHEMA = BLOCK_SCHEMA - -WS_PEER_SCHEMA = { - "type": "object", - "properties": { - "version": {"type": "number"}, - "currency": {"type": "string"}, - "pubkey": {"type": "string"}, - "endpoints": {"type": "array", "items": {"type": "string"}}, - "signature": {"type": "string"}, - }, - "required": ["version", "currency", "pubkey", "endpoints", "signature"], -} - +WS_PEER_SCHEMA = PEERING_SCHEMA async def block(client: Client) -> WSConnection: """ -- GitLab