diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-02-01 19:02:11 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | c812e7120cc33ba24919e2518409a79fe08ae6d4 (patch) | |
tree | c1575da127faee4565464aff69bdaba53e725fa0 /slack | |
parent | 47be4d1f6ee818ca7f075e4c611793ab940e4dcc (diff) | |
download | wee-slack-c812e7120cc33ba24919e2518409a79fe08ae6d4.tar.gz |
Remove unnecessary checks for dict keys
With pyright v1.1.292 or later these checks are no longer necessary
(they were never necessary for the runtime, only added for pyright).
Diffstat (limited to 'slack')
-rw-r--r-- | slack/slack_conversation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/slack/slack_conversation.py b/slack/slack_conversation.py index 2733302..913883c 100644 --- a/slack/slack_conversation.py +++ b/slack/slack_conversation.py @@ -67,7 +67,7 @@ class SlackConversation: return self._info["id"] async def name(self) -> str: - if "is_im" in self._info and self._info["is_im"] is True: + if self._info["is_im"] is True: im_user = await self.workspace.users[self._info["user"]] return im_user.nick() elif self._info["is_mpim"] is True: @@ -83,7 +83,7 @@ class SlackConversation: return self._info["name"] def name_prefix(self, name_type: Literal["full_name", "short_name"]) -> str: - if "is_im" in self._info and self._info["is_im"] is True: + if self._info["is_im"] is True: if name_type == "short_name": return " " else: |