File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -294,8 +294,7 @@ def items(self):
294294 - key = attribute name
295295 - value = its "contents" attribute
296296 """
297- for attr in self .__dict__ :
298- yield attr , getattr (self , attr )
297+ return self .__dict__ .items ()
299298
300299 def update (self , new_env ):
301300 """Update contents of environment from given dictionary"""
@@ -318,10 +317,7 @@ def environ(self):
318317 Return dict with mapping of ModuleEnvironmentVariables names with their contents
319318 Equivalent in shape to os.environ
320319 """
321- mapping = {}
322- for envar_name , envar_contents in self .items ():
323- mapping .update ({envar_name : str (envar_contents )})
324- return mapping
320+ return {envar_name : str (envar_contents ) for envar_name , envar_contents in self .items ()}
325321
326322
327323class ModulesTool (object ):
You can’t perform that action at this time.
0 commit comments