diff --git a/lambda/app/Makefile b/lambda/app/Makefile index 5bd4e81f..6c64e030 100644 --- a/lambda/app/Makefile +++ b/lambda/app/Makefile @@ -24,7 +24,7 @@ lint-check: .PHONY: type-check type-check: - pipenv run mypy . --disallow-untyped-calls + pipenv run mypy . --disallow-untyped-calls --disallow-any-generics .PHONY: test test: export AWS_DEFAULT_REGION := us-east-1 diff --git a/lambda/app/bee_slack_app/view/home.py b/lambda/app/bee_slack_app/view/home.py index 6f8c668d..f4428ae2 100644 --- a/lambda/app/bee_slack_app/view/home.py +++ b/lambda/app/bee_slack_app/view/home.py @@ -1,4 +1,4 @@ -from typing import Optional, TypedDict +from typing import Any, Optional, TypedDict from bee_slack_app.model import Book, RecommendBook from bee_slack_app.view.common import book_section, google_graphic @@ -261,7 +261,7 @@ def home( # pylint: disable=too-many-locals return view -def create_button(suggested_book_value: dict) -> dict: +def create_button(suggested_book_value: dict[str, Any]) -> dict[str, Any]: button_name = "興味あり❤️" if suggested_book_value["interested"] else "興味なし🤍" return { "type": "actions", diff --git a/lambda/app/bee_slack_app/view/user.py b/lambda/app/bee_slack_app/view/user.py index 9080c174..4bca7d91 100644 --- a/lambda/app/bee_slack_app/view/user.py +++ b/lambda/app/bee_slack_app/view/user.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import Any, Optional from bee_slack_app.model import User @@ -29,7 +29,7 @@ } -def _make_options(source: dict[str, str]) -> list[dict]: +def _make_options(source: dict[str, str]) -> list[dict[str, Any]]: """ 変換辞書の内容から画面表示用のOptionsを生成する """