Skip to content

Commit

Permalink
Merge pull request #133 from uclahs-cds/dependabot/pip/pyright-1.1.384
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Oct 10, 2024
2 parents f3c1d43 + 5c5c4d4 commit 93a853e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dev-dependencies = [
"pytest-cov >= 4.1,< 5.0",
"coverage ~= 7.4",
"junit2html >= 30.1,< 32.0",
"pyright == 1.1.383",
"pyright == 1.1.384",
"isort ~= 5.13",
"ruff ~= 0.3",
"bandit[sarif,toml] ~= 1.7"
Expand Down
10 changes: 7 additions & 3 deletions src/web/Ligare/web/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dataclasses import field
from os import environ
from typing import Literal
from typing import Literal, Sequence, cast

from flask.config import Config as FlaskAppConfig
from Ligare.programming.config import AbstractConfig
Expand All @@ -16,7 +16,7 @@ class LoggingConfig(BaseModel):
class WebSecurityCorsConfig(BaseModel):
origins: list[str] | None = None
allow_credentials: bool = False
allow_methods: list[
allow_methods: Sequence[
Literal[
"GET",
"POST",
Expand All @@ -28,7 +28,11 @@ class WebSecurityCorsConfig(BaseModel):
"CONNECT",
"TRACE",
]
] = field(default_factory=lambda: ["GET", "POST", "OPTIONS"])
] = field(
default_factory=lambda: cast(
list[Literal["GET", "POST", "OPTIONS"]], ["GET", "POST", "OPTIONS"]
)
)
allow_headers: list[str | Literal["*"]] = field(default_factory=lambda: ["*"])


Expand Down

0 comments on commit 93a853e

Please sign in to comment.