1
0

bytebeat_compiler.py: function fetch: simplify code

This commit is contained in:
Intel A80486DX2-66 2024-01-07 02:20:34 +03:00
parent a473c1f39a
commit 073b9a04f4
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -39,10 +39,10 @@ DEFAULT_PARAMETERS = {
}
def fetch(name: str):
res = DEFAULT_PARAMETERS[name]
if from_env := environ.get(name):
res = from_env
return res
return from_env
else:
return DEFAULT_PARAMETERS[name]
def read_file(path: str) -> str:
return open(path, "r", encoding="utf-8-sig").read()