Skip to content

Commit 31b0ac8

Browse files
committed
Exceptions: Delete exclamation marks as per code review
1 parent 2eb1d4d commit 31b0ac8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pvlib/spectrum/mismatch.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,11 @@ def martin_ruiz_spectral_modifier(clearness_index, airmass_absolute,
354354
_params = MARTIN_RUIZ_PARAMS.loc[cell_type_lower]
355355
else:
356356
raise NotImplementedError('Cell type parameters not defined in '
357-
'algorithm! Allowed types are '
357+
'algorithm. Allowed types are '
358358
f'{tuple(MARTIN_RUIZ_PARAMS.index)}')
359359
elif cell_type is None and model_parameters is None:
360360
raise TypeError('You must pass at least "cell_type" '
361-
'or "model_parameters" as arguments!')
361+
'or "model_parameters" as arguments.')
362362
elif model_parameters is not None: # Use user-defined model parameters
363363
# Validate 'model_parameters' sub-dicts keys
364364
if any([{'a', 'b', 'c'} != set(model_parameters[component].keys())
@@ -368,7 +368,7 @@ def martin_ruiz_spectral_modifier(clearness_index, airmass_absolute,
368368

369369
_params = model_parameters
370370
if cell_type is not None:
371-
warn('Both "cell_type" and "model_parameters" given! '
371+
warn('Both "cell_type" and "model_parameters" given. '
372372
'Using provided "model_parameters".')
373373

374374
# Compute difference here to avoid recalculating inside loop

pvlib/tests/test_spectrum.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def test_martin_ruiz_mm_userwarning(martin_ruiz_mismatch_data):
303303
model_parameters = martin_ruiz_mismatch_data['monosi_model_params_dict']
304304

305305
with pytest.warns(UserWarning,
306-
match='Both "cell_type" and "model_parameters" given! '
306+
match='Both "cell_type" and "model_parameters" given. '
307307
'Using provided "model_parameters".'):
308308
_ = spectrum.martin_ruiz_spectral_modifier(
309309
clearness_index,
@@ -318,7 +318,7 @@ def test_martin_ruiz_mm_error_notimplemented(martin_ruiz_mismatch_data):
318318
airmass_absolute = np.array(martin_ruiz_mismatch_data['airmass_absolute'])
319319

320320
with pytest.raises(NotImplementedError,
321-
match='Cell type parameters not defined in algorithm!'):
321+
match='Cell type parameters not defined in algorithm.'):
322322
_ = spectrum.martin_ruiz_spectral_modifier(clearness_index,
323323
airmass_absolute,
324324
cell_type='')
@@ -331,7 +331,7 @@ def test_martin_ruiz_mm_error_missing_params(martin_ruiz_mismatch_data):
331331

332332
with pytest.raises(TypeError,
333333
match='You must pass at least "cell_type" '
334-
'or "model_parameters" as arguments!'):
334+
'or "model_parameters" as arguments.'):
335335
_ = spectrum.martin_ruiz_spectral_modifier(clearness_index,
336336
airmass_absolute)
337337

0 commit comments

Comments
 (0)