MCPcopy
hub / github.com/pallets/flask / get_debug_flag

Function get_debug_flag

src/flask/helpers.py:28–33  ·  view source on GitHub ↗

Get whether debug mode should be enabled for the app, indicated by the :envvar:`FLASK_DEBUG` environment variable. The default is ``False``.

()

Source from the content-addressed store, hash-verified

26
27
28def get_debug_flag() -> bool:
29 """Get whether debug mode should be enabled for the app, indicated by the
30 :envvar:`FLASK_DEBUG` environment variable. The default is ``False``.
31 """
32 val = os.environ.get("FLASK_DEBUG")
33 return bool(val and val.lower() not in {"0", "false", "no"})
34
35
36def get_load_dotenv(default: bool = True) -> bool:

Callers 5

test_get_debug_flagMethod · 0.90
load_appMethod · 0.85
run_commandFunction · 0.85
runMethod · 0.85
make_configMethod · 0.85

Calls 1

getMethod · 0.45

Tested by 1

test_get_debug_flagMethod · 0.72