bytebeat_compiler.py: function fetch
: simplify code
This commit is contained in:
parent
a473c1f39a
commit
073b9a04f4
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user