Skip to content

Commit

Permalink
fix: mypy/pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
crisog committed Mar 7, 2024
1 parent 4b0c3d4 commit e0e84c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit/test_middleware/test_cors_middleware.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Mapping, Optional, cast
from typing import Any, Dict, List, Literal, Mapping, Optional, Union, cast

import pytest

Expand All @@ -7,6 +7,7 @@
from litestar.middleware.cors import CORSMiddleware
from litestar.status_codes import HTTP_200_OK, HTTP_404_NOT_FOUND
from litestar.testing import create_test_client
from litestar.types.asgi_types import Method


def test_setting_cors_middleware() -> None:
Expand Down Expand Up @@ -51,7 +52,7 @@ def test_cors_simple_response(
allow_credentials: bool,
expose_headers: List[str],
allow_headers: List[str],
allow_methods: List[str],
allow_methods: List[Union[Literal["*"], "Method"]],
) -> None:
@get("/")
def handler() -> Dict[str, str]:
Expand Down

0 comments on commit e0e84c8

Please sign in to comment.