Skip to content

Commit

Permalink
FIX-modin-project#2540: add __iter__ implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
  • Loading branch information
anmyachev committed Dec 15, 2020
1 parent da83b62 commit 47a95e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modin/config/envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _check_vars():
and issubclass(obj, EnvironmentVariable)
and not obj.is_abstract
}
found_names = {name for name in os.environ.keys() if name.startswith("MODIN_")}
found_names = {name for name in os.environ if name.startswith("MODIN_")}
unknown = found_names - valid_names
if unknown:
warnings.warn(
Expand Down
3 changes: 3 additions & 0 deletions modin/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ def __contains__(self, name):
def __getattr__(self, name):
return getattr(orig_env, name)

def __iter__(self):
return iter(orig_env)

os.environ = PatchedEnv()
yield
os.environ = orig_env
Expand Down

0 comments on commit 47a95e3

Please sign in to comment.