pylint 3.3.7 astroid 3.3.8 Python 3.13.3 (main, Apr 22 2025, 00:00:00) [GCC 15.0.1 20250418 (Red Hat 15.0.1-0)] Redirect to /tmp/tmp.PxXQbCTgkP and /tmp/tmp.Hq4k5znbcR Tree base: d0fa59897e04 ("tcp: fix tcp_packet_delayed() for tcp_is_non_sack_preventing_reopen() behavior") Now at: d12a093cd003 ("tools: ynl: fix mixing ops and notifications on one socket") ====== 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:271:0: C0301: Line too long (113/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:722:0: W0301: Unnecessary semicolon (unnecessary-semicolon) tools/net/ynl/pyynl/lib/ynl.py:729:0: C0301: Line too long (105/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:750:0: C0301: Line too long (107/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:780:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:795:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:995:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:999:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1000:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1001:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1003: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 (1102/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:192:4: R0912: Too many branches (15/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:247:16: W0622: Redefining built-in 'type' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:267:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:279:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:279:0: R0903: Too few public methods (1/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:293: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:320:8: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/ynl.py:321:33: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:334:22: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:343:39: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:323:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks) tools/net/ynl/pyynl/lib/ynl.py:323:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks) tools/net/ynl/pyynl/lib/ynl.py:309:0: R0912: Too many branches (15/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:358:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:364:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:370:17: E1101: Instance of 'GenlMsg' has no 'raw_attrs' member (no-member) tools/net/ynl/pyynl/lib/ynl.py:375:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:386:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:386:38: W0613: Unused argument 'version' (unused-argument) tools/net/ynl/pyynl/lib/ynl.py:392:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:396:28: W0212: Access to a protected member _struct_size of a client class (protected-access) tools/net/ynl/pyynl/lib/ynl.py:400:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:402:12: W0719: Raising too general exception: Exception (broad-exception-raised) 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:409:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:413: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:430:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:437:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:445:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:451:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:453:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:437:0: R0903: Too few public methods (1/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:461:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:461:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/ynl.py:476: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:476:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:506:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:512:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:525: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:545:4: R0914: Too many local variables (19/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:590:12: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:549: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:549:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:583:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:609:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:611:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:545:4: R0912: Too many branches (26/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:545:4: R0915: Too many statements (59/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:669:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:683: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:689:11: C0121: Comparison 'is_multi == None' should be 'is_multi is None' (singleton-comparison) tools/net/ynl/pyynl/lib/ynl.py:690:31: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/lib/ynl.py:706:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:712:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:729:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:729:58: E0602: Undefined variable 'attr_space' (undefined-variable) tools/net/ynl/pyynl/lib/ynl.py:733:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:743: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:743:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:750:94: E0606: Possibly using variable 'search_attrs' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/ynl.py:780:24: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:732:4: R0912: Too many branches (20/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:732:4: R0915: Too many statements (51/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:790:4: R0913: Too many arguments (6/5) (too-many-arguments) tools/net/ynl/pyynl/lib/ynl.py:790:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) tools/net/ynl/pyynl/lib/ynl.py:795: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:795:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:812:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:816:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:850:20: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:840: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:866:20: W0622: Redefining built-in 'len' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:874:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:858:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:905:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:895:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:911:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:933:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:937:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:938:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:950:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:975:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1019:4: R0914: Too many local variables (20/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:1073: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:1019:4: R0912: Too many branches (17/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:1019:4: R0915: Too many statements (53/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:1095:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1098:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1101: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.27/10 ====== 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: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:785:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:800:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:1000:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1004:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1005:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1006:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/ynl.py:1008: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 (1108/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:785:24: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:737:4: R0912: Too many branches (20/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:737:4: R0915: Too many statements (51/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:795:4: R0913: Too many arguments (6/5) (too-many-arguments) tools/net/ynl/pyynl/lib/ynl.py:795:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) tools/net/ynl/pyynl/lib/ynl.py:800: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:800:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:817:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:821:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:855:20: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:845: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:871:20: W0622: Redefining built-in 'len' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:879:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:863:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:910:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:900:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:916:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:938:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:942:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:943:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:955:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:980:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1024:4: R0914: Too many local variables (20/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:1079: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:1024:4: R0912: Too many branches (17/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:1024:4: R0915: Too many statements (54/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:1101:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1104:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1107: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.27/10, +0.02)