Skip to content

Commit 064fb4c

Browse files
committed
Fix some flake8 and isort errors
1 parent 21a6e1d commit 064fb4c

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

data/rdm/PidDataTest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ def testLoad(self):
5151
self.assertEqual(store.ManufacturerIdToName(32767),
5252
"RESERVED FOR PROTOTYPING/EXPERIMENTAL USE ONLY")
5353

54+
5455
if __name__ == '__main__':
5556
unittest.main()

tools/rdm/TestDefinitions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
RDM_MANUFACTURER_PID_MIN,
2828
RDM_MANUFACTURER_SD_MAX, RDM_MANUFACTURER_SD_MIN,
2929
RDM_MAX_DOMAIN_NAME_LENGTH,
30-
RDM_MAX_HOSTNAME_LENGTH, RDM_MIN_HOSTNAME_LENGTH,
30+
RDM_MAX_HOSTNAME_LENGTH,
3131
RDM_MAX_SERIAL_NUMBER_LENGTH,
32+
RDM_MIN_HOSTNAME_LENGTH,
3233
RDM_ZERO_FOOTPRINT_DMX_ADDRESS)
3334
from ola.StringUtils import StringEscape
3435
from ola.testing.rdm import TestMixins

tools/rdm/TestMixins.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ def VerifyResult(self, response, fields):
201201

202202
if self.MAX_LENGTH and len(url_field) > self.MAX_LENGTH:
203203
self.AddAdvisory(
204-
'%s field in %s was %d, will ACK Overflow after %d, could you make a shorter URL?' %
204+
'%s field in %s was %d, will ACK Overflow after %d, could you make '
205+
'a shorter URL?' %
205206
(self.EXPECTED_FIELDS[0].capitalize(), self.pid.name,
206207
len(url_field), self.MAX_LENGTH))
207208

@@ -214,7 +215,8 @@ def VerifyResult(self, response, fields):
214215
(self.EXPECTED_FIELDS[0].capitalize(), self.pid.name, url_field))
215216
else:
216217
# Advisory if not HTTP(S) and maybe FTP for firmware...
217-
if self.ALLOWED_SCHEMAS and url_result.scheme not in self.ALLOWED_SCHEMAS:
218+
if (self.ALLOWED_SCHEMAS and
219+
(url_result.scheme not in self.ALLOWED_SCHEMAS)):
218220
self.AddAdvisory(
219221
'%s field in %s had schema %s, expected one of %s' %
220222
(self.EXPECTED_FIELDS[0].capitalize(), self.pid.name,
@@ -227,13 +229,16 @@ def VerifyResult(self, response, fields):
227229
(self.EXPECTED_FIELDS[0].capitalize(), self.pid.name))
228230
# else:
229231
# TODO(Peter): Check for a dot in the netloc
230-
# TODO(Peter): Check the netloc domain isn't a prohibited internal only one
232+
# TODO(Peter): Check the netloc domain isn't a prohibited internal
233+
# only one
231234

232-
# TODO(Peter): Optionally expect at least one other section (product/firmware)
235+
# TODO(Peter): Optionally expect at least one other section
236+
# (product/firmware)
233237
except ValueError as err:
234238
self.SetFailed(
235239
'%s field in %s didn\'t parse as a URL due to %s, was %s' %
236-
(self.EXPECTED_FIELDS[0].capitalize(), self.pid.name, str(err), url_field))
240+
(self.EXPECTED_FIELDS[0].capitalize(), self.pid.name, str(err),
241+
url_field))
237242

238243

239244
class GetRequiredMixin(ResponderTestFixture):

0 commit comments

Comments
 (0)