Skip to content
Snippets Groups Projects
Commit 9ad7d6e9 authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Fixes for coding conventions

parent 4281f9ef
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,7 @@ class IAGA2002Parser(object): ...@@ -186,7 +186,7 @@ class IAGA2002Parser(object):
conditions_of_use = comment.replace( conditions_of_use = comment.replace(
'CONDITIONS OF USE:', '').strip() 'CONDITIONS OF USE:', '').strip()
else: else:
comment_upper = comment.upper(); comment_upper = comment.upper()
if 'FILTER' in comment_upper: if 'FILTER' in comment_upper:
filter_comments.append(comment) filter_comments.append(comment)
elif 'INTERMAGNET DVD' in comment_upper or \ elif 'INTERMAGNET DVD' in comment_upper or \
......
...@@ -105,5 +105,4 @@ def test_parse_decbas(): ...@@ -105,5 +105,4 @@ def test_parse_decbas():
""" """
parser = IAGA2002Parser() parser = IAGA2002Parser()
parser.parse(IAGA2002_EXAMPLE) parser.parse(IAGA2002_EXAMPLE)
print parser.stats assert_equals(parser.metadata['declination_base'], 5527)
assert_equals(parser.stats['declination_base'], '5527')
...@@ -47,8 +47,8 @@ class IAGA2002Writer(object): ...@@ -47,8 +47,8 @@ class IAGA2002Writer(object):
# build comments # build comments
comments = [] comments = []
if 'declination_base' in stats: if 'declination_base' in stats:
comments.append('DECBAS {:<8d}' \ comments.append('DECBAS {:<8d}'
'(Baseline declination value in tenths of minutes East' \ '(Baseline declination value in tenths of minutes East'
' (0-216,000)).'.format(stats.declination_base)) ' (0-216,000)).'.format(stats.declination_base))
if 'filter_comments' in stats: if 'filter_comments' in stats:
comments.extend(stats.filter_comments) comments.extend(stats.filter_comments)
...@@ -60,7 +60,7 @@ class IAGA2002Writer(object): ...@@ -60,7 +60,7 @@ class IAGA2002Writer(object):
comments.append('Go to www.intermagnet.org for details on' + comments.append('Go to www.intermagnet.org for details on' +
' obtaining this product.') ' obtaining this product.')
if 'conditions_of_use' in stats: if 'conditions_of_use' in stats:
comments.append('CONDITIONS OF USE: ' + stats.conditions_of_use); comments.append('CONDITIONS OF USE: ' + stats.conditions_of_use)
# generate comment output # generate comment output
buf = [] buf = []
for comment in comments: for comment in comments:
......
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