Skip to content

Commit 708b9e6

Browse files
committed
Strict configuration
1 parent 3ddbd0b commit 708b9e6

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

simvue/config/parameters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
class ServerSpecifications(pydantic.BaseModel):
2525
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
26-
extra="forbid", strict=True
26+
extra="forbid",
27+
strict=True,
2728
)
2829
url: pydantic.AnyHttpUrl | None
2930
token: pydantic.SecretStr | None

simvue/config/user.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@
4949
class SimvueConfiguration(pydantic.BaseModel):
5050
# Hide values as they contain token and URL
5151
model_config = pydantic.ConfigDict(
52-
hide_input_in_errors=True, revalidate_instances="always"
52+
hide_input_in_errors=True,
53+
revalidate_instances="always",
54+
extra="forbid",
55+
strict=True,
5356
)
5457
client: ClientGeneralOptions = ClientGeneralOptions()
5558
server: ServerSpecifications = pydantic.Field(

0 commit comments

Comments
 (0)