pylint 3.3.9 astroid 3.3.8 Python 3.14.2 (main, Dec 5 2025, 00:00:00) [GCC 15.2.1 20251111 (Red Hat 15.2.1-4)] Redirect to /tmp/tmp.59pS3RDCyP and /tmp/tmp.wj6CjzSE15 Tree base: 2d941627c1e1 ("tools: ynl-gen-c: fix pylint warnings for returns, unused, redefined") Now at: 0cf059140bce ("tools: ynl-gen-c: fix pylint None, type, dict, generators, init") ====== Checking before the patch ====== ************* Module pyynl.ynl_gen_c tools/net/ynl/pyynl/ynl_gen_c.py:3441:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens) tools/net/ynl/pyynl/ynl_gen_c.py:888:0: R1707: Disallow trailing comma tuple (trailing-comma-tuple) tools/net/ynl/pyynl/ynl_gen_c.py:204:25: E1136: Value 'member' is unsubscriptable (unsubscriptable-object) tools/net/ynl/pyynl/ynl_gen_c.py:217:25: E1136: Value 'member' is unsubscriptable (unsubscriptable-object) tools/net/ynl/pyynl/ynl_gen_c.py:261:11: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/ynl_gen_c.py:263:11: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/ynl_gen_c.py:575:15: E0606: Possibly using variable 'mem' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/ynl_gen_c.py:944:21: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/ynl_gen_c.py:1005:21: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ynl_gen_c.py:1097:14: R1728: Consider using a generator instead 'min(x.value for x in self.entries.values())' (consider-using-generator) tools/net/ynl/pyynl/ynl_gen_c.py:1098:15: R1728: Consider using a generator instead 'max(x.value for x in self.entries.values())' (consider-using-generator) tools/net/ynl/pyynl/ynl_gen_c.py:1271:21: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ynl_gen_c.py:1273:31: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ynl_gen_c.py:1275:44: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ynl_gen_c.py:1280:25: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ynl_gen_c.py:1282:35: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ynl_gen_c.py:1444:14: C1802: Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len) tools/net/ynl/pyynl/ynl_gen_c.py:1280:8: W0201: Attribute 'root_sets' defined outside __init__ (attribute-defined-outside-init) tools/net/ynl/pyynl/ynl_gen_c.py:1282:8: W0201: Attribute 'pure_nested_structs' defined outside __init__ (attribute-defined-outside-init) tools/net/ynl/pyynl/ynl_gen_c.py:1293:8: W0201: Attribute 'kernel_policy' defined outside __init__ (attribute-defined-outside-init) tools/net/ynl/pyynl/ynl_gen_c.py:1564:8: W0201: Attribute 'global_policy' defined outside __init__ (attribute-defined-outside-init) tools/net/ynl/pyynl/ynl_gen_c.py:1565:8: W0201: Attribute 'global_policy_set' defined outside __init__ (attribute-defined-outside-init) tools/net/ynl/pyynl/ynl_gen_c.py:1630:22: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ynl_gen_c.py:1682:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding) tools/net/ynl/pyynl/ynl_gen_c.py:1797:11: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/ynl_gen_c.py:1817:12: R1731: Consider using 'longest = max(longest, len(define[0]))' instead of unnecessary if block (consider-using-max-builtin) tools/net/ynl/pyynl/ynl_gen_c.py:1823:15: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/ynl_gen_c.py:1825:17: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/ynl_gen_c.py:1830:18: R1728: Consider using a generator instead 'max(len(x[0]) for x in members)' (consider-using-generator) tools/net/ynl/pyynl/ynl_gen_c.py:2673:8: R1714: Consider merging these comparisons with 'in' by using 'ri.op_mode in ('do', 'dump')'. Use a set instead if elements are hashable. (consider-using-in) tools/net/ynl/pyynl/ynl_gen_c.py:2686:9: R1714: Consider merging these comparisons with 'in' by using 'ri.op_mode in ('notify', 'event')'. Use a set instead if elements are hashable. (consider-using-in) tools/net/ynl/pyynl/ynl_gen_c.py:2949:7: R1714: Consider merging these comparisons with 'in' by using 'family.kernel_policy in ('global', 'per-op')'. Use a set instead if elements are hashable. (consider-using-in) ------------------------------------------------------------------ Your code has been rated at 9.84/10 (previous run: 9.84/10, +0.00) ====== Checking the tree with the patch ====== ************* Module pyynl.ynl_gen_c tools/net/ynl/pyynl/ynl_gen_c.py:3446:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens) tools/net/ynl/pyynl/ynl_gen_c.py:888:0: R1707: Disallow trailing comma tuple (trailing-comma-tuple) tools/net/ynl/pyynl/ynl_gen_c.py:575:15: E0606: Possibly using variable 'mem' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/ynl_gen_c.py:944:21: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/ynl_gen_c.py:1450:14: C1802: Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len) tools/net/ynl/pyynl/ynl_gen_c.py:1688:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding) ------------------------------------------------------------------ Your code has been rated at 9.96/10 (previous run: 9.84/10, +0.13)