@@ -390,6 +390,7 @@ def approver_group_resolver(group_ids: frozenset[str]) -> set[str]:
390390 first_statement = list (decision .based_on_statements )[0 ] if decision .based_on_statements else None
391391 approver_emails = list (first_statement .approvers ) if first_statement else []
392392 approver_groups = list (first_statement .approver_groups ) if first_statement else []
393+ assert result .user_principal_id is not None
393394 early_revoke_payload = slack_helpers .EarlyRevokeButtonPayload (
394395 schedule_name = result .schedule_name ,
395396 requester_slack_id = requester .id ,
@@ -578,13 +579,14 @@ def approver_group_resolver(group_ids: frozenset[str]) -> set[str]:
578579 """ ,
579580 )
580581
582+ assert slack_response is not None
581583 blocks = slack_helpers .HeaderSectionBlock .set_status (
582- blocks = slack_response ["message" ]["blocks" ],
584+ blocks = slack_response ["message" ]["blocks" ], # type: ignore[index]
583585 status_text = status_text ,
584586 )
585587 client .chat_update (
586588 channel = cfg .slack_channel_id ,
587- ts = slack_response ["ts" ],
589+ ts = str ( slack_response ["ts" ]) ,
588590 blocks = blocks ,
589591 text = text ,
590592 )
@@ -639,6 +641,7 @@ def approver_group_resolver(group_ids: frozenset[str]) -> set[str]:
639641 first_statement = list (decision .based_on_statements )[0 ] if decision .based_on_statements else None
640642 approver_emails = list (first_statement .approvers ) if first_statement else []
641643 approver_groups = list (first_statement .approver_groups ) if first_statement else []
644+ assert result .user_principal_id is not None
642645 early_revoke_payload = slack_helpers .EarlyRevokeButtonPayload (
643646 schedule_name = result .schedule_name ,
644647 requester_slack_id = requester .id ,
@@ -1000,6 +1003,7 @@ def handle_extend_grant_button_click(body: dict, client: WebClient, context: Bol
10001003
10011004 if payload .account_id and payload .permission_set_arn :
10021005 # Account access extension
1006+ assert payload .instance_arn is not None
10031007 account_assignment = sso .UserAccountAssignment (
10041008 instance_arn = payload .instance_arn ,
10051009 account_id = payload .account_id ,
@@ -1166,6 +1170,7 @@ def handle_early_revoke_modal_submission(body: dict, client: WebClient, context:
11661170 # Perform the revocation
11671171 if button_payload .account_id and button_payload .permission_set_arn :
11681172 # Account access revocation
1173+ assert button_payload .instance_arn is not None
11691174 user_account_assignment = sso .UserAccountAssignment (
11701175 instance_arn = button_payload .instance_arn ,
11711176 account_id = button_payload .account_id ,
@@ -1189,6 +1194,8 @@ def handle_early_revoke_modal_submission(body: dict, client: WebClient, context:
11891194 )
11901195 elif button_payload .group_id and button_payload .membership_id :
11911196 # Group access revocation
1197+ assert button_payload .group_name is not None
1198+ assert button_payload .identity_store_id is not None
11921199 group_assignment = sso .GroupAssignment (
11931200 group_name = button_payload .group_name ,
11941201 group_id = button_payload .group_id ,
0 commit comments