pylint 3.3.7 astroid 3.3.8 Python 3.13.5 (main, Jun 12 2025, 00:00:00) [GCC 15.1.1 20250521 (Red Hat 15.1.1-2)] Redirect to /tmp/tmp.UUusWoZ1ok and /tmp/tmp.uzQws3u3ed Tree base: 1aee9e1458f1 ("tools: ynl: encode indexed-array") Now at: 919f28a49467 ("tools: ynl: decode hex input") ====== Checking before the patch ====== ************* Module pyynl.lib.ynl tools/net/ynl/pyynl/lib/ynl.py:104:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:105:0: W0311: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:106:0: W0311: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:108:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:109:0: W0311: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:276:0: C0301: Line too long (113/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:764:0: W0301: Unnecessary semicolon (unnecessary-semicolon) tools/net/ynl/pyynl/lib/ynl.py:771:0: C0301: Line too long (105/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:792:0: C0301: Line too long (107/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:824:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:839:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:1039:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1043:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1044:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1045:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1047:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1:0: C0302: Too many lines in module (1147/1000) (too-many-lines) tools/net/ynl/pyynl/lib/ynl.py:1:0: C0114: Missing module docstring (missing-module-docstring) tools/net/ynl/pyynl/lib/ynl.py:26:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:26:0: R0903: Too few public methods (0/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:103:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:112:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:116:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:138:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:139:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:145:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:146:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:149:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:153:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:151:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:156:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:159:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:162:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:162:25: W0622: Redefining built-in 'type' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:163:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:170:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:191:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:191:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/ynl.py:215:26: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:240:16: W0622: Redefining built-in 'type' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:272:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:284:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:284:0: R0903: Too few public methods (1/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:298: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:325:8: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/ynl.py:326:33: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:339:22: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:348:39: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:328:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks) tools/net/ynl/pyynl/lib/ynl.py:328:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks) tools/net/ynl/pyynl/lib/ynl.py:314:0: R0912: Too many branches (15/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:363:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:369:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:375:17: E1101: Instance of 'GenlMsg' has no 'raw_attrs' member (no-member) tools/net/ynl/pyynl/lib/ynl.py:380:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:391:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:391:38: W0613: Unused argument 'version' (unused-argument) tools/net/ynl/pyynl/lib/ynl.py:397:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:401:28: W0212: Access to a protected member _struct_size of a client class (protected-access) tools/net/ynl/pyynl/lib/ynl.py:405:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:407:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:410:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:414:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:418: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:435:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:442:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:450:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:456:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:458:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:442:0: R0903: Too few public methods (1/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:466:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:466:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/ynl.py:481: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:481:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:511:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:517:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:530: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:550:4: R0914: Too many local variables (18/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:592:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:554: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:554:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:595:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:621:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:623:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:550:4: R0912: Too many branches (28/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:550:4: R0915: Too many statements (65/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:641:8: W0612: Unused variable 'nested_flag' (unused-variable) tools/net/ynl/pyynl/lib/ynl.py:711:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:725: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:731:11: C0121: Comparison 'is_multi == None' should be 'is_multi is None' (singleton-comparison) tools/net/ynl/pyynl/lib/ynl.py:732:31: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/lib/ynl.py:748:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:754:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:771:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:771:58: E0602: Undefined variable 'attr_space' (undefined-variable) tools/net/ynl/pyynl/lib/ynl.py:775:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:785: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:785:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:792:94: E0606: Possibly using variable 'search_attrs' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/ynl.py:824:24: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:774:4: R0912: Too many branches (21/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:774:4: R0915: Too many statements (53/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:834:4: R0913: Too many arguments (6/5) (too-many-arguments) tools/net/ynl/pyynl/lib/ynl.py:834:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) tools/net/ynl/pyynl/lib/ynl.py:839: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:839:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:856:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:860:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:894:20: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:884: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:910:20: W0622: Redefining built-in 'len' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:918:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:902:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:949:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:939:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:955:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:977:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:981:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:982:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:994:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1019:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1063:4: R0914: Too many local variables (20/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:1118:20: R1724: Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it (no-else-continue) tools/net/ynl/pyynl/lib/ynl.py:1063:4: R0912: Too many branches (17/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:1063:4: R0915: Too many statements (54/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:1140:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1143:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1146:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:13:0: C0411: standard import "ipaddress" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:14:0: C0411: standard import "uuid" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:15:0: C0411: standard import "queue" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:16:0: C0411: standard import "selectors" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:17:0: C0411: standard import "time" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:12:0: W0611: Unused import yaml (unused-import) ------------------------------------------------------------------ Your code has been rated at 8.34/10 (previous run: 8.34/10, +0.00) ====== Checking the tree with the patch ====== ************* Module pyynl.lib.ynl tools/net/ynl/pyynl/lib/ynl.py:104:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:105:0: W0311: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:106:0: W0311: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:108:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:109:0: W0311: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:276:0: C0301: Line too long (113/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:764:0: W0301: Unnecessary semicolon (unnecessary-semicolon) tools/net/ynl/pyynl/lib/ynl.py:771:0: C0301: Line too long (105/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:792:0: C0301: Line too long (107/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:824:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:839:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:1041:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1045:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1046:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1047:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1049:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1:0: C0302: Too many lines in module (1149/1000) (too-many-lines) tools/net/ynl/pyynl/lib/ynl.py:1:0: C0114: Missing module docstring (missing-module-docstring) tools/net/ynl/pyynl/lib/ynl.py:26:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:26:0: R0903: Too few public methods (0/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:103:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:112:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:116:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:138:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:139:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:145:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:146:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:149:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:153:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:151:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:156:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:159:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:162:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:162:25: W0622: Redefining built-in 'type' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:163:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:170:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:191:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:191:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/ynl.py:215:26: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:240:16: W0622: Redefining built-in 'type' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:272:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:284:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:284:0: R0903: Too few public methods (1/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:298: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:325:8: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/ynl.py:326:33: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:339:22: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:348:39: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:328:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks) tools/net/ynl/pyynl/lib/ynl.py:328:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks) tools/net/ynl/pyynl/lib/ynl.py:314:0: R0912: Too many branches (15/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:363:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:369:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:375:17: E1101: Instance of 'GenlMsg' has no 'raw_attrs' member (no-member) tools/net/ynl/pyynl/lib/ynl.py:380:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:391:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:391:38: W0613: Unused argument 'version' (unused-argument) tools/net/ynl/pyynl/lib/ynl.py:397:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:401:28: W0212: Access to a protected member _struct_size of a client class (protected-access) tools/net/ynl/pyynl/lib/ynl.py:405:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:407:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:410:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:414:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:418: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:435:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:442:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:450:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:456:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:458:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:442:0: R0903: Too few public methods (1/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:466:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:466:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/ynl.py:481: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:481:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:511:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:517:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:530: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:550:4: R0914: Too many local variables (18/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:592:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:554: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:554:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:595:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:621:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:623:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:550:4: R0912: Too many branches (28/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:550:4: R0915: Too many statements (65/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:641:8: W0612: Unused variable 'nested_flag' (unused-variable) tools/net/ynl/pyynl/lib/ynl.py:711:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:725: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:731:11: C0121: Comparison 'is_multi == None' should be 'is_multi is None' (singleton-comparison) tools/net/ynl/pyynl/lib/ynl.py:732:31: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/lib/ynl.py:748:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:754:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:771:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:771:58: E0602: Undefined variable 'attr_space' (undefined-variable) tools/net/ynl/pyynl/lib/ynl.py:775:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:785: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:785:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:792:94: E0606: Possibly using variable 'search_attrs' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/ynl.py:824:24: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:774:4: R0912: Too many branches (21/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:774:4: R0915: Too many statements (53/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:834:4: R0913: Too many arguments (6/5) (too-many-arguments) tools/net/ynl/pyynl/lib/ynl.py:834:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) tools/net/ynl/pyynl/lib/ynl.py:839: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:839:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:856:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:860:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:894:20: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:884: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:910:20: W0622: Redefining built-in 'len' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:918:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:902:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:949:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:939:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:955:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:979:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:983:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:984:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:996:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1021:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1065:4: R0914: Too many local variables (20/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:1120:20: R1724: Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it (no-else-continue) tools/net/ynl/pyynl/lib/ynl.py:1065:4: R0912: Too many branches (17/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:1065:4: R0915: Too many statements (54/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:1142:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1145:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1148:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:13:0: C0411: standard import "ipaddress" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:14:0: C0411: standard import "uuid" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:15:0: C0411: standard import "queue" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:16:0: C0411: standard import "selectors" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:17:0: C0411: standard import "time" should be placed before third party import "yaml" (wrong-import-order) tools/net/ynl/pyynl/lib/ynl.py:12:0: W0611: Unused import yaml (unused-import) ------------------------------------------------------------------ Your code has been rated at 8.34/10 (previous run: 8.34/10, +0.00)