🎨 Format Python code with Black

This commit is contained in:
alexAubin 2024-06-21 14:27:31 +00:00 committed by OniriCorpe
parent dd8db1883a
commit 0bd69e5622

View file

@ -2993,7 +2993,16 @@ def _make_environment_for_app_script(
if manifest["packaging_format"] >= 2 or force_include_app_settings:
env_dict["app"] = app
data_to_redact = []
prefixes_or_suffixes_to_redact = ["pwd", "pass", "passwd", "password", "passphrase", "secret", "key", "token"]
prefixes_or_suffixes_to_redact = [
"pwd",
"pass",
"passwd",
"password",
"passphrase",
"secret",
"key",
"token",
]
for setting_name, setting_value in _get_app_settings(app).items():
# Ignore special internal settings like checksum__
@ -3006,7 +3015,10 @@ def _make_environment_for_app_script(
# Check if we should redact this setting value
# (the check on the setting length exists to prevent stupid stuff like redacting empty string or something which is actually just 0/1, true/false, ...
if len(setting_value) > 6 and any(setting_name.startswith(p) or setting_name.endswith(p) for p in prefixes_or_suffixes_to_redact):
if len(setting_value) > 6 and any(
setting_name.startswith(p) or setting_name.endswith(p)
for p in prefixes_or_suffixes_to_redact
):
data_to_redact.append(setting_value)
# Special weird case for backward compatibility...