mirror of https://github.com/tqdm/tqdm.git
ignore unknown env overrides
This commit is contained in:
parent
52d78121b1
commit
783bd6e070
|
@ -75,7 +75,8 @@ def envwrap(prefix, case_sensitive=False, literal_eval=False, is_method=False):
|
|||
# use `func` signature to infer env override `type` (fallback to `str`)
|
||||
params = signature(func).parameters
|
||||
for k in overrides:
|
||||
param = params[k]
|
||||
param = params.get(k, None)
|
||||
if param is not None:
|
||||
if param.annotation is not param.empty:
|
||||
typ = param.annotation
|
||||
# TODO: parse type in {Union, Any, Optional, ...}
|
||||
|
|
Loading…
Reference in New Issue