Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cwhanse committed Apr 4, 2024
1 parent c24b7cc commit 1250bcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pvlib/pvarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ def fit_huld(effective_irradiance, temp_module, pdc, method='ols'):
tprime*logGprime**2, tprime**2), axis=0).T
X = sm.add_constant(X)

if method=='ols':
if method == 'ols':
model = sm.OLS(Y, X, missing='drop')
elif method=='robust':
elif method == 'robust':
model = sm.RLM(Y, X, missing='drop')
else:
raise ValueError("method must be ols or robust")
Expand Down
2 changes: 1 addition & 1 deletion pvlib/tests/test_pvarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@ def test_fit_huld_method_error():
ee, tc = pvarray._build_iec61853()
pdc0 = 250
pdc = pvarray.huld(ee, tc, pdc0, cell_type='csi')
method='brute_force'
method = 'brute_force'
with pytest.raises(ValueError, match="method must be ols or robust"):
m_pdc0, k = pvarray.fit_huld(ee, tc, pdc, method=method)

0 comments on commit 1250bcd

Please sign in to comment.