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.RNSMoS129s and /tmp/tmp.TC3CsxelbS Tree base: d660508b99c4 ("tools: ynl: fix pylint redefinition, encoding errors") Now at: 68433759ed4f ("tools: ynl: fix pylint exception warnings") ====== Checking before the patch ====== ************* Module pyynl.cli tools/net/ynl/pyynl/cli.py:33:14: E0602: Undefined variable 'YnlException' (undefined-variable) tools/net/ynl/pyynl/cli.py:43:14: E0602: Undefined variable 'YnlException' (undefined-variable) tools/net/ynl/pyynl/cli.py:192:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/cli.py:197:15: W0718: Catching too general exception Exception (broad-exception-caught) ------------------------------------------------------------------ Your code has been rated at 9.33/10 (previous run: 9.33/10, +0.00) -------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) ************* Module pyynl.lib.nlspec tools/net/ynl/pyynl/lib/nlspec.py:577:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:580:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:581:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:582:0: W0311: Bad indentation. Found 10 spaces, expected 16 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:583:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:17:0: C0103: Constant name "jsonschema" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/lib/nlspec.py:101:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) tools/net/ynl/pyynl/lib/nlspec.py:127:23: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/nlspec.py:128:30: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/nlspec.py:192:30: R1714: Consider merging these comparisons with 'in' by using 'self.type in ('sint', 'uint')'. Use a set instead if elements are hashable. (consider-using-in) tools/net/ynl/pyynl/lib/nlspec.py:298:15: E1101: Instance of 'list' has no 'items' member (no-member) tools/net/ynl/pyynl/lib/nlspec.py:388:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/nlspec.py:443:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/nlspec.py:461:12: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/nlspec.py:558:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/nlspec.py:574:22: E0606: Possibly using variable 'op' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/nlspec.py:523:8: W0201: Attribute 'fixed_header' defined outside __init__ (attribute-defined-outside-init) tools/net/ynl/pyynl/lib/nlspec.py:535:8: W0201: Attribute 'fixed_header' defined outside __init__ (attribute-defined-outside-init) ------------------------------------------------------------------ Your code has been rated at 9.21/10 (previous run: 9.21/10, +0.00) ************* Module pyynl.lib.ynl tools/net/ynl/pyynl/lib/ynl.py:295:0: C0301: Line too long (113/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:793:0: C0301: Line too long (114/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:815:0: C0301: Line too long (107/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:847:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:863:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:170:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:234:26: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:318:0: C0103: Constant name "genl_family_name_to_id" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/lib/ynl.py:346:8: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/ynl.py:347:33: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:360:22: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:369:39: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:396:17: E1101: Instance of 'GenlMsg' has no 'raw_attrs' member (no-member) tools/net/ynl/pyynl/lib/ynl.py:412:38: W0613: Unused argument 'version' (unused-argument) tools/net/ynl/pyynl/lib/ynl.py:422:28: W0212: Access to a protected member _struct_size of a client class (protected-access) tools/net/ynl/pyynl/lib/ynl.py:428:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:439:8: W0602: Using global for 'genl_family_name_to_id' but no assignment is done (global-variable-not-assigned) tools/net/ynl/pyynl/lib/ynl.py:456:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:478:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:480:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:503:12: W0707: Consider explicitly re-raising using 'except KeyError as exc' and 'raise Exception(f"Family '{self.yaml['name']}' not supported by the kernel") from exc' (raise-missing-from) tools/net/ynl/pyynl/lib/ynl.py:503:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:552:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) tools/net/ynl/pyynl/lib/ynl.py:577:12: W0707: Consider explicitly re-raising using 'except KeyError as exc' and 'raise Exception(f"Space '{space}' has no attribute '{name}'") from exc' (raise-missing-from) tools/net/ynl/pyynl/lib/ynl.py:577:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:618:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:644:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:646:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:733:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:747:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) tools/net/ynl/pyynl/lib/ynl.py:754:31: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/lib/ynl.py:770:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:776:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:793:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:798:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:808:20: W0707: Consider explicitly re-raising using 'except (KeyError, UnboundLocalError) as exc' and 'raise Exception(f"Space '{space}' has no attribute with value '{attr.type}'") from exc' (raise-missing-from) tools/net/ynl/pyynl/lib/ynl.py:808:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:815:94: E0606: Possibly using variable 'search_attrs' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/ynl.py:847:24: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:863:16: W0707: Consider explicitly re-raising using 'except KeyError as exc' and 'raise Exception(f"Space '{attr_set.name}' has no attribute with value '{attr.type}'") from exc' (raise-missing-from) tools/net/ynl/pyynl/lib/ynl.py:863:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:880:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:884:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:908:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) tools/net/ynl/pyynl/lib/ynl.py:926:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:934:27: E1101: Instance of 'YnlFamily' has no 'struct_size' member; maybe '_struct_size'? (no-member) tools/net/ynl/pyynl/lib/ynl.py:963:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:979:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:1011:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:1015:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:1020:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:1157:20: R1724: Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it (no-else-continue) ------------------------------------------------------------------ Your code has been rated at 9.29/10 (previous run: 9.29/10, +0.00) ====== Checking the tree with the patch ====== ------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 9.33/10, +0.67) -------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) ************* Module pyynl.lib.nlspec tools/net/ynl/pyynl/lib/nlspec.py:582:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:585:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:586:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:587:0: W0311: Bad indentation. Found 10 spaces, expected 16 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:588:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:17:0: C0103: Constant name "jsonschema" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/lib/nlspec.py:106:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) tools/net/ynl/pyynl/lib/nlspec.py:132:23: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/nlspec.py:133:30: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/nlspec.py:197:30: R1714: Consider merging these comparisons with 'in' by using 'self.type in ('sint', 'uint')'. Use a set instead if elements are hashable. (consider-using-in) tools/net/ynl/pyynl/lib/nlspec.py:303:15: E1101: Instance of 'list' has no 'items' member (no-member) tools/net/ynl/pyynl/lib/nlspec.py:466:12: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/nlspec.py:579:22: E0606: Possibly using variable 'op' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/nlspec.py:528:8: W0201: Attribute 'fixed_header' defined outside __init__ (attribute-defined-outside-init) tools/net/ynl/pyynl/lib/nlspec.py:540:8: W0201: Attribute 'fixed_header' defined outside __init__ (attribute-defined-outside-init) ------------------------------------------------------------------ Your code has been rated at 9.31/10 (previous run: 9.21/10, +0.09) ************* Module pyynl.lib.ynl tools/net/ynl/pyynl/lib/ynl.py:299:0: C0301: Line too long (113/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:821:0: C0301: Line too long (107/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:238:26: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:322:0: C0103: Constant name "genl_family_name_to_id" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/lib/ynl.py:350:8: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/ynl.py:351:33: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:364:22: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:373:39: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:400:17: E1101: Instance of 'GenlMsg' has no 'raw_attrs' member (no-member) tools/net/ynl/pyynl/lib/ynl.py:416:38: W0613: Unused argument 'version' (unused-argument) tools/net/ynl/pyynl/lib/ynl.py:426:28: W0212: Access to a protected member _struct_size of a client class (protected-access) tools/net/ynl/pyynl/lib/ynl.py:443:8: W0602: Using global for 'genl_family_name_to_id' but no assignment is done (global-variable-not-assigned) tools/net/ynl/pyynl/lib/ynl.py:556:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) tools/net/ynl/pyynl/lib/ynl.py:751:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) tools/net/ynl/pyynl/lib/ynl.py:758:31: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/lib/ynl.py:803:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:821:94: E0606: Possibly using variable 'search_attrs' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/ynl.py:917:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) tools/net/ynl/pyynl/lib/ynl.py:935:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:943:27: E1101: Instance of 'YnlFamily' has no 'struct_size' member; maybe '_struct_size'? (no-member) tools/net/ynl/pyynl/lib/ynl.py:972:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:988:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:1029:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:1166:20: R1724: Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it (no-else-continue) ------------------------------------------------------------------ Your code has been rated at 9.60/10 (previous run: 9.29/10, +0.31)