Skip to content

Commit 371373a

Browse files
committed
docs(example-bot): reformat embedded code block
mdformat (run via `make format`) reflows the requests.post call and adjusts blank-line spacing in the example snippet.
1 parent 8b44005 commit 371373a

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

docs/example-bot.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@ import requests
1717
# BalatroBot API endpoint
1818
URL = "http://127.0.0.1:12346"
1919

20+
2021
def rpc(method: str, params: dict = {}) -> dict:
2122
"""Send a JSON-RPC 2.0 request to the BalatroBot API."""
22-
response = requests.post(URL, json={
23-
"jsonrpc": "2.0",
24-
"method": method,
25-
"params": params,
26-
"id": 1,
27-
})
23+
response = requests.post(
24+
URL,
25+
json={
26+
"jsonrpc": "2.0",
27+
"method": method,
28+
"params": params,
29+
"id": 1,
30+
},
31+
)
2832
data = response.json()
2933
# Raise if error, otherwise return result (contains game state)
3034
if "error" in data:

0 commit comments

Comments
 (0)