refactor: improve code formatting and readability in configuration and run files
All checks were successful
CI / lint-and-test (push) Successful in 38s
All checks were successful
CI / lint-and-test (push) Successful in 38s
- Simplified the assignment of `bot_username` in `config.py` for better clarity. - Removed redundant import statement in `run.py` to streamline the code. - Enhanced formatting in `group_duty_pin.py` and test files for improved readability and consistency. - No functional changes were made; the focus was on code style and organization.
This commit is contained in:
@@ -11,6 +11,7 @@ from telegram.ext import ApplicationBuilder
|
||||
from duty_teller import config
|
||||
from duty_teller.config import require_bot_token
|
||||
from duty_teller.handlers import group_duty_pin, register_handlers
|
||||
from duty_teller.utils.http_client import safe_urlopen
|
||||
|
||||
|
||||
async def _resolve_bot_username(application) -> None:
|
||||
@@ -19,7 +20,7 @@ async def _resolve_bot_username(application) -> None:
|
||||
me = await application.bot.get_me()
|
||||
config.BOT_USERNAME = (me.username or "").lower()
|
||||
logger.info("Resolved BOT_USERNAME from API: %s", config.BOT_USERNAME)
|
||||
from duty_teller.utils.http_client import safe_urlopen
|
||||
|
||||
|
||||
logging.basicConfig(
|
||||
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
||||
|
||||
Reference in New Issue
Block a user