aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2023-07-24 09:31:36 +0100
committerGravatar GitHub <[email protected]>2023-07-24 09:31:36 +0100
commit74f9649a6613697863562822456704a9fc5683f7 (patch)
treea4a089f045f23880eaedb0e14d9050b7b1feb86d /pydis_site/apps
parentMerge pull request #1051 from python-discord/dependabot/pip/gunicorn-21.2.0 (diff)
parentPleasure the style dictator (diff)
Merge pull request #1055 from python-discord/dependabot/pip/ruff-0.0.280
Bump ruff from 0.0.278 to 0.0.280
Diffstat (limited to 'pydis_site/apps')
-rw-r--r--pydis_site/apps/api/tests/test_infractions.py4
-rw-r--r--pydis_site/apps/redirect/urls.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/pydis_site/apps/api/tests/test_infractions.py b/pydis_site/apps/api/tests/test_infractions.py
index b9b33ff3..f1e54b1e 100644
--- a/pydis_site/apps/api/tests/test_infractions.py
+++ b/pydis_site/apps/api/tests/test_infractions.py
@@ -174,14 +174,14 @@ class InfractionTests(AuthenticatedAPITestCase):
response = self.client.get(f'{url}?expires_after=gibberish')
self.assertEqual(response.status_code, 400)
- self.assertEqual(list(response.json())[0], "expires_after")
+ self.assertEqual(next(iter(response.json())), "expires_after")
def test_filter_before_invalid(self):
url = reverse('api:bot:infraction-list')
response = self.client.get(f'{url}?expires_before=000000000')
self.assertEqual(response.status_code, 400)
- self.assertEqual(list(response.json())[0], "expires_before")
+ self.assertEqual(next(iter(response.json())), "expires_before")
def test_after_before_before(self):
url = reverse('api:bot:infraction-list')
diff --git a/pydis_site/apps/redirect/urls.py b/pydis_site/apps/redirect/urls.py
index a221ea12..583afa08 100644
--- a/pydis_site/apps/redirect/urls.py
+++ b/pydis_site/apps/redirect/urls.py
@@ -68,7 +68,7 @@ def map_redirect(name: str, data: Redirect) -> list[URLPattern]:
raise ValueError(f"Unknown app in redirect: {new_app_name}")
for item in items:
- entry = list(item.values())[0]
+ entry = next(iter(item.values()))
# Replace dynamic redirect with concrete path
concrete_path = __PARAMETER_REGEX.sub(entry, data.original_path)