diff --git a/datasalad/settings/env.py b/datasalad/settings/env.py index 5d96e46..593a096 100644 --- a/datasalad/settings/env.py +++ b/datasalad/settings/env.py @@ -91,6 +91,12 @@ def keys(self) -> Collection: def __str__(self): return f'Environment[{self._var_prefix}]' if self._var_prefix else 'Environment' + def __contains__(self, key: str) -> bool: + # we only need to reimplement this due to Python's behavior to + # forece-modify environment variable names on Windows. Only + # talking directly for environ accounts for that + return key in environ + def __repr__(self): # TODO: list keys? return 'Environment()'