From 68e792e393ca599628965f3f7b384aad15d5c41c Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Tue, 14 Dec 2021 13:51:03 +0900 Subject: [PATCH] Upgrade pytype, black versions (#547) --- scripts/run_pytype.sh | 2 +- setup.py | 2 +- slack_bolt/adapter/falcon/resource.py | 2 +- slack_bolt/adapter/sanic/async_handler.py | 2 +- slack_bolt/adapter/tornado/handler.py | 2 +- slack_bolt/context/base_context.py | 3 +++ 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/run_pytype.sh b/scripts/run_pytype.sh index 4b305f1b6..3523791e0 100755 --- a/scripts/run_pytype.sh +++ b/scripts/run_pytype.sh @@ -5,5 +5,5 @@ script_dir=$(dirname $0) cd ${script_dir}/.. && \ pip install -e ".[async]" && \ pip install -e ".[adapter]" && \ - pip install "pytype==2021.10.25" && \ + pip install "pytype==2021.12.8" && \ pytype slack_bolt/ diff --git a/setup.py b/setup.py index a3be4e443..8f58c3d0f 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ "pytest-cov>=3,<4", "Flask-Sockets>=0.2,<1", "Werkzeug<2", # TODO: support Flask 2.x - "black==21.10b0", + "black==21.12b0", ] async_test_dependencies = test_dependencies + [ diff --git a/slack_bolt/adapter/falcon/resource.py b/slack_bolt/adapter/falcon/resource.py index dec1663a3..fb6fd24bf 100644 --- a/slack_bolt/adapter/falcon/resource.py +++ b/slack_bolt/adapter/falcon/resource.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import datetime # type: ignore from http import HTTPStatus from falcon import Request, Response diff --git a/slack_bolt/adapter/sanic/async_handler.py b/slack_bolt/adapter/sanic/async_handler.py index 1555709b8..f1c3f807a 100644 --- a/slack_bolt/adapter/sanic/async_handler.py +++ b/slack_bolt/adapter/sanic/async_handler.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import datetime # type: ignore from sanic.request import Request from sanic.response import HTTPResponse diff --git a/slack_bolt/adapter/tornado/handler.py b/slack_bolt/adapter/tornado/handler.py index 47e06ba9d..7eab94dbf 100644 --- a/slack_bolt/adapter/tornado/handler.py +++ b/slack_bolt/adapter/tornado/handler.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import datetime # type: ignore from tornado.httputil import HTTPServerRequest from tornado.web import RequestHandler diff --git a/slack_bolt/context/base_context.py b/slack_bolt/context/base_context.py index 266df9e5c..f6c67bb60 100644 --- a/slack_bolt/context/base_context.py +++ b/slack_bolt/context/base_context.py @@ -1,3 +1,6 @@ +# pytype: skip-file +# Note: Since 2021.12.8, the pytype code analyzer does not properly work for this file + from logging import Logger from typing import Optional, Tuple