Skip to content

Commit 233fbfa

Browse files
committed
Add new fixes for previously-ignored rules
1 parent 627fed3 commit 233fbfa

4 files changed

Lines changed: 15 additions & 12 deletions

File tree

pvlib/clearsky.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,9 @@ def _clearsky_get_threshold(sample_interval):
673673
window_length = np.interp(sample_interval, data_freq, [50, 60, 90, 120])
674674
mean_diff = np.interp(sample_interval, data_freq, [75, 75, 75, 75])
675675
max_diff = np.interp(sample_interval, data_freq, [60, 65, 75, 90])
676-
lower_line_length = np.interp(sample_interval, data_freq, [-45,-45,-45,-45])
676+
lower_line_length = np.interp(sample_interval, data_freq, [-45,-45,-45,-45]) # noqa: E501
677677
upper_line_length = np.interp(sample_interval, data_freq, [80, 80, 80, 80])
678-
var_diff = np.interp(sample_interval, data_freq, [0.005, 0.01, 0.032, 0.07])
678+
var_diff = np.interp(sample_interval, data_freq, [0.005, 0.01, 0.032, 0.07]) # noqa: E501
679679
slope_dev = np.interp(sample_interval, data_freq, [50, 60, 75, 96])
680680

681681
return (window_length, mean_diff, max_diff, lower_line_length,

pvlib/iotools/midc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108

109109

110110
def _format_index(data):
111-
"""Create DatetimeIndex for the Dataframe localized to the timezone provided
112-
as the label of the second (time) column.
111+
"""Create DatetimeIndex for the Dataframe localized to the timezone
112+
provided as the label of the second (time) column.
113113
114114
Parameters
115115
----------
@@ -132,8 +132,8 @@ def _format_index(data):
132132

133133

134134
def _format_index_raw(data):
135-
"""Create DatetimeIndex for the Dataframe localized to the timezone provided
136-
as the label of the third column.
135+
"""Create DatetimeIndex for the Dataframe localized to the timezone
136+
provided as the label of the third column.
137137
138138
Parameters
139139
----------

pvlib/spa.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ def nocompile(*args, **kwargs):
402402
@jcompile('float64(int64, int64, int64, int64, int64, int64, int64)',
403403
nopython=True)
404404
def julian_day_dt(year, month, day, hour, minute, second, microsecond):
405-
"""This is the original way to calculate the julian day from the NREL paper.
406-
However, it is much faster to convert to unix/epoch time and then convert
407-
to julian day. Note that the date must be UTC."""
405+
"""This is the original way to calculate the julian day from the NREL
406+
paper. However, it is much faster to convert to unix/epoch time and then
407+
convert to julian day. Note that the date must be UTC."""
408408
if month <= 2:
409409
year = year-1
410410
month = month+12

tests/test_clearsky.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def test_lookup_linke_turbidity_nointerp_months():
263263

264264

265265
def test_haurwitz():
266-
apparent_solar_elevation = np.array([-20, -0.05, -0.001, 5, 10, 30, 50, 90])
266+
apparent_solar_elevation = np.array([-20, -0.05, -0.001, 5, 10, 30, 50, 90]) # noqa: E501
267267
apparent_solar_zenith = 90 - apparent_solar_elevation
268268
data_in = pd.DataFrame(data=apparent_solar_zenith,
269269
index=apparent_solar_zenith,
@@ -572,7 +572,8 @@ def test_clearsky_get_threshold_raises_error():
572572
clearsky._clearsky_get_threshold(0.5)
573573

574574

575-
def test_detect_clearsky_calls_threshold(mocker, detect_clearsky_threshold_data):
575+
def test_detect_clearsky_calls_threshold(mocker,
576+
detect_clearsky_threshold_data):
576577
threshold_spy = mocker.spy(clearsky, '_clearsky_get_threshold')
577578
expected, cs = detect_clearsky_threshold_data
578579
_ = clearsky.detect_clearsky(expected['GHI'], cs['ghi'],
@@ -892,5 +893,7 @@ def test_bird():
892893
# XXX: testdata starts at 1am so noon is at index = 11
893894
np.allclose(
894895
[Eb3, Ebh3, Gh3, Dh3],
895-
testdata2[['Direct Beam', 'Direct Hz', 'Global Hz', 'Dif Hz']].iloc[11],
896+
testdata2[
897+
['Direct Beam', 'Direct Hz', 'Global Hz', 'Dif Hz']
898+
].iloc[11],
896899
rtol=1e-3)

0 commit comments

Comments
 (0)