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

Commit

Permalink
mypyの--warn-unused-ignoresでエラーになる箇所を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroki SAKABE committed Feb 16, 2023
1 parent 493728e commit 7ebb75f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
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 7ebb75f

Please sign in to comment.