refactor: improve code formatting and readability in configuration and run files
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:
2026-03-02 17:22:55 +03:00
parent 2fb553567f
commit bdead6eef7
4 changed files with 75 additions and 28 deletions

View File

@@ -439,7 +439,9 @@ async def trust_group_cmd(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
loop = asyncio.get_running_loop()
already_trusted = await loop.run_in_executor(
None,
lambda: _sync_trust_group(chat_id, update.effective_user.id if update.effective_user else None),
lambda: _sync_trust_group(
chat_id, update.effective_user.id if update.effective_user else None
),
)
if already_trusted:
await update.message.reply_text(t(lang, "trust_group.already_trusted"))