Method: flask.helpers.get_load_dotenv
Calls: 55, Exceptions: 0, Paths: 2Back
Path 1: 54 calls (0.98)
True (54)
True (54)
1def get_load_dotenv(default: bool = True) -> bool:
2 """Get whether the user has disabled loading default dotenv files by
3 setting :envvar:`FLASK_SKIP_DOTENV`. The default is ``True``, load
4 the files.
5
6 :param default: What to return if the env var isn't set.
7 """
8 val = os.environ.get("FLASK_SKIP_DOTENV")
9
10 if not val:
11 return default
12
13 return val.lower() in ("0", "false", "no")
Path 2: 1 calls (0.02)
True (1)
False (1)
1def get_load_dotenv(default: bool = True) -> bool:
2 """Get whether the user has disabled loading default dotenv files by
3 setting :envvar:`FLASK_SKIP_DOTENV`. The default is ``True``, load
4 the files.
5
6 :param default: What to return if the env var isn't set.
7 """
8 val = os.environ.get("FLASK_SKIP_DOTENV")
9
10 if not val:
11 return default
12
13 return val.lower() in ("0", "false", "no")