Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ optional-dependencies = { test-tools = [
"django-health-check",
"djangorestframework-recursive",
"djangorestframework",
"drf-spectacular (>=0.28.0,<1)",
"drf-writable-nested",
"drf-yasg (>=1.21.10,<2.0.0)",
"environs (<15)",
"gunicorn (>=19.1)",
"prometheus-client (>=0.0.16)",
Expand Down
4 changes: 2 additions & 2 deletions src/common/gunicorn/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.core.handlers.wsgi import WSGIHandler
from django.core.wsgi import get_wsgi_application
from django.http import HttpRequest
from drf_yasg.generators import EndpointEnumerator # type: ignore[import-untyped]
from drf_spectacular.generators import EndpointEnumerator
from environs import Env
from gunicorn.app.wsgiapp import ( # type: ignore[import-untyped]
WSGIApplication as GunicornWSGIApplication,
Expand Down Expand Up @@ -77,7 +77,7 @@ def get_route_template(route: str) -> str:
`"^api/v1/environments/(?P<environment_api_key>[^/.]+)/api-keys/$"` ->
`"/api/v1/environments/{environment_api_key}/api-keys/"`
"""
route_template: str = EndpointEnumerator().get_path_from_regex(route)
route_template: str = EndpointEnumerator().get_path_from_regex(route) # type: ignore[no-untyped-call]
return route_template


Expand Down
4 changes: 2 additions & 2 deletions src/task_processor/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any

from drf_yasg.utils import swagger_auto_schema # type: ignore[import-untyped]
from drf_spectacular.utils import extend_schema
from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import IsAdminUser, IsAuthenticated
from rest_framework.request import Request
Expand All @@ -10,7 +10,7 @@
from task_processor.serializers import MonitoringSerializer


@swagger_auto_schema(method="GET", responses={200: MonitoringSerializer()}) # type: ignore[untyped-decorator]
@extend_schema(methods=["GET"], responses={200: MonitoringSerializer()})
@api_view(http_method_names=["GET"])
@permission_classes([IsAuthenticated, IsAdminUser])
def monitoring(request: Request, /, **kwargs: Any) -> Response:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/common/gunicorn/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import time

import pytest
from drf_yasg.generators import EndpointEnumerator # type: ignore[import-untyped]
from drf_spectacular.generators import EndpointEnumerator
from pytest_mock import MockerFixture

from common.gunicorn.utils import (
Expand Down
Loading