Skip to content

Commit c981668

Browse files
committed
chore(type): use cast instead of assert
1 parent 0539237 commit c981668

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/charm_state.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,10 @@ def auth(self) -> GitHubAuth:
226226
"""Build the application GitHub auth configuration."""
227227
if self.token is not None:
228228
return GitHubTokenAuth(token=self.token)
229-
assert self.app_client_id is not None
230-
assert self.installation_id is not None
231-
assert self.private_key is not None
232229
return GitHubAppAuth(
233-
app_client_id=self.app_client_id,
234-
installation_id=self.installation_id,
235-
private_key=self.private_key,
230+
app_client_id=cast(str, self.app_client_id),
231+
installation_id=cast(int, self.installation_id),
232+
private_key=cast(str, self.private_key),
236233
)
237234

238235

0 commit comments

Comments
 (0)