Commit 131a72bb authored by Alexander Pace's avatar Alexander Pace

syntax cleanup

parent 2ea691b8
......@@ -1284,12 +1284,12 @@ class GraceDb(GsiRest):
superevent (``'production'``, ``'test'``, ``'mdc'``) and must
either already be a part of this superevent, or not be in a
superevent at all.
em_type (:obj:`str`, optional): name of coincident EM search
em_type (:obj:`str`, optional): name of coincident EM search
for "preferred" EM coincident event. Defined by analyst or
pipeline (e.g., RAVEN). Default is null for new superevents.
coinc_far (:obj:`float`, optional): new value for coincident FAR
with preferred EM coincident event. Defined by analyst or
pipeline (e.g., RAVEN). Default is null for new superevents.
pipeline (e.g., RAVEN). Default is null for new superevents.
Returns:
:class:`httplib.HTTPResponse`
......@@ -1306,8 +1306,8 @@ class GraceDb(GsiRest):
200
""" # noqa: W605
# Make sure that at least one parameter is provided
if not (t_start or t_0 or t_end or preferred_event or
em_type or coinc_far):
if not (t_start or t_0 or t_end or preferred_event
or em_type or coinc_far):
raise ValueError('Provide at least one of t_start, t_0, t_end, '
'preferred_event, em_type, or coinc_far')
......
......@@ -329,7 +329,8 @@ def test_creation_args(
def test_update_no_args(safe_client):
err_msg = 'Provide at least one of t_start, t_0, t_end, preferred_event, em_type, or coinc_far'
err_msg = ('Provide at least one of t_start, t_0, t_end, preferred_event, '
'em_type, or coinc_far')
with pytest.raises(ValueError, match=err_msg):
safe_client.updateSuperevent('S181224a')
......
......@@ -119,7 +119,8 @@ def test_creation_args(
def test_update_no_args(safe_client):
err_msg = 'Provide at least one of t_start, t_0, t_end, preferred_event, em_type, or coinc_far'
err_msg = ('Provide at least one of t_start, t_0, t_end, preferred_event, '
'em_type, or coinc_far')
with pytest.raises(ValueError, match=err_msg):
safe_client.updateSuperevent('S181224a')
......@@ -133,7 +134,7 @@ def test_update_no_args(safe_client):
{'preferred_event': 'G0001'},
{'em_type': 'EM_TEST'},
{'coinc_far': '4'},
{'t_start': 1, 't_0': 2, 't_end': 3, 'preferred_event': 'G0001',
{'t_start': 1, 't_0': 2, 't_end': 3, 'preferred_event': 'G0001',
'em_type': 'EM_TEST', 'coinc_far': '4'},
]
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment