Skip to content

Commit 01594d0

Browse files
committed
dev: use default pylint rules and add only disable rules in specific places
1 parent 1b6c3fd commit 01594d0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.pylintrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ exclude-too-few-public-methods=
290290
ignored-parents=
291291

292292
# Maximum number of arguments for function / method.
293-
max-args=6
293+
max-args=5
294294

295295
# Maximum number of attributes for a class (see R0902).
296296
max-attributes=7
@@ -302,7 +302,7 @@ max-bool-expr=5
302302
max-branches=12
303303

304304
# Maximum number of locals for function / method body.
305-
max-locals=19
305+
max-locals=15
306306

307307
# Maximum number of parents for a class (see R0901).
308308
max-parents=7
@@ -517,7 +517,7 @@ ignore-imports=yes
517517
ignore-signatures=yes
518518

519519
# Minimum lines number of a similarity.
520-
min-similarity-lines=10
520+
min-similarity-lines=4
521521

522522

523523
[SPELLING]

tedge_modbus/reader/reader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def read_register(self, buf, address=0, count=1):
196196
def poll_device(self, device, poll_model, mapper):
197197
"""Poll a Modbus device"""
198198
# TODO: Can this be simplified / split to smaller portions?
199-
# pylint: disable=too-many-branches
199+
# pylint: disable=too-many-branches,too-many-locals
200200
self.logger.debug("Polling device %s", device["name"])
201201
(
202202
coil_results,
@@ -266,6 +266,7 @@ def poll_device(self, device, poll_model, mapper):
266266

267267
def get_data_from_device(self, device, poll_model):
268268
"""Get Modbus information from the device"""
269+
# pylint: disable=too-many-locals
269270
client = ModbusTcpClient(
270271
host=device["ip"],
271272
port=device["port"],

0 commit comments

Comments
 (0)