Skip to content

Commit 27e7e24

Browse files
committed
remove pylint disables
1 parent 3e167da commit 27e7e24

6 files changed

+0
-24
lines changed

examples/fingerprint_picturetest.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def get_fingerprint():
5858
return True
5959

6060

61-
# pylint: disable=too-many-branches
6261
def get_fingerprint_detail():
6362
"""Get a finger print image, template it, and see if it matches!
6463
This time, print out each error instead of just returning on failure"""
@@ -92,7 +91,6 @@ def get_fingerprint_detail():
9291

9392
print("Searching...", end="")
9493
i = finger.finger_fast_search()
95-
# pylint: disable=no-else-return
9694
# This block needs to be refactored when it can be tested.
9795
if i == adafruit_fingerprint.OK:
9896
print("Found fingerprint!")
@@ -146,7 +144,6 @@ def get_fingerprint_preview():
146144
return True
147145

148146

149-
# pylint: disable=too-many-statements
150147
def enroll_finger(location):
151148
"""Take a 2 finger images and template it, then store in 'location'"""
152149
for fingerimg in range(1, 3):

examples/fingerprint_r503.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def get_fingerprint():
3737
return True
3838

3939

40-
# pylint: disable=too-many-branches
4140
def get_fingerprint_detail():
4241
"""Get a finger print image, template it, and see if it matches!
4342
This time, print out each error instead of just returning on failure"""
@@ -71,7 +70,6 @@ def get_fingerprint_detail():
7170

7271
print("Searching...", end="")
7372
i = finger.finger_fast_search()
74-
# pylint: disable=no-else-return
7573
# This block needs to be refactored when it can be tested.
7674
if i == adafruit_fingerprint.OK:
7775
print("Found fingerprint!")
@@ -84,7 +82,6 @@ def get_fingerprint_detail():
8482
return False
8583

8684

87-
# pylint: disable=too-many-statements
8885
def enroll_finger(location):
8986
"""Take a 2 finger images and template it, then store in 'location'"""
9087
for fingerimg in range(1, 3):

examples/fingerprint_r503_rpi.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def get_fingerprint():
3838
return True
3939

4040

41-
# pylint: disable=too-many-branches
4241
def get_fingerprint_detail():
4342
"""Get a finger print image, template it, and see if it matches!
4443
This time, print out each error instead of just returning on failure"""
@@ -72,7 +71,6 @@ def get_fingerprint_detail():
7271

7372
print("Searching...", end="")
7473
i = finger.finger_fast_search()
75-
# pylint: disable=no-else-return
7674
# This block needs to be refactored when it can be tested.
7775
if i == adafruit_fingerprint.OK:
7876
print("Found fingerprint!")
@@ -85,7 +83,6 @@ def get_fingerprint_detail():
8583
return False
8684

8785

88-
# pylint: disable=too-many-statements
8986
def enroll_finger(location):
9087
"""Take a 2 finger images and template it, then store in 'location'"""
9188
for fingerimg in range(1, 3):
@@ -185,11 +182,8 @@ def save_fingerprint_image(filename):
185182
# module then copies the image data to the image placeholder "img"
186183
# pixel by pixel. please refer to section 4.2.1 of the manual for
187184
# more details. thanks to Bastian Raschke and Danylo Esterman.
188-
# pylint: disable=invalid-name
189185
x = 0
190-
# pylint: disable=invalid-name
191186
y = 0
192-
# pylint: disable=consider-using-enumerate
193187
for i in range(len(result)):
194188
pixeldata[x, y] = (int(result[i]) >> 4) * 17
195189
x += 1

examples/fingerprint_simpletest.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def get_fingerprint():
4141
return True
4242

4343

44-
# pylint: disable=too-many-branches
4544
def get_fingerprint_detail():
4645
"""Get a finger print image, template it, and see if it matches!
4746
This time, print out each error instead of just returning on failure"""
@@ -75,7 +74,6 @@ def get_fingerprint_detail():
7574

7675
print("Searching...", end="")
7776
i = finger.finger_fast_search()
78-
# pylint: disable=no-else-return
7977
# This block needs to be refactored when it can be tested.
8078
if i == adafruit_fingerprint.OK:
8179
print("Found fingerprint!")
@@ -88,7 +86,6 @@ def get_fingerprint_detail():
8886
return False
8987

9088

91-
# pylint: disable=too-many-statements
9289
def enroll_finger(location):
9390
"""Take a 2 finger images and template it, then store in 'location'"""
9491
for fingerimg in range(1, 3):

examples/fingerprint_simpletest_rpi.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def get_fingerprint():
3838
return True
3939

4040

41-
# pylint: disable=too-many-branches
4241
def get_fingerprint_detail():
4342
"""Get a finger print image, template it, and see if it matches!
4443
This time, print out each error instead of just returning on failure"""
@@ -72,7 +71,6 @@ def get_fingerprint_detail():
7271

7372
print("Searching...", end="")
7473
i = finger.finger_fast_search()
75-
# pylint: disable=no-else-return
7674
# This block needs to be refactored when it can be tested.
7775
if i == adafruit_fingerprint.OK:
7876
print("Found fingerprint!")
@@ -85,7 +83,6 @@ def get_fingerprint_detail():
8583
return False
8684

8785

88-
# pylint: disable=too-many-statements
8986
def enroll_finger(location):
9087
"""Take a 2 finger images and template it, then store in 'location'"""
9188
for fingerimg in range(1, 3):
@@ -173,11 +170,8 @@ def save_fingerprint_image(filename):
173170
# module then copies the image data to the image placeholder "img"
174171
# pixel by pixel. please refer to section 4.2.1 of the manual for
175172
# more details. thanks to Bastian Raschke and Danylo Esterman.
176-
# pylint: disable=invalid-name
177173
x = 0
178-
# pylint: disable=invalid-name
179174
y = 0
180-
# pylint: disable=consider-using-enumerate
181175
for i in range(len(result)):
182176
pixeldata[x, y] = (int(result[i]) >> 4) * 17
183177
x += 1

examples/fingerprint_template_file_compare.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def sensor_reset():
5050
print("Sensor is reset.")
5151

5252

53-
# pylint: disable=too-many-branches
5453
def fingerprint_check_file():
5554
"""Compares a new fingerprint template to an existing template stored in a file
5655
This is useful when templates are stored centrally (i.e. in a database)"""
@@ -80,7 +79,6 @@ def fingerprint_check_file():
8079
return False
8180

8281

83-
# pylint: disable=too-many-statements
8482
def enroll_save_to_file():
8583
"""Take a 2 finger images and template it, then store it in a file"""
8684
set_led_local(color=3, mode=1)
@@ -153,7 +151,6 @@ def enroll_save_to_file():
153151
return True
154152

155153

156-
# pylint: disable=broad-except
157154
def set_led_local(color=1, mode=3, speed=0x80, cycles=0):
158155
"""this is to make sure LED doesn't interfer with example
159156
running on models without LED support - needs testing"""

0 commit comments

Comments
 (0)