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.yLyZKsMewW and /tmp/tmp.YdzxA0BnS1 Tree base: 8e7148b56023 ("atm: idt77252: Use sb_pool_remove()") Now at: c03a20ddb83f ("tools: ynl: pylint suppressions and docstrings") ====== Checking before the patch ====== ************* Module pyynl.cli tools/net/ynl/pyynl/cli.py:1:0: C0114: Missing module docstring (missing-module-docstring) tools/net/ynl/pyynl/cli.py:13:0: C0413: Import "from lib import YnlFamily, Netlink, NlError, SpecFamily" should be placed at the top of the module (wrong-import-position) tools/net/ynl/pyynl/cli.py:13:0: E0611: No name 'YnlFamily' in module 'lib' (no-name-in-module) tools/net/ynl/pyynl/cli.py:13:0: E0611: No name 'Netlink' in module 'lib' (no-name-in-module) tools/net/ynl/pyynl/cli.py:13:0: E0611: No name 'NlError' in module 'lib' (no-name-in-module) tools/net/ynl/pyynl/cli.py:13:0: E0611: No name 'SpecFamily' in module 'lib' (no-name-in-module) tools/net/ynl/pyynl/cli.py:15:0: C0103: Constant name "sys_schema_dir" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/cli.py:16:0: C0103: Constant name "relative_schema_dir" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/cli.py:18:0: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/cli.py:20:4: W0621: Redefining name 'schema_dir' from outer scope (line 18) (redefined-outer-name) tools/net/ynl/pyynl/cli.py:24:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/cli.py:27:0: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/cli.py:28:4: W0621: Redefining name 'spec_dir' from outer scope (line 27) (redefined-outer-name) tools/net/ynl/pyynl/cli.py:30:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/cli.py:34:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/cli.py:35:4: W0237: Parameter 'o' has been renamed to 'obj' in overriding 'YnlEncoder.default' method (arguments-renamed) tools/net/ynl/pyynl/cli.py:97:0: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/cli.py:97:0: R0914: Too many local variables (21/15) (too-many-locals) tools/net/ynl/pyynl/cli.py:175:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/cli.py:180:15: W0718: Catching too general exception Exception (broad-exception-caught) tools/net/ynl/pyynl/cli.py:182:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit) tools/net/ynl/pyynl/cli.py:210:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit) tools/net/ynl/pyynl/cli.py:245:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit) tools/net/ynl/pyynl/cli.py:97:0: R0912: Too many branches (34/12) (too-many-branches) tools/net/ynl/pyynl/cli.py:97:0: R0915: Too many statements (106/50) (too-many-statements) ------------------------------------------------------------------ Your code has been rated at 7.72/10 (previous run: 7.72/10, +0.00) ************* Module pyynl.ethtool tools/net/ynl/pyynl/ethtool.py:147:5: W0511: TODO: --show-tunnels tunnel-info-get (fixme) tools/net/ynl/pyynl/ethtool.py:148:5: W0511: TODO: --show-module module-get (fixme) tools/net/ynl/pyynl/ethtool.py:149:5: W0511: TODO: --get-plca-cfg plca-get (fixme) tools/net/ynl/pyynl/ethtool.py:150:5: W0511: TODO: --get-plca-status plca-get-status (fixme) tools/net/ynl/pyynl/ethtool.py:151:5: W0511: TODO: --show-mm mm-get (fixme) tools/net/ynl/pyynl/ethtool.py:152:5: W0511: TODO: --show-fec fec-get (fixme) tools/net/ynl/pyynl/ethtool.py:153:5: W0511: TODO: --dump-module-eerpom module-eeprom-get (fixme) tools/net/ynl/pyynl/ethtool.py:154:5: W0511: TODO: pse-get (fixme) tools/net/ynl/pyynl/ethtool.py:155:5: W0511: TODO: rss-get (fixme) tools/net/ynl/pyynl/ethtool.py:167:9: W0511: TODO: parse the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:181:9: W0511: TODO: parse the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:304:9: W0511: TODO: pass id? (fixme) tools/net/ynl/pyynl/ethtool.py:313:17: W0511: TODO: support passing the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:442:5: W0511: TODO: wol-get (fixme) tools/net/ynl/pyynl/ethtool.py:1:0: C0114: Missing module docstring (missing-module-docstring) tools/net/ynl/pyynl/ethtool.py:12:0: C0413: Import "from lib import YnlFamily" should be placed at the top of the module (wrong-import-position) tools/net/ynl/pyynl/ethtool.py:12:0: E0611: No name 'YnlFamily' in module 'lib' (no-name-in-module) tools/net/ynl/pyynl/ethtool.py:13:0: E0401: Unable to import 'cli' (import-error) tools/net/ynl/pyynl/ethtool.py:13:0: C0413: Import "from cli import schema_dir, spec_dir" should be placed at the top of the module (wrong-import-position) tools/net/ynl/pyynl/ethtool.py:15:30: W0621: Redefining name 'args' from outer scope (line 159) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:42:0: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) tools/net/ynl/pyynl/ethtool.py:78:14: W0621: Redefining name 'args' from outer scope (line 159) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:91:0: W0102: Dangerous default value {} as argument (dangerous-default-value) tools/net/ynl/pyynl/ethtool.py:91:16: W0621: Redefining name 'args' from outer scope (line 159) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:117:15: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ethtool.py:119:15: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ethtool.py:128:0: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/ethtool.py:128:0: R0914: Too many local variables (40/15) (too-many-locals) tools/net/ynl/pyynl/ethtool.py:158:4: W0601: Global variable 'args' undefined at the module level (global-variable-undefined) tools/net/ynl/pyynl/ethtool.py:340:8: W0106: Expression "[print(f'\t{v}') for v in bits_to_dict(tsinfo['timestamping'])]" is assigned to nothing (expression-not-assigned) tools/net/ynl/pyynl/ethtool.py:346:12: W0106: Expression "[print(f'\t{v}') for v in bits_to_dict(tsinfo['tx-types'])]" is assigned to nothing (expression-not-assigned) tools/net/ynl/pyynl/ethtool.py:352:12: W0106: Expression "[print(f'\t{v}') for v in bits_to_dict(tsinfo['rx-filters'])]" is assigned to nothing (expression-not-assigned) tools/net/ynl/pyynl/ethtool.py:358:12: W0106: Expression "[print(f'\t{k}: {v}') for (k, v) in tsinfo['stats'].items()]" is assigned to nothing (expression-not-assigned) tools/net/ynl/pyynl/ethtool.py:128:0: R0911: Too many return statements (16/6) (too-many-return-statements) tools/net/ynl/pyynl/ethtool.py:128:0: R0912: Too many branches (37/12) (too-many-branches) tools/net/ynl/pyynl/ethtool.py:128:0: R0915: Too many statements (167/50) (too-many-statements) tools/net/ynl/pyynl/ethtool.py:128:0: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) tools/net/ynl/pyynl/ethtool.py:13:0: C0411: third party import "cli.schema_dir" should be placed before first party import "lib.YnlFamily" (wrong-import-order) ----------------------------------- Your code has been rated at 8.22/10 ************* Module pyynl.lib tools/net/ynl/pyynl/lib/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring) ----------------------------------- Your code has been rated at 7.50/10 ************* Module pyynl.lib.nlspec tools/net/ynl/pyynl/lib/nlspec.py:570:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:573:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:574:0: W0311: Bad indentation. Found 8 spaces, expected 12 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:575:0: W0311: Bad indentation. Found 10 spaces, expected 16 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:576:0: W0311: Bad indentation. Found 6 spaces, expected 8 (bad-indentation) tools/net/ynl/pyynl/lib/nlspec.py:1:0: C0114: Missing module docstring (missing-module-docstring) tools/net/ynl/pyynl/lib/nlspec.py:10:0: C0103: Constant name "jsonschema" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/lib/nlspec.py:31:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:48:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:51:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:56:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:72:33: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:87:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:90:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:93:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:94: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:113:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:120:23: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/nlspec.py:121:30: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/nlspec.py:128:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:131:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:136:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:142:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:149:0: R0902: Too many instance attributes (12/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/nlspec.py:170:41: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:185: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:201:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:229:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:241:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:259:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:277:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:284:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:290:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:291:15: E1101: Instance of 'list' has no 'items' member (no-member) tools/net/ynl/pyynl/lib/nlspec.py:304:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:309:12: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/nlspec.py:312:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:312:33: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/nlspec.py:326:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:334:0: R0902: Too many instance attributes (9/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/nlspec.py:353:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:381:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/nlspec.py:401:31: W0621: Redefining name 'yaml' from outer scope (line 6) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:406:0: R0902: Too many instance attributes (16/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/nlspec.py:432:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding) tools/net/ynl/pyynl/lib/nlspec.py:436:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/nlspec.py:454:12: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/nlspec.py:456:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding) tools/net/ynl/pyynl/lib/nlspec.py:494:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:497:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:500:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:503:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:506:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:509:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:512:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/nlspec.py:551:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/nlspec.py:567:22: E0606: Possibly using variable 'op' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/nlspec.py:578:4: R0912: Too many branches (15/12) (too-many-branches) tools/net/ynl/pyynl/lib/nlspec.py:516:8: W0201: Attribute 'fixed_header' defined outside __init__ (attribute-defined-outside-init) tools/net/ynl/pyynl/lib/nlspec.py:528:8: W0201: Attribute 'fixed_header' defined outside __init__ (attribute-defined-outside-init) ----------------------------------- Your code has been rated at 7.95/10 ************* Module pyynl.lib.ynl tools/net/ynl/pyynl/lib/ynl.py:284:0: C0301: Line too long (113/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:778:0: C0301: Line too long (114/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:799:0: C0301: Line too long (107/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:831:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:846:0: C0301: Line too long (101/100) (line-too-long) tools/net/ynl/pyynl/lib/ynl.py:1:0: C0302: Too many lines in module (1168/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:25:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:25:0: R0903: Too few public methods (0/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:102:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:120:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:124:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:146:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:147:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:153:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:154:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:157:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:161:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:159:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:164:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:167:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:170:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:170:25: W0622: Redefining built-in 'type' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:171:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:178:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:199:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:199:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/ynl.py:223:26: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:248:16: W0622: Redefining built-in 'type' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:280:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:292:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:292:0: R0903: Too few public methods (1/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:306: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:333:8: W0603: Using the global statement (global-statement) tools/net/ynl/pyynl/lib/ynl.py:334:33: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:347:22: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:356:39: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:336:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks) tools/net/ynl/pyynl/lib/ynl.py:336:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks) tools/net/ynl/pyynl/lib/ynl.py:322:0: R0912: Too many branches (15/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:371:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:377:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:383:17: E1101: Instance of 'GenlMsg' has no 'raw_attrs' member (no-member) tools/net/ynl/pyynl/lib/ynl.py:388:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:399:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:399:38: W0613: Unused argument 'version' (unused-argument) 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:28: W0212: Access to a protected member _struct_size of a client class (protected-access) tools/net/ynl/pyynl/lib/ynl.py:413:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:415:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:418:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:422:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:426: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:443:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:450:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:458:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:464:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:466:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:450:0: R0903: Too few public methods (1/2) (too-few-public-methods) tools/net/ynl/pyynl/lib/ynl.py:474:0: C0115: Missing class docstring (missing-class-docstring) tools/net/ynl/pyynl/lib/ynl.py:474:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes) tools/net/ynl/pyynl/lib/ynl.py:489: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:489:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:519:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:525:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:538: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:558:4: R0914: Too many local variables (18/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:600:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:562: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:562:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:603:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:629:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:631:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:558:4: R0912: Too many branches (28/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:558:4: R0915: Too many statements (65/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:718:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:732: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:739:31: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) tools/net/ynl/pyynl/lib/ynl.py:755:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:761:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:778:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:782:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:792: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:792:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:799:94: E0606: Possibly using variable 'search_attrs' before assignment (possibly-used-before-assignment) tools/net/ynl/pyynl/lib/ynl.py:831:24: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:781:4: R0912: Too many branches (21/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:781:4: R0915: Too many statements (53/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:841:4: R0913: Too many arguments (6/5) (too-many-arguments) tools/net/ynl/pyynl/lib/ynl.py:841:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) tools/net/ynl/pyynl/lib/ynl.py:846: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:846:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:863:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:867:16: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:901:20: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:891: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:917:20: W0622: Redefining built-in 'len' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:925:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:909:16: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:956:16: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:946:32: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:962:33: C0209: Formatting a regular string which could be an f-string (consider-using-f-string) tools/net/ynl/pyynl/lib/ynl.py:994:20: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:998:12: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/lib/ynl.py:1002:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1003:14: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/lib/ynl.py:1015:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1040:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1084:4: R0914: Too many local variables (20/15) (too-many-locals) tools/net/ynl/pyynl/lib/ynl.py:1139: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:1084:4: R0912: Too many branches (17/12) (too-many-branches) tools/net/ynl/pyynl/lib/ynl.py:1084:4: R0915: Too many statements (54/50) (too-many-statements) tools/net/ynl/pyynl/lib/ynl.py:1161:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1164:4: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/lib/ynl.py:1167:4: C0116: Missing function or method docstring (missing-function-docstring) ------------------------------------------------------------------ Your code has been rated at 8.63/10 (previous run: 8.63/10, +0.00) ====== Checking the tree with the patch ====== ************* Module pyynl.cli tools/net/ynl/pyynl/cli.py:20:0: C0103: Constant name "sys_schema_dir" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/cli.py:21:0: C0103: Constant name "relative_schema_dir" doesn't conform to UPPER_CASE naming style (invalid-name) tools/net/ynl/pyynl/cli.py:29:4: W0621: Redefining name 'schema_dir' from outer scope (line 23) (redefined-outer-name) tools/net/ynl/pyynl/cli.py:33:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/cli.py:41:4: W0621: Redefining name 'spec_dir' from outer scope (line 36) (redefined-outer-name) tools/net/ynl/pyynl/cli.py:43:8: W0719: Raising too general exception: Exception (broad-exception-raised) tools/net/ynl/pyynl/cli.py:49:4: W0237: Parameter 'o' has been renamed to 'obj' in overriding 'YnlEncoder.default' method (arguments-renamed) 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) tools/net/ynl/pyynl/cli.py:199:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit) tools/net/ynl/pyynl/cli.py:227:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit) tools/net/ynl/pyynl/cli.py:262:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit) ------------------------------------------------------------------ Your code has been rated at 9.33/10 (previous run: 7.72/10, +1.61) ************* Module pyynl.ethtool tools/net/ynl/pyynl/ethtool.py:148:5: W0511: TODO: --show-tunnels tunnel-info-get (fixme) tools/net/ynl/pyynl/ethtool.py:149:5: W0511: TODO: --show-module module-get (fixme) tools/net/ynl/pyynl/ethtool.py:150:5: W0511: TODO: --get-plca-cfg plca-get (fixme) tools/net/ynl/pyynl/ethtool.py:151:5: W0511: TODO: --get-plca-status plca-get-status (fixme) tools/net/ynl/pyynl/ethtool.py:152:5: W0511: TODO: --show-mm mm-get (fixme) tools/net/ynl/pyynl/ethtool.py:153:5: W0511: TODO: --show-fec fec-get (fixme) tools/net/ynl/pyynl/ethtool.py:154:5: W0511: TODO: --dump-module-eerpom module-eeprom-get (fixme) tools/net/ynl/pyynl/ethtool.py:155:5: W0511: TODO: pse-get (fixme) tools/net/ynl/pyynl/ethtool.py:156:5: W0511: TODO: rss-get (fixme) tools/net/ynl/pyynl/ethtool.py:168:9: W0511: TODO: parse the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:182:9: W0511: TODO: parse the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:305:9: W0511: TODO: pass id? (fixme) tools/net/ynl/pyynl/ethtool.py:314:17: W0511: TODO: support passing the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:443:5: W0511: TODO: wol-get (fixme) tools/net/ynl/pyynl/ethtool.py:1:0: C0114: Missing module docstring (missing-module-docstring) tools/net/ynl/pyynl/ethtool.py:14:0: E0401: Unable to import 'cli' (import-error) tools/net/ynl/pyynl/ethtool.py:16:30: W0621: Redefining name 'args' from outer scope (line 160) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:43:0: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) tools/net/ynl/pyynl/ethtool.py:79:14: W0621: Redefining name 'args' from outer scope (line 160) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:92:0: W0102: Dangerous default value {} as argument (dangerous-default-value) tools/net/ynl/pyynl/ethtool.py:92:16: W0621: Redefining name 'args' from outer scope (line 160) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:118:15: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ethtool.py:120:15: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) tools/net/ynl/pyynl/ethtool.py:129:0: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/ethtool.py:129:0: R0914: Too many local variables (40/15) (too-many-locals) tools/net/ynl/pyynl/ethtool.py:159:4: W0601: Global variable 'args' undefined at the module level (global-variable-undefined) tools/net/ynl/pyynl/ethtool.py:341:8: W0106: Expression "[print(f'\t{v}') for v in bits_to_dict(tsinfo['timestamping'])]" is assigned to nothing (expression-not-assigned) tools/net/ynl/pyynl/ethtool.py:347:12: W0106: Expression "[print(f'\t{v}') for v in bits_to_dict(tsinfo['tx-types'])]" is assigned to nothing (expression-not-assigned) tools/net/ynl/pyynl/ethtool.py:353:12: W0106: Expression "[print(f'\t{v}') for v in bits_to_dict(tsinfo['rx-filters'])]" is assigned to nothing (expression-not-assigned) tools/net/ynl/pyynl/ethtool.py:359:12: W0106: Expression "[print(f'\t{k}: {v}') for (k, v) in tsinfo['stats'].items()]" is assigned to nothing (expression-not-assigned) tools/net/ynl/pyynl/ethtool.py:129:0: R0911: Too many return statements (16/6) (too-many-return-statements) tools/net/ynl/pyynl/ethtool.py:129:0: R0912: Too many branches (37/12) (too-many-branches) tools/net/ynl/pyynl/ethtool.py:129:0: R0915: Too many statements (167/50) (too-many-statements) tools/net/ynl/pyynl/ethtool.py:129:0: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) tools/net/ynl/pyynl/ethtool.py:14:0: C0411: third party import "cli.schema_dir" should be placed before first party import "lib.YnlFamily" (wrong-import-order) ------------------------------------------------------------------ Your code has been rated at 8.49/10 (previous run: 8.22/10, +0.27) ------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 7.50/10, +2.50) ************* 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:38:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:79:33: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-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:120:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) 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:177:41: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) 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:208:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:266:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:284:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) 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:311:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:316:12: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/nlspec.py:319:33: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/nlspec.py:333:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:360:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) 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:408:31: W0621: Redefining name 'yaml' from outer scope (line 13) (redefined-outer-name) tools/net/ynl/pyynl/lib/nlspec.py:439:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding) 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:463:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding) 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 8.76/10 (previous run: 7.95/10, +0.82) ************* 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:158:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:165:8: W0622: Redefining built-in 'format' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:172:8: W0622: Redefining built-in 'format' (redefined-builtin) 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:181:25: W0622: Redefining built-in 'type' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:182:8: W0622: Redefining built-in 'format' (redefined-builtin) 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:259:16: W0622: Redefining built-in 'type' (redefined-builtin) 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:615:16: W0622: Redefining built-in 'format' (redefined-builtin) 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:918:20: W0622: Redefining built-in 'format' (redefined-builtin) 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:934:20: W0622: Redefining built-in 'len' (redefined-builtin) tools/net/ynl/pyynl/lib/ynl.py:942:16: W0622: Redefining built-in 'format' (redefined-builtin) 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:973:16: W0622: Redefining built-in 'format' (redefined-builtin) 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.22/10 (previous run: 8.63/10, +0.59)