Skip to content

Commit f644310

Browse files
committed
fixed pylint issues in example1
1 parent 36fd4fd commit f644310

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/example1_basic_lightning_i2c.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def reduce_noise(value):
5757

5858
if value > 7:
5959
print('Noise floor is at the maximum value.')
60-
return
60+
return 7
6161
print('Increasing the noise event threshold to ', value)
6262
lightning.noise_level = value
6363
return value
@@ -72,9 +72,10 @@ def increase_threshold(value):
7272
value += 1
7373
if value > 10:
7474
print('Watchdog threshold is at its maximum value')
75-
return
75+
return 10
7676
print('Increasing the disturber watchdog threshold to ', value)
7777
lightning.watchdog_threshold = value
78+
return value
7879

7980
# main code
8081

examples/example1_basic_lightning_spi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ def reduce_noise(value):
5757
# warns that smartphone and smart watch displays, DC-DC converters, and/or
5858
# anything that operates in 500 kHz range are noise sources to be avoided.
5959
# The manufacturer's default value is 2 with a maximum value of 7.
60-
value += 1
60+
value =+ 1
6161

6262
if value > 7:
6363
print('Noise floor is at the maximum value.')
64-
return
64+
return 7
6565
print('Increasing the noise event threshold to ', value)
6666
lightning.noise_level = value
6767
return value
@@ -76,7 +76,7 @@ def increase_threshold(value):
7676
value += 1
7777
if value > 10:
7878
print('Watchdog threshold is at its maximum value')
79-
return
79+
return 10
8080
print('Increasing the disturber watchdog threshold to ', value)
8181
lightning.watchdog_threshold = value
8282
return value

examples/example3_tune_antenna_i2c.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import board
2323
import busio
24-
import digitalio
2524
import sparkfun_qwiicas3935
2625

2726
# Create bus object using our board's I2C port

0 commit comments

Comments
 (0)