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:
parent
d363fa9afd
commit
4fbdb198ae
3 changed files with 15 additions and 17 deletions
|
@ -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://'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue