Skip to content

Commit d97b65f

Browse files
ruberVulpesseratch
authored andcommitted
changes from python setup.py validate
1 parent 90d0cc0 commit d97b65f

File tree

2 files changed

+44
-23
lines changed

2 files changed

+44
-23
lines changed

slack/web/async_client.py

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,29 +123,60 @@ async def admin_apps_restricted_list(self, **kwargs) -> AsyncSlackResponse:
123123
)
124124

125125
async def admin_conversations_restrictAccess_addGroup(
126-
self, **kwargs
126+
self, *, channel_id: str, group_id: str, **kwargs
127127
) -> AsyncSlackResponse:
128-
"""Add an allowlist of IDP groups for accessing a channel."""
128+
"""Add an allowlist of IDP groups for accessing a channel.
129+
130+
Args:
131+
channel_id (str): The channel to link this group to. e.g. 'C1234567890'
132+
group_id (str): The IDP Group ID to be an allowlist for the private channel. 'S0604QSJC'
133+
team_id (str): The workspace where the channel exists.
134+
This argument is required for channels only tied to one workspace,
135+
and optional for channels that are shared across an organization.
136+
e.g 'T1234'
137+
"""
138+
kwargs.update({"channel_id": channel_id, "group_id": group_id})
129139
return await self.api_call(
130140
"admin.conversations.restrictAccess.addGroup",
131141
http_verb="GET",
132142
params=kwargs,
133143
)
134144

135145
async def admin_conversations_restrictAccess_listGroups(
136-
self, **kwargs
146+
self, *, channel_id: str, **kwargs
137147
) -> AsyncSlackResponse:
138-
"""List all IDP Groups linked to a channel."""
148+
"""List all IDP Groups linked to a channel.
149+
150+
Args:
151+
channel_id (str): The channel to link this group to. e.g. 'C1234567890'
152+
team_id (str): The workspace where the channel exists.
153+
This argument is required for channels only tied to one workspace,
154+
and optional for channels that are shared across an organization.
155+
e.g 'T1234'
156+
"""
157+
kwargs.update({"channel_id": channel_id})
139158
return await self.api_call(
140159
"admin.conversations.restrictAccess.listGroups",
141160
http_verb="GET",
142161
params=kwargs,
143162
)
144163

145164
async def admin_conversations_restrictAccess_removeGroup(
146-
self, **kwargs
165+
self, *, channel_id: str, group_id: str, team_id: str, **kwargs
147166
) -> AsyncSlackResponse:
148-
"""Remove a linked IDP group linked from a private channel."""
167+
"""Remove a linked IDP group linked from a private channel.
168+
169+
Args:
170+
channel_id (str): The channel to link this group to. e.g. 'C1234567890'
171+
group_id (str): The IDP Group ID to be an allowlist for the private channel. 'S0604QSJC'
172+
team_id (str): The workspace where the channel exists.
173+
This argument is required for channels only tied to one workspace,
174+
and optional for channels that are shared across an organization.
175+
e.g 'T1234'
176+
"""
177+
kwargs.update(
178+
{"channel_id": channel_id, "group_id": group_id, "team_id": team_id}
179+
)
149180
return await self.api_call(
150181
"admin.conversations.restrictAccess.removeGroup",
151182
http_verb="GET",

slack/web/client.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ def admin_apps_restricted_list(self, **kwargs) -> Union[Future, SlackResponse]:
111111
)
112112

113113
def admin_conversations_restrictAccess_addGroup(
114-
self,
115-
*,
116-
channel_id: str,
117-
group_id: str,
118-
**kwargs
114+
self, *, channel_id: str, group_id: str, **kwargs
119115
) -> Union[Future, SlackResponse]:
120116
"""Add an allowlist of IDP groups for accessing a channel.
121117
@@ -127,18 +123,15 @@ def admin_conversations_restrictAccess_addGroup(
127123
and optional for channels that are shared across an organization.
128124
e.g 'T1234'
129125
"""
130-
kwargs.update({"channel_id": channel_id, 'group_id': group_id})
126+
kwargs.update({"channel_id": channel_id, "group_id": group_id})
131127
return self.api_call(
132128
"admin.conversations.restrictAccess.addGroup",
133129
http_verb="GET",
134130
params=kwargs,
135131
)
136132

137133
def admin_conversations_restrictAccess_listGroups(
138-
self,
139-
*,
140-
channel_id: str,
141-
**kwargs
134+
self, *, channel_id: str, **kwargs
142135
) -> Union[Future, SlackResponse]:
143136
"""List all IDP Groups linked to a channel.
144137
@@ -157,12 +150,7 @@ def admin_conversations_restrictAccess_listGroups(
157150
)
158151

159152
def admin_conversations_restrictAccess_removeGroup(
160-
self,
161-
*,
162-
channel_id: str,
163-
group_id: str,
164-
team_id: str,
165-
**kwargs
153+
self, *, channel_id: str, group_id: str, team_id: str, **kwargs
166154
) -> Union[Future, SlackResponse]:
167155
"""Remove a linked IDP group linked from a private channel.
168156
@@ -174,7 +162,9 @@ def admin_conversations_restrictAccess_removeGroup(
174162
and optional for channels that are shared across an organization.
175163
e.g 'T1234'
176164
"""
177-
kwargs.update({"channel_id": channel_id, 'group_id': group_id, 'team_id': team_id})
165+
kwargs.update(
166+
{"channel_id": channel_id, "group_id": group_id, "team_id": team_id}
167+
)
178168
return self.api_call(
179169
"admin.conversations.restrictAccess.removeGroup",
180170
http_verb="GET",

0 commit comments

Comments
 (0)