summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLint Action <[email protected]>2023-03-09 17:15:27 +0000
committerLint Action <[email protected]>2023-03-09 17:15:27 +0000
commit34e7540e9caac8dc96e490ef035f73753452eb38 (patch)
tree189611007d29ba529fa347c2f6dfacd460b13d35
parent43c29e12ab6555815c0e26b06999d8fb8e3cf9b2 (diff)
downloadATRI-34e7540e9caac8dc96e490ef035f73753452eb38.tar.gz
ATRI-34e7540e9caac8dc96e490ef035f73753452eb38.tar.bz2
ATRI-34e7540e9caac8dc96e490ef035f73753452eb38.zip
:rotating_light: 自动进行代码格式化
-rw-r--r--ATRI/plugins/console/backend/api.py6
-rw-r--r--ATRI/utils/machine.py3
2 files changed, 4 insertions, 5 deletions
diff --git a/ATRI/plugins/console/backend/api.py b/ATRI/plugins/console/backend/api.py
index ffb1853..25e9da5 100644
--- a/ATRI/plugins/console/backend/api.py
+++ b/ATRI/plugins/console/backend/api.py
@@ -79,9 +79,9 @@ async def _(websocket: WebSocket):
while websocket.client_state == WebSocketState.CONNECTED:
await websocket.send_json(
models.Response(
- status=status.HTTP_200_OK,
- detail="OK",
- data=get_message_info().dict()
+ status=status.HTTP_200_OK,
+ detail="OK",
+ data=get_message_info().dict(),
).dict()
)
await asyncio.sleep(1)
diff --git a/ATRI/utils/machine.py b/ATRI/utils/machine.py
index d24c05e..a2b5b55 100644
--- a/ATRI/utils/machine.py
+++ b/ATRI/utils/machine.py
@@ -55,7 +55,6 @@ class NetInfo(BaseModel):
package_recv: int
-
def get_platform_info() -> PlatformInfo:
return PlatformInfo(
name=platform.platform(), struct=platform.architecture()[0], type=pf
@@ -154,5 +153,5 @@ def get_net_info():
sent_total=net.bytes_sent,
recv_total=net.bytes_recv,
package_sent=net.packets_sent,
- package_recv=net.packets_recv
+ package_recv=net.packets_recv,
)