Skip to content

Commit

Permalink
Remove functionality scheduled for removal on 2.0.0.dev105 (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
davfsa committed Jan 1, 2023
1 parent c7d1982 commit b09d7f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
3 changes: 3 additions & 0 deletions changes/1438.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Remove previously deprecated functionality.
This includes:
- `RESTClient.build_action_row`
15 changes: 0 additions & 15 deletions hikari/impl/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4040,21 +4040,6 @@ async def create_modal_response(

await self._request(route, json=body, auth=None)

def build_action_row(self) -> special_endpoints.MessageActionRowBuilder:
"""Build a message action row message component for use in message create and REST calls.
Returns
-------
hikari.api.special_endpoints.MessageActionRowBuilder
The initialised action row builder.
"""
deprecation.warn_deprecated(
"build_action_row",
removal_version="2.0.0.dev115",
additional_info="Use 'build_message_action_row' parameter instead",
)
return special_endpoints_impl.MessageActionRowBuilder()

def build_message_action_row(self) -> special_endpoints.MessageActionRowBuilder:
return special_endpoints_impl.MessageActionRowBuilder()

Expand Down
6 changes: 0 additions & 6 deletions tests/hikari/impl/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1176,12 +1176,6 @@ def test_context_menu_command_command_builder(self, rest_client):
assert isinstance(result, special_endpoints.ContextMenuCommandBuilder)
assert result.type == commands.CommandType.MESSAGE

def test_build_action_row(self, rest_client):
with mock.patch.object(special_endpoints, "MessageActionRowBuilder") as action_row_builder:
assert rest_client.build_action_row() is action_row_builder.return_value

action_row_builder.assert_called_once_with()

def test_build_message_action_row(self, rest_client):
with mock.patch.object(special_endpoints, "MessageActionRowBuilder") as action_row_builder:
assert rest_client.build_message_action_row() is action_row_builder.return_value
Expand Down

0 comments on commit b09d7f5

Please sign in to comment.