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.ED2HY3eFjZ and /tmp/tmp.EQy6HM8ULZ Tree base: b1358f505634 ("selftests: drv-net: rss_api: factor out checking min queue count") Now at: 518af4434b59 ("tools: ynl: support packing binary arrays of scalars") ====== 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:727:0: W0301: Unnecessary semicolon (unnecessary-semicolon) tools/net/ynl/pyynl/lib/ynl.py:734:0: C0301: Line too long (105/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:755:0: C0301: Line too long (107/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:787:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:802:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:1002:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1006:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1007:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1008:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1010: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 (1110/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 (19/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:595:12: 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:588:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:614:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:616:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:550:4: R0912: Too many branches (26/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:550:4: R0915: Too many statements (59/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:674:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:688: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:694:11: C0121: Comparison 'is_multi == None' should be 'is_multi is None' (singleton-comparison) tools/net/ynl/pyynl/lib/ynl.py:695:31: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/lib/ynl.py:711:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:717:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:734:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:734:58: E0602: Undefined variable 'attr_space' (undefined-variable) tools/net/ynl/pyynl/lib/ynl.py:738:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:748: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:748:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:755:94: E0606: Possibly using variable 'search_attrs' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/ynl.py:787:24: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:737:4: R0912: Too many branches (21/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:737:4: R0915: Too many statements (53/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:797:4: R0913: Too many arguments (6/5) (too-many-arguments) tools/net/ynl/pyynl/lib/ynl.py:797:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) tools/net/ynl/pyynl/lib/ynl.py:802: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:802:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:819:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:823:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:857:20: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:847: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:873:20: W0622: Redefining built-in 'len' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:881:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:865:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:912:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:902:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:918:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:940:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:944:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:945:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:957:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:982:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1026:4: R0914: Too many local variables (20/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:1081: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:1026:4: R0912: Too many branches (17/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:1026:4: R0915: Too many statements (54/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:1103:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1106:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1109: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.29/10 (previous run: 8.29/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:732:0: W0301: Unnecessary semicolon (unnecessary-semicolon) tools/net/ynl/pyynl/lib/ynl.py:739:0: C0301: Line too long (105/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:760:0: C0301: Line too long (107/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:792:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:807:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:1007:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1011:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1012:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1013:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1015: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 (1115/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 (19/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:590: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:593:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:619:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:621: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 (64/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:679:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:693: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:699:11: C0121: Comparison 'is_multi == None' should be 'is_multi is None' (singleton-comparison) tools/net/ynl/pyynl/lib/ynl.py:700:31: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/lib/ynl.py:716:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:722:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:739:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:739:58: E0602: Undefined variable 'attr_space' (undefined-variable) tools/net/ynl/pyynl/lib/ynl.py:743:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:753: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:753:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:760:94: E0606: Possibly using variable 'search_attrs' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/ynl.py:792:24: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:742:4: R0912: Too many branches (21/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:742:4: R0915: Too many statements (53/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:802:4: R0913: Too many arguments (6/5) (too-many-arguments) tools/net/ynl/pyynl/lib/ynl.py:802:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) tools/net/ynl/pyynl/lib/ynl.py:807: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:807:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:824:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:828:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:862:20: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:852: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:878:20: W0622: Redefining built-in 'len' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:886:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:870:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:917:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:907:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:923:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:945:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:949:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:950:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:962:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:987:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1031:4: R0914: Too many local variables (20/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:1086: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:1031:4: R0912: Too many branches (17/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:1031:4: R0915: Too many statements (54/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:1108:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1111:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1114: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.30/10 (previous run: 8.29/10, +0.01)