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 #447 from esminc/mypy-warn-unused-ignores
Browse files Browse the repository at this point in the history
mypyの--warn-unused-ignoresを有効化
  • Loading branch information
Hiroki SAKABE authored Feb 16, 2023
2 parents 2d5ce55 + 7ebb75f commit 9bd4cc3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 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 --disallow-any-generics --disallow-untyped-decorators
pipenv run mypy . --disallow-untyped-calls --disallow-any-generics --disallow-untyped-decorators --warn-unused-ignores

.PHONY: test
test: export AWS_DEFAULT_REGION := us-east-1
Expand Down
8 changes: 4 additions & 4 deletions lambda/app/bee_slack_app/view/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def home( # pylint: disable=too-many-locals
{
"type": "mrkdwn",
"text": f"*現在のレビュー投稿数 {total_review_count}件*",
}, # type:ignore
},
],
},
{
Expand Down Expand Up @@ -210,7 +210,7 @@ def home( # pylint: disable=too-many-locals
{
"type": "actions",
"elements": [
{ # type: ignore
{
"type": "button",
"text": {
"type": "plain_text",
Expand Down Expand Up @@ -243,7 +243,7 @@ def home( # pylint: disable=too-many-locals
]

if bool(move_buttons["elements"]):
book_sections.append(move_buttons) # type: ignore
book_sections.append(move_buttons)
else:
book_sections.append(
{
Expand Down Expand Up @@ -276,7 +276,7 @@ def create_button(suggested_book_value: dict[str, Any]) -> dict[str, Any]:
"value": f'{suggested_book_value["isbn"]}#{suggested_book_value["ml_model"]}',
"action_id": "button_switch_action",
},
{ # type: ignore
{
"type": "button",
"text": {
"type": "plain_text",
Expand Down
8 changes: 4 additions & 4 deletions lambda/app/bee_slack_app/view/post_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,16 @@ def notify_review_post_message_blocks(review_contents: Review):
{
"type": "mrkdwn",
"text": f"*投稿者*\n{review_contents['user_name']}",
}, # type:ignore
},
{
"type": "mrkdwn",
"text": f"*投稿日時*\n{update_datetime}",
}, # type:ignore
{ # type:ignore
},
{
"type": "mrkdwn",
"text": f"*自分にとっての評価*\n{review_contents['score_for_me']}",
},
{ # type:ignore
{
"type": "mrkdwn",
"text": f"*永和社員へのおすすめ度*\n{review_contents['score_for_others']}",
},
Expand Down
14 changes: 7 additions & 7 deletions lambda/app/bee_slack_app/view/read_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def review_of_user_modal(
]

if bool(move_buttons["elements"]):
review_blocks.append(move_buttons) # type: ignore
review_blocks.append(move_buttons)

view["blocks"].extend(review_blocks) # type: ignore

Expand Down Expand Up @@ -210,24 +210,24 @@ def _review_sections(
{
"type": "mrkdwn",
"text": f"*投稿者*\n{user_name}",
}, # type:ignore
},
{
"type": "mrkdwn",
"text": f"*投稿日時*\n{update_datetime}",
}, # type:ignore
{ # type:ignore
},
{
"type": "mrkdwn",
"text": f"*自分にとっての評価*\n{score_for_me}",
},
{ # type:ignore
{
"type": "mrkdwn",
"text": f"*永和社員へのおすすめ度*\n{score_for_others}",
},
],
},
{
"type": "section",
"text": { # type:ignore
"text": {
"type": "mrkdwn",
"text": f"*レビューコメント*\n\n{review_comment or '-'}",
},
Expand All @@ -244,7 +244,7 @@ def _review_detail_button(*, user_id: str, isbn: str):
return {
"type": "actions",
"elements": [
{ # type: ignore
{
"type": "button",
"text": {
"type": "plain_text",
Expand Down

0 comments on commit 9bd4cc3

Please sign in to comment.