Skip to content

Commit

Permalink
refactor: use default_factory
Browse files Browse the repository at this point in the history
  • Loading branch information
fbraem committed Dec 26, 2024
1 parent ef388f0 commit 3bed723
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/kwai/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class DatabaseSettings(BaseModel):
class CORSSettings(BaseModel):
"""Settings for configuring CORS."""

origins: list[str] = []
methods: list[str] = ["*"]
headers: list[str] = ["*"]
origins: list[str] = Field(default_factory=list)
methods: list[str] = Field(default_factory=lambda: ["*"])
headers: list[str] = Field(default_factory=lambda: ["*"])


class LoggerSettings(BaseModel):
Expand Down

0 comments on commit 3bed723

Please sign in to comment.