浏览代码

refactor(bot): streamline imports and cleanup unused

Removed numerous unused imports from the bot.py module, including specific event types, error classes, and utilities no longer utilized in the current implementation. This cleanup enhances readability and maintainability of the codebase by eliminating clutter and focusing on what's essential for the bot's operation. The removal of unused libraries like functools and datetime, alongside specific nio classes, signifies a shift towards a more streamlined and efficient code structure. This change also potentially improves import times and reduces memory footprint, albeit marginally.
Kumi 6 月之前
父节点
当前提交
1e13fc761b
共有 1 个文件被更改,包括 0 次插入27 次删除
  1. 0 27
      src/matrix_reportbot/classes/bot.py

+ 0 - 27
src/matrix_reportbot/classes/bot.py

@@ -1,5 +1,4 @@
 import asyncio
-import functools
 import aiohttp
 
 from nio import (
@@ -7,48 +6,22 @@ from nio import (
     AsyncClientConfig,
     WhoamiResponse,
     DevicesResponse,
-    Event,
-    Response,
     MatrixRoom,
     Api,
-    RoomMessagesError,
-    GroupEncryptionError,
-    EncryptionError,
-    RoomMessageText,
     RoomSendResponse,
     SyncResponse,
-    RoomMessageNotice,
     JoinError,
     RoomLeaveError,
     RoomSendError,
-    RoomVisibility,
-    RoomCreateError,
-    RoomMessageMedia,
-    RoomMessageImage,
-    RoomMessageFile,
-    RoomMessageAudio,
-    DownloadError,
-    DownloadResponse,
-    ToDeviceEvent,
-    ToDeviceError,
-    RoomPutStateError,
     RoomGetStateError,
 )
 
 from typing import Optional, List
 from configparser import ConfigParser
-from datetime import datetime
 from io import BytesIO
-from pathlib import Path
-from contextlib import closing
 
-import base64
 import uuid
-import traceback
 import json
-import importlib.util
-import sys
-import traceback
 
 import markdown2