Skip to content

Commit 1833dc1

Browse files
author
Omar
committed
Fix Flake8 linter errors
remove trailing whitespace and break long lines
1 parent 928207e commit 1833dc1

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

pvlib/pvarray.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,5 +394,6 @@ def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None, use_eu_jr
394394
# Eq. 1 in [1]
395395
pdc = gprime * (pdc0 + k[0] * logGprime + k[1] * logGprime**2 +
396396
k[2] * tprime + k[3] * tprime * logGprime +
397-
k[4] * tprime * logGprime**2 + k[5] * tprime**2)
397+
k[4] * tprime * logGprime**2 +
398+
k[5] * tprime**2)
398399
return pdc

tests/test_pvarray.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,14 @@ def test_huld_eu_jrc():
8080
# Test that EU JRC coefficients give different results than original for all cell types
8181
for cell_type in ['cSi', 'CIS', 'CdTe']:
8282
res_orig = pvarray.huld(eff_irr, temp_mod, pdc0, cell_type=cell_type)
83-
res_eu_jrc = pvarray.huld(eff_irr, temp_mod, pdc0, cell_type=cell_type, use_eu_jrc=True)
84-
assert not np.isclose(res_orig, res_eu_jrc), f"Results should differ for {cell_type}: {res_orig} vs {res_eu_jrc}"
83+
res_eu_jrc = pvarray.huld(
84+
eff_irr, temp_mod, pdc0, cell_type=cell_type, use_eu_jrc=True)
85+
assert not np.isclose(res_orig, res_eu_jrc), (
86+
f"Results should differ for {cell_type}: {res_orig} vs {res_eu_jrc}")
8587
# Also check that all cell types are supported and error is raised for invalid type
8688
try:
87-
pvarray.huld(eff_irr, temp_mod, pdc0, cell_type='invalid', use_eu_jrc=True)
89+
pvarray.huld(
90+
eff_irr, temp_mod, pdc0, cell_type='invalid', use_eu_jrc=True)
8891
except KeyError:
8992
pass
9093
else:

0 commit comments

Comments
 (0)