Sfoglia il codice sorgente

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 mesi fa
parent
commit
1e13fc761b
1 ha cambiato i file con 0 aggiunte e 27 eliminazioni
  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