Consolidate the config with priority from high to low provided init value > OS environ > default.
(name, val, default=None)
| 46 | |
| 47 | |
| 48 | def get_combined_config(name, val, default=None): |
| 49 | """Consolidate the config with priority from high to low provided init |
| 50 | value > OS environ > default.""" |
| 51 | |
| 52 | if val is not None: |
| 53 | return val |
| 54 | |
| 55 | env = load_dash_env_vars().get(f"DASH_{name.upper()}") |
| 56 | if env is None: |
| 57 | return default |
| 58 | |
| 59 | return env.lower() == "true" if env.lower() in {"true", "false"} else env |
| 60 | |
| 61 | |
| 62 | def pathname_configs( |
searching dependent graphs…