aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar shtlrs <[email protected]>2023-03-11 21:27:49 +0100
committerGravatar shtlrs <[email protected]>2023-03-11 21:27:49 +0100
commite084a7ec9418e61d7e15f97675625a46c694746f (patch)
tree6955ad91f8ca647ce10a5621da755313c637ee1f
parentMerge pull request #2326 from python-discord/snekbox-files (diff)
switch order of env files to be parsed
The priority of the value to be picked is always the last file in the `env_file` tuple We want server values to always be picked up from .env.server, and if someone wants to override them for testing, they'll go into .env But the `env.server` shouldn't be manually tampered with
-rw-r--r--bot/constants.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 3aacd0a16..006d0e4ce 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -11,14 +11,13 @@ will default to the values passed to the `default` kwarg.
"""
import os
from enum import Enum
-from typing import Optional
from pydantic import BaseModel, BaseSettings, root_validator
class EnvConfig(BaseSettings):
class Config:
- env_file = ".env", ".env.server",
+ env_file = ".env.server", ".env",
env_file_encoding = 'utf-8'
env_nested_delimiter = '__'