From d40bdf8aff002f12da076c6b2c1a4d1b5e0bf073 Mon Sep 17 00:00:00 2001 From: Kevin Heavey <24635973+kevinheavey@users.noreply.github.com> Date: Thu, 2 Dec 2021 11:10:07 +0000 Subject: [PATCH] fix README indentation --- README.md | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 29d328cd..e4f09bbb 100644 --- a/README.md +++ b/README.md @@ -62,31 +62,31 @@ asyncio.run(main()) ### Websockets Client ```py - import asyncio - from asyncstdlib import enumerate - from solana.rpc.websocket_api import connect - - async def main(): - async with connect("ws://api.devnet.solana.com") as websocket: - await websocket.logs_subscribe() - first_resp = await websocket.recv() - subscription_id = first_resp.result - next_resp = await websocket.recv() - print(next_resp) - await websocket.logs_unsubscribe(subscription_id) - - # Alternatively, use the client as an infinite asynchronous iterator: - async with connect("ws://api.devnet.solana.com") as websocket: - await websocket.logs_subscribe() - first_resp = await websocket.recv() - subscription_id = first_resp.result - async for idx, msg in enumerate(websocket): - if idx == 3: - break - print(msg) - await websocket.logs_unsubscribe(subscription_id) - - asyncio.run(main()) +import asyncio +from asyncstdlib import enumerate +from solana.rpc.websocket_api import connect + +async def main(): + async with connect("ws://api.devnet.solana.com") as websocket: + await websocket.logs_subscribe() + first_resp = await websocket.recv() + subscription_id = first_resp.result + next_resp = await websocket.recv() + print(next_resp) + await websocket.logs_unsubscribe(subscription_id) + + # Alternatively, use the client as an infinite asynchronous iterator: + async with connect("ws://api.devnet.solana.com") as websocket: + await websocket.logs_subscribe() + first_resp = await websocket.recv() + subscription_id = first_resp.result + async for idx, msg in enumerate(websocket): + if idx == 3: + break + print(msg) + await websocket.logs_unsubscribe(subscription_id) + +asyncio.run(main()) ``` ## Development