refactor: move imports in main.py

this change allows to avoid multiple and very specific imports in other python files

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2025-03-26 14:28:15 +03:00
parent d363fa9afd
commit 4fbdb198ae
Signed by: mctaylors
GPG key ID: 4EEF4F949A266EE2
3 changed files with 15 additions and 17 deletions

View file

@ -1,9 +1,11 @@
import html_parser
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.constants import ParseMode
from telegram.ext import ContextTypes
import html_parser
import main
from main import config
async def start_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
await update.message.reply_text(
@ -26,8 +28,6 @@ async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No
async def about_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
import main
from main import config
reply_markup = None
source_url = config.get('General', 'SourceUrl')
if source_url.startswith('http://') or source_url.startswith('https://'):