
April 15, 2022
5:15 p.m.
Hi Erik, yes exactly. But it could also change the semantics when a reader is reviewing the Settings class. Of course we could add a `RequiredAtRuntime` type to use as the default to work around this, but it could be very unclear to someone new to pydantic. Samuel On Fri, 15 Apr 2022, 18:04 Erik De Bonte, <Erik.DeBonte@microsoft.com> wrote:
```python
class Settings(BaseSettings):
db_password: str
```
…
But either way, the point is that the field is "required", just that it's not necessarily required as an argument.
I see. So while having a default value for `db_password` would solve the problem from a static type checking perspective, your concern is that it would change the runtime behavior?
-Erik