Skip to content

Commit 40223a5

Browse files
authored
Merge pull request #75 from adafruit/linting
Linted
2 parents 93cd1e0 + b72300d commit 40223a5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/dht_time_calibration_advance.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,16 @@
8686
dhtDevice.exit()
8787

8888
# Gather the highest read numbers from all reads done.
89-
best_result = max([reads[milliseconds]["total_reads"] for milliseconds in reads])
90-
89+
best_result = max(
90+
[
91+
reads[milliseconds]["total_reads"]
92+
for milliseconds in reads # pylint: disable=consider-using-dict-items
93+
]
94+
)
9195
# Gather best time(s) in milliseconds where we got more reads
9296
best_times = [
9397
milliseconds
94-
for milliseconds in reads
98+
for milliseconds in reads # pylint: disable=consider-using-dict-items
9599
if reads[milliseconds]["total_reads"] == best_result
96100
]
97101
print(

0 commit comments

Comments
 (0)