Skip to content

Commit

Permalink
Merge pull request #75 from adafruit/linting
Browse files Browse the repository at this point in the history
Linted
  • Loading branch information
tannewt authored Sep 28, 2021
2 parents 93cd1e0 + b72300d commit 40223a5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/dht_time_calibration_advance.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@
dhtDevice.exit()

# Gather the highest read numbers from all reads done.
best_result = max([reads[milliseconds]["total_reads"] for milliseconds in reads])

best_result = max(
[
reads[milliseconds]["total_reads"]
for milliseconds in reads # pylint: disable=consider-using-dict-items
]
)
# Gather best time(s) in milliseconds where we got more reads
best_times = [
milliseconds
for milliseconds in reads
for milliseconds in reads # pylint: disable=consider-using-dict-items
if reads[milliseconds]["total_reads"] == best_result
]
print(
Expand Down

0 comments on commit 40223a5

Please sign in to comment.