Skip to content

Commit 1f37da4

Browse files
committed
tox: fix pylint errors
Adapt configuration and code to pylint 2.14: pylintrc:1 Unrecognized option found: no-space-check [unrecognized-option] pylintrc:1 Useless option value for '--disable', 'bad-continuation' was removed from pylint, see pylint-dev/pylint#3571. [useless-option-value] pylintrc:1 Unknown option value for '--disable', expected a valid pylint message and got 'no-self-use' [unknown-option-value] libyang/diff.py:33 Lambda expression assigned to a variable. Define a function using the "def" keyword instead. [unnecessary-lambda-assignment] libyang/keyed_list.py:118 Unnecessarily calls dunder method __contains__. Use in keyword. [unnecessary-dunder-call] setup.py:77 Implicit string concatenation found in call [implicit-str-concat] Signed-off-by: Robin Jarry <[email protected]>
1 parent ed37465 commit 1f37da4

File tree

5 files changed

+105
-70
lines changed

5 files changed

+105
-70
lines changed

libyang/diff.py

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def schema_diff(
3030
An iterator that yield `SNodeDiff` objects.
3131
"""
3232
if exclude_node_cb is None:
33+
# pylint: disable=unnecessary-lambda-assignment
3334
exclude_node_cb = lambda n: False
3435

3536
def flatten(node, dic):

libyang/keyed_list.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __str__(self):
115115
return str(list(self._map.values()))
116116

117117
def count(self, element: Any):
118-
if self.__contains__(element):
118+
if element in self:
119119
return 1
120120
return 0
121121

0 commit comments

Comments
 (0)