diff options
| author | 2023-06-21 13:14:39 +0200 | |
|---|---|---|
| committer | 2023-06-21 13:14:39 +0200 | |
| commit | d836a23df4684d6381f3a408b1349808d0504f16 (patch) | |
| tree | 738aa96faa06d3822a7c0f8e8840f581112c4e70 /pydis_site/apps/api | |
| 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.
Diffstat (limited to 'pydis_site/apps/api')
| -rw-r--r-- | pydis_site/apps/api/viewsets/bot/user.py | 4 | 
1 files changed, 2 insertions, 2 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() | 
