Skip to content

Commit 8a75d92

Browse files
dshemetovkrivard
andauthored
Update integrations/server/test_covidcast_endpoints.py
- list comprehension readability Co-authored-by: Katie Mazaitis <[email protected]>
1 parent 766125a commit 8a75d92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

integrations/server/test_covidcast_endpoints.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ def _fetch(self, endpoint="/", is_compatibility=False, **params):
5050
return response.json()
5151

5252
def _diff_rows(self, rows: Sequence[float]):
53-
return [float(x - y) if x is not None and y is not None else None for x, y in zip(rows[1:], rows[:-1])]
53+
return [
54+
float(x - y) if x is not None and y is not None else None
55+
for x, y in zip(rows[1:], rows[:-1])
56+
]
5457

5558
def _smooth_rows(self, rows: Sequence[float]):
5659
return [sum(e)/len(e) if None not in e else None for e in windowed(rows, 7)]

0 commit comments

Comments
 (0)