refactor: use more None type annotations
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
8b97a60a34
commit
3bbfb7b692
2 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ async def inline_query(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No
|
|||
|
||||
|
||||
async def answer_query(update: Update, query: str,
|
||||
config: ConfigParser, data):
|
||||
config: ConfigParser, data) -> None:
|
||||
characters = humanize_tags_from_json(data['tag_string_character'], "no characters")
|
||||
copyrights = humanize_tags_from_json(data['tag_string_copyright'], "unknown copyright")
|
||||
artists = humanize_tags_from_json(data['tag_string_artist'], "unknown artist")
|
||||
|
@ -65,7 +65,7 @@ async def answer_query(update: Update, query: str,
|
|||
await update.inline_query.answer(results)
|
||||
|
||||
|
||||
async def invalid_query(update: Update, query: str):
|
||||
async def invalid_query(update: Update, query: str) -> None:
|
||||
results = [
|
||||
InlineQueryResultArticle(
|
||||
id=str(uuid4()),
|
||||
|
|
2
main.py
2
main.py
|
@ -33,7 +33,7 @@ def main() -> None:
|
|||
application.run_polling(allowed_updates=Update.ALL_TYPES)
|
||||
|
||||
|
||||
def validate_config():
|
||||
def validate_config() -> None:
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
response = requests.get(f"https://{config.get('Service', 'Domain')}/profile.json")
|
||||
|
|
Loading…
Add table
Reference in a new issue