From 0fa69d55e0ee433ac3d1be2a5b12316a46666da2 Mon Sep 17 00:00:00 2001 From: Peter Schutt Date: Mon, 16 Jan 2023 15:28:02 +1000 Subject: [PATCH] feat!: constrain AppSettings.ENVIRONMENT We are starting to amass a bit of functionality that is condition upon the environment setting. E.g., sentry init disabled by default in test and local environments, alternate logging config if environment is local, and server reloading automatically configured for local environment. So allowing this setting to be _anything_ doesn't make a lot of sense. Closes #244 --- src/starlite_saqlalchemy/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/starlite_saqlalchemy/settings.py b/src/starlite_saqlalchemy/settings.py index ca803ba6..fdee98da 100644 --- a/src/starlite_saqlalchemy/settings.py +++ b/src/starlite_saqlalchemy/settings.py @@ -33,7 +33,7 @@ class Config: """Check for redis readiness on startup.""" DEBUG: bool = False """Run `Starlite` with `debug=True`.""" - ENVIRONMENT: str = "prod" + ENVIRONMENT: Literal["dev", "local", "prod", "stage", "test"] = "prod" """'dev', 'prod', etc.""" NAME: str = "my-starlite-saqlalchemy-app" """Application name."""