Repository: hikari-py/hikari (python)

Issue:
Remove `with_expiration` from `fetch_invite`
https://github.com/discord/discord-api-docs/pull/7424

Pull request:
Remove redundant `with_expiration` parameter from `fetch_invite` methods
### Summary
The `with_expiration` parameter on the `fetch_invite` is redundant, as [it was seemingly removed at some point in time](https://github.com/discord/discord-api-docs/pull/7424), but this removal was never documented.

### Checklist
<!-- Make sure to tick all the following boxes by putting an `x` in between (like this `[x]`) -->
- [x] I have run `nox` and all the pipelines have passed.
- [x] I have made unittests according to the code I have added/modified/deleted.

### Related issues
<!--
To mention an issue use `#issue-id` and to mention a merge request use `!merge-request-id`
To close/fix an issue use `Close #issue-id` or `Fix #issue-id` (depending on the merge request)
-->
Closes #2212 

Patch:
diff --git a/changes/2224.breaking.md b/changes/2224.breaking.md
new file mode 100644
index 00000000..2b61d7f6
--- /dev/null
+++ b/changes/2224.breaking.md
@@ -0,0 +1,2 @@
+Remove `with_expiration` parameter from REST client's `fetch_invite` method.
+  - The parameter has been a noop for a while as Discord removed it
diff --git a/hikari/api/rest.py b/hikari/api/rest.py
index 5f32d701..e6373e0f 100644
--- a/hikari/api/rest.py
+++ b/hikari/api/rest.py
@@ -2487,7 +2487,7 @@ async def fetch_gateway_bot_info(self) -> sessions.GatewayBotInfo:
 
     @abc.abstractmethod
     async def fetch_invite(
-        self, invite: typing.Union[invites.InviteCode, str], with_counts: bool = True, with_expiration: bool = True
+        self, invite: typing.Union[invites.InviteCode, str], with_counts: bool = True
     ) -> invites.Invite:
         """Fetch an existing invite.
 
@@ -2498,8 +2498,6 @@ async def fetch_invite(
             the code of an existing invite.
         with_counts
             Whether the invite should contain the approximate member counts.
-        with_expiration
-            Whether the invite should contain the expiration date.
 
         Returns
         -------
diff --git a/hikari/impl/rest.py b/hikari/impl/rest.py
index dbbec3d3..c395fa4a 100644
--- a/hikari/impl/rest.py
+++ b/hikari/impl/rest.py
@@ -2063,12 +2063,11 @@ async def fetch_gateway_bot_info(self) -> sessions.GatewayBotInfo:
         return self._entity_factory.deserialize_gateway_bot_info(response)
 
     async def fetch_invite(
-        self, invite: typing.Union[invites.InviteCode, str], with_counts: bool = True, with_expiration: bool = True
+        self, invite: typing.Union[invites.InviteCode, str], with_counts: bool = True
     ) -> invites.Invite:
         route = routes.GET_INVITE.compile(invite_code=invite if isinstance(invite, str) else invite.code)
         query = data_binding.StringMapBuilder()
         query.put("with_counts", with_counts)
-        query.put("with_expiration", with_expiration)
         response = await self._request(route, query=query)
         assert isinstance(response, dict)
         return self._entity_factory.deserialize_invite(response)
diff --git a/pyproject.toml b/pyproject.toml
index c6eed1ea..09c5de18 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -114,7 +114,7 @@ mkdocs = [
     "griffe-inherited-docstrings==1.1.1",
     # Generate API reference pages dynamically
     "mkdocs-gen-files==0.5.0",
-    "mkdocs-literate-nav==0.6.1",
+    "mkdocs-literate-nav==0.6.2",
     # Minify
     "mkdocs-minify-plugin==0.8.0",
     # Towncrier draft changelogs
diff --git a/uv.lock b/uv.lock
index 874f6e8c..68acd301 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1312,7 +1312,7 @@ mkdocs = [
     { name = "griffe-inherited-docstrings", specifier = "==1.1.1" },
     { name = "mkdocs", specifier = "==1.6.1" },
     { name = "mkdocs-gen-files", specifier = "==0.5.0" },
-    { name = "mkdocs-literate-nav", specifier = "==0.6.1" },
+    { name = "mkdocs-literate-nav", specifier = "==0.6.2" },
     { name = "mkdocs-material", extras = ["imaging"], specifier = "==9.6.9" },
     { name = "mkdocs-minify-plugin", specifier = "==0.8.0" },
     { name = "mkdocs-towncrier", specifier = "==0.1.4" },
@@ -1727,14 +1727,14 @@ wheels = [
 
 [[package]]
 name = "mkdocs-literate-nav"
-version = "0.6.1"
+version = "0.6.2"
 source = { registry = "https://pypi.org/simple" }
 dependencies = [
     { name = "mkdocs" },
 ]
-sdist = { url = "https://files.pythonhosted.org/packages/4d/f9/c48a04f3cf484f8016a343c1d7d99c3a1ef01dbb33ceabb1d02e0ecabda7/mkdocs_literate_nav-0.6.1.tar.gz", hash = "sha256:78a7ab6d878371728acb0cdc6235c9b0ffc6e83c997b037f4a5c6ff7cef7d759", size = 16437 }
+sdist = { url = "https://files.pythonhosted.org/packages/f6/5f/99aa379b305cd1c2084d42db3d26f6de0ea9bf2cc1d10ed17f61aff35b9a/mkdocs_literate_nav-0.6.2.tar.gz", hash = "sha256:760e1708aa4be86af81a2b56e82c739d5a8388a0eab1517ecfd8e5aa40810a75", size = 17419 }
 wheels = [
-    { url = "https://files.pythonhosted.org/packages/51/3b/e00d839d3242844c77e248f9572dd34644a04300839a60fe7d6bf652ab19/mkdocs_literate_nav-0.6.1-py3-none-any.whl", hash = "sha256:e70bdc4a07050d32da79c0b697bd88e9a104cf3294282e9cb20eec94c6b0f401", size = 13182 },
+    { url = "https://files.pythonhosted.org/packages/8a/84/b5b14d2745e4dd1a90115186284e9ee1b4d0863104011ab46abb7355a1c3/mkdocs_literate_nav-0.6.2-py3-none-any.whl", hash = "sha256:0a6489a26ec7598477b56fa112056a5e3a6c15729f0214bea8a4dbc55bd5f630", size = 13261 },
 ]
 
 [[package]]


Test patch:
diff --git a/tests/hikari/impl/test_rest.py b/tests/hikari/impl/test_rest.py
index 9d803094..f1fdff4d 100644
--- a/tests/hikari/impl/test_rest.py
+++ b/tests/hikari/impl/test_rest.py
@@ -3556,10 +3556,8 @@ async def test_fetch_invite(self, rest_client):
         rest_client._request = mock.AsyncMock(return_value={"code": "Jx4cNGG"})
         rest_client._entity_factory.deserialize_invite = mock.Mock(return_value=return_invite)
 
-        assert await rest_client.fetch_invite(input_invite, with_counts=True, with_expiration=False) == return_invite
-        rest_client._request.assert_awaited_once_with(
-            expected_route, query={"with_counts": "true", "with_expiration": "false"}
-        )
+        assert await rest_client.fetch_invite(input_invite, with_counts=True) == return_invite
+        rest_client._request.assert_awaited_once_with(expected_route, query={"with_counts": "true"})
         rest_client._entity_factory.deserialize_invite.assert_called_once_with({"code": "Jx4cNGG"})
 
     async def test_delete_invite(self, rest_client):