Skip to content

Commit

Permalink
TMP
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Sep 24, 2024
1 parent 16180a1 commit 39c8b65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datasalad/settings/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()'
Expand Down

0 comments on commit 39c8b65

Please sign in to comment.