diff options
author | 2023-06-21 13:14:39 +0200 | |
---|---|---|
committer | 2023-06-21 13:14:39 +0200 | |
commit | d836a23df4684d6381f3a408b1349808d0504f16 (patch) | |
tree | 738aa96faa06d3822a7c0f8e8840f581112c4e70 | |
parent | Bump ruff from 0.0.272 to 0.0.274 (diff) |
Update code for new linter rules
Ignore RUF012, which suggests to add typing.ClassVar to "mutable" class
variables (in our case, it complained about the ordering attribute of
the `Meta` class within models) - annotating this would be a bit noisy.
-rw-r--r-- | pydis_site/apps/api/viewsets/bot/user.py | 4 | ||||
-rw-r--r-- | pyproject.toml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/user.py b/pydis_site/apps/api/viewsets/bot/user.py index 88fa3415..77378336 100644 --- a/pydis_site/apps/api/viewsets/bot/user.py +++ b/pydis_site/apps/api/viewsets/bot/user.py @@ -285,7 +285,7 @@ class UserViewSet(ModelViewSet): return Response(serializer.data, status=status.HTTP_200_OK) @action(detail=True) - def metricity_data(self, request: Request, pk: str = None) -> Response: + def metricity_data(self, request: Request, pk: str | None = None) -> Response: """Request handler for metricity_data endpoint.""" user = self.get_object() @@ -308,7 +308,7 @@ class UserViewSet(ModelViewSet): status=status.HTTP_404_NOT_FOUND) @action(detail=True) - def metricity_review_data(self, request: Request, pk: str = None) -> Response: + def metricity_review_data(self, request: Request, pk: str | None = None) -> Response: """Request handler for metricity_review_data endpoint.""" user = self.get_object() diff --git a/pyproject.toml b/pyproject.toml index 56d1f9bb..2f830df0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ ignore = [ "E731", "DJ001", "DJ008", "RET504", - "RUF005", + "RUF005", "RUF012", "S311", "SIM102", "SIM108", ] |