Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #431 from esminc/mypy-disallow-any-generics
Browse files Browse the repository at this point in the history
mypyの--disallow-any-genericsを有効化
  • Loading branch information
Hiroki SAKABE authored Jan 24, 2023
2 parents d06aef3 + 27a8ff3 commit 204491e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lambda/app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lambda/app/bee_slack_app/view/home.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions lambda/app/bee_slack_app/view/user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional
from typing import Any, Optional

from bee_slack_app.model import User

Expand Down Expand Up @@ -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を生成する
"""
Expand Down

0 comments on commit 204491e

Please sign in to comment.