Skip to content
Snippets Groups Projects
Commit 136c60b0 authored by Florian Obersteiner's avatar Florian Obersteiner
Browse files

built-in 'vars', readability

parent 5d6ab2ec
No related branches found
No related tags found
1 merge request!6code refactor
......@@ -433,17 +433,17 @@ class Dataset:
:return: dictionary of all variables
:rtype: dict of Variable(s)
"""
vars = {} # TODO rename - "vars" is a Python built-in
if not self.independentVariable is None: # TODO use "is not None" for readbility
vars[self.independentVariable.shortname] = self.independentVariable
if not self.independentBoundedVariable is None: # TODO use "is not None" for readbility
vars[
variables = {}
if self.independentVariable is not None:
variables[self.independentVariable.shortname] = self.independentVariable
if self.independentBoundedVariable is not None:
variables[
self.independentBoundedVariable.shortname
] = self.independentBoundedVariable
vars = {**vars, **self.dependentVariables, **self.auxiliaryVariables}
variables = {**variables, **self.dependentVariables, **self.auxiliaryVariables}
return vars
return variables
def readHeader(self, splitChar=","):
"""Read the ICARTT header (from file)"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment