(self, var_name: str, value: str | None)
| 76 | return bool(self.AI_API_KEY and self.AI_MODEL) |
| 77 | |
| 78 | def _check_default_secret(self, var_name: str, value: str | None) -> None: |
| 79 | if value == "changethis": |
| 80 | message = ( |
| 81 | f'The value of {var_name} is "changethis", ' |
| 82 | "for security, please change it, at least for deployments." |
| 83 | ) |
| 84 | if self.ENVIRONMENT == "local": |
| 85 | warnings.warn(message, stacklevel=1) |
| 86 | else: |
| 87 | raise ValueError(message) |
| 88 | |
| 89 | @model_validator(mode="after") |
| 90 | def _enforce_non_default_secrets(self) -> Self: |
no outgoing calls
no test coverage detected