We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 93cd1e0 + b72300d commit 40223a5Copy full SHA for 40223a5
examples/dht_time_calibration_advance.py
@@ -86,12 +86,16 @@
86
dhtDevice.exit()
87
88
# Gather the highest read numbers from all reads done.
89
-best_result = max([reads[milliseconds]["total_reads"] for milliseconds in reads])
90
-
+best_result = max(
+ [
91
+ reads[milliseconds]["total_reads"]
92
+ for milliseconds in reads # pylint: disable=consider-using-dict-items
93
+ ]
94
+)
95
# Gather best time(s) in milliseconds where we got more reads
96
best_times = [
97
milliseconds
- for milliseconds in reads
98
99
if reads[milliseconds]["total_reads"] == best_result
100
]
101
print(
0 commit comments