Skip to content
Snippets Groups Projects

code refactor

Merged Florian Obersteiner requested to merge (removed):master into master
1 file
+ 14
6
Compare changes
  • Side-by-side
  • Inline
+ 14
6
@@ -308,7 +308,7 @@ class Variable:
:type miss: float, defaults to -99999.0
"""
def desc(self, splitChar=","):
def desc(self, splitChar=", "):
"""Variable description string as it appears in an ICARTT file
:return: description string
@@ -361,10 +361,12 @@ class Variable:
self.scale = scale
self.miss = miss
# TODO: should this also get a __str__ ?
def __repr__(self):
# TODO: this sould be more meaningful
return "ICARTT Variable object repr"
def __repr__(self): # TODO: this could be more meaningful?
return "ICARTT Variable description"
def __str__(self):
return self.desc()
class Dataset:
@@ -383,8 +385,6 @@ class Dataset:
:param format:
"""
# TODO: should this also get a __str__ and a __repr__ ?
@property
def nHeader(self):
"""Header line count
@@ -875,6 +875,14 @@ class Dataset:
except:
pass
def __repr__(self):
# TODO: this could be more meaningful
return "ICARTT Dataset object repr"
def __str__(self):
# TODO: this could be more meaningful
return "ICARTT Dataset string representation"
def __init__(self, f=None, loadData=True, splitChar=",", format=Formats.FFI1001): # TODO: why is init comming last?
"""Constructor method"""
self.format = format
Loading