mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2026-06-19 07:35:19 +00:00
Bump pre-commit Hooks to Latest Versions (#5083)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
20f457c949
commit
c804f693cc
@@ -30,7 +30,7 @@ repos:
|
||||
- aiolimiter~=1.1,<1.3
|
||||
- . # this basically does `pip install -e .`
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.18.2
|
||||
rev: v1.19.1
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy-ptb
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
internal = "Bump ``pre-commit`` Hooks to Latest VErsion"
|
||||
[[pull_requests]]
|
||||
uid = "5083"
|
||||
author_uids = ["pre-commit-ci", "Bibo-Joshi"]
|
||||
@@ -118,13 +118,13 @@ async def main() -> None:
|
||||
# Set up webserver
|
||||
flask_app = Flask(__name__)
|
||||
|
||||
@flask_app.post("/telegram") # type: ignore[misc]
|
||||
@flask_app.post("/telegram") # type: ignore[untyped-decorator]
|
||||
async def telegram() -> Response:
|
||||
"""Handle incoming Telegram updates by putting them into the `update_queue`"""
|
||||
await application.update_queue.put(Update.de_json(data=request.json, bot=application.bot))
|
||||
return Response(status=HTTPStatus.OK)
|
||||
|
||||
@flask_app.route("/submitpayload", methods=["GET", "POST"]) # type: ignore[misc]
|
||||
@flask_app.route("/submitpayload", methods=["GET", "POST"]) # type: ignore[untyped-decorator]
|
||||
async def custom_updates() -> Response:
|
||||
"""
|
||||
Handle incoming webhook updates by also putting them into the `update_queue` if
|
||||
@@ -144,7 +144,7 @@ async def main() -> None:
|
||||
await application.update_queue.put(WebhookUpdate(user_id=user_id, payload=payload))
|
||||
return Response(status=HTTPStatus.OK)
|
||||
|
||||
@flask_app.get("/healthcheck") # type: ignore[misc]
|
||||
@flask_app.get("/healthcheck") # type: ignore[untyped-decorator]
|
||||
async def health() -> Response:
|
||||
"""For the health endpoint, reply with a simple plain text message."""
|
||||
response = make_response("The bot is still running fine :)", HTTPStatus.OK)
|
||||
|
||||
@@ -117,7 +117,7 @@ async def main() -> None:
|
||||
# Set up webserver
|
||||
quart_app = Quart(__name__)
|
||||
|
||||
@quart_app.post("/telegram") # type: ignore[misc]
|
||||
@quart_app.post("/telegram") # type: ignore[untyped-decorator]
|
||||
async def telegram() -> Response:
|
||||
"""Handle incoming Telegram updates by putting them into the `update_queue`"""
|
||||
await application.update_queue.put(
|
||||
@@ -125,7 +125,7 @@ async def main() -> None:
|
||||
)
|
||||
return Response(status=HTTPStatus.OK)
|
||||
|
||||
@quart_app.route("/submitpayload", methods=["GET", "POST"]) # type: ignore[misc]
|
||||
@quart_app.route("/submitpayload", methods=["GET", "POST"]) # type: ignore[untyped-decorator]
|
||||
async def custom_updates() -> Response:
|
||||
"""
|
||||
Handle incoming webhook updates by also putting them into the `update_queue` if
|
||||
@@ -145,7 +145,7 @@ async def main() -> None:
|
||||
await application.update_queue.put(WebhookUpdate(user_id=user_id, payload=payload))
|
||||
return Response(status=HTTPStatus.OK)
|
||||
|
||||
@quart_app.get("/healthcheck") # type: ignore[misc]
|
||||
@quart_app.get("/healthcheck") # type: ignore[untyped-decorator]
|
||||
async def health() -> Response:
|
||||
"""For the health endpoint, reply with a simple plain text message."""
|
||||
response = await make_response("The bot is still running fine :)", HTTPStatus.OK)
|
||||
|
||||
Reference in New Issue
Block a user