mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 02:30:44 -06:00
fix: make check explicitly for nones and not truthy
This commit is contained in:
parent
9b533c9c32
commit
33e2ff586c
1 changed files with 1 additions and 2 deletions
|
@ -118,7 +118,7 @@ class Env:
|
|||
)
|
||||
|
||||
def __getattr__(self, attr: str) -> Any:
|
||||
if not attr.startswith("_") and (defined := getattr(self, f"_{attr}")):
|
||||
if not attr.startswith("_") and (defined:=getattr(self, f"_{attr}")) is not None:
|
||||
return defined
|
||||
else:
|
||||
return os.getenv(attr.upper(), self.defaults.get(attr))
|
||||
|
@ -131,7 +131,6 @@ class Env:
|
|||
def _viv_spec(self) -> List[str]:
|
||||
return [i for i in os.getenv("VIV_SPEC", "").split(" ") if i]
|
||||
|
||||
|
||||
class Cache:
|
||||
def __init__(self) -> None:
|
||||
self.base = Env().viv_cache
|
||||
|
|
Loading…
Reference in a new issue