From f20a42a9afbfee75f403c14d48dcab094a5843a4 Mon Sep 17 00:00:00 2001 From: GDWR Date: Thu, 12 May 2022 19:09:44 +0100 Subject: [PATCH] Allow `.env` files to not exists as it will use environment Co-authored-by: fisher60 <39353605+fisher60@users.noreply.github.com> --- classy_config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classy_config/config.py b/classy_config/config.py index 6ef8832..bcfb3f3 100644 --- a/classy_config/config.py +++ b/classy_config/config.py @@ -33,7 +33,7 @@ def register_config( if isinstance(filepath, str): filepath = Path(filepath) - if not filepath.exists(): + if not filepath.match("*.env") and not filepath.exists(): raise FileNotFoundError(filepath) raw_config = loader(filepath)