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.Op62ISjMgD and /tmp/tmp.9XwfyEOrkT Tree base: a3026a108e5b ("tools: ynl: fix undefined variable name") Now at: 4f96458064ca ("tools: ynl: avoid bare except") ====== Checking before the patch ====== ************* Module pyynl.ethtool tools/net/ynl/pyynl/ethtool.py:145:5: W0511: TODO: --show-tunnels tunnel-info-get (fixme) tools/net/ynl/pyynl/ethtool.py:146:5: W0511: TODO: --show-module module-get (fixme) tools/net/ynl/pyynl/ethtool.py:147:5: W0511: TODO: --get-plca-cfg plca-get (fixme) tools/net/ynl/pyynl/ethtool.py:148:5: W0511: TODO: --get-plca-status plca-get-status (fixme) tools/net/ynl/pyynl/ethtool.py:149:5: W0511: TODO: --show-mm mm-get (fixme) tools/net/ynl/pyynl/ethtool.py:150:5: W0511: TODO: --show-fec fec-get (fixme) tools/net/ynl/pyynl/ethtool.py:151:5: W0511: TODO: --dump-module-eerpom module-eeprom-get (fixme) tools/net/ynl/pyynl/ethtool.py:152:5: W0511: TODO: pse-get (fixme) tools/net/ynl/pyynl/ethtool.py:153:5: W0511: TODO: rss-get (fixme) tools/net/ynl/pyynl/ethtool.py:166:9: W0511: TODO: parse the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:180:9: W0511: TODO: parse the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:303:9: W0511: TODO: pass id? (fixme) tools/net/ynl/pyynl/ethtool.py:312:17: W0511: TODO: support passing the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:441: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:13: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:13:0: E0611: No name 'YnlFamily' in module 'lib' (no-name-in-module) tools/net/ynl/pyynl/ethtool.py:14:0: E0401: Unable to import 'cli' (import-error) tools/net/ynl/pyynl/ethtool.py:14: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:16:30: W0621: Redefining name 'args' from outer scope (line 157) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:54:8: W0702: No exception type(s) specified (bare-except) 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:76:14: W0621: Redefining name 'args' from outer scope (line 157) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:89:0: W0102: Dangerous default value {} as argument (dangerous-default-value) tools/net/ynl/pyynl/ethtool.py:89:16: W0621: Redefining name 'args' from outer scope (line 157) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:115:15: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) 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:126:0: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/ethtool.py:126:0: R0914: Too many local variables (41/15) (too-many-locals) tools/net/ynl/pyynl/ethtool.py:156:4: W0601: Global variable 'args' undefined at the module level (global-variable-undefined) tools/net/ynl/pyynl/ethtool.py:258:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:265:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:279:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:286:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:301:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:339: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:345: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:351: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:357: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:126:0: R0911: Too many return statements (16/6) (too-many-return-statements) tools/net/ynl/pyynl/ethtool.py:126:0: R0912: Too many branches (37/12) (too-many-branches) tools/net/ynl/pyynl/ethtool.py:126:0: R0915: Too many statements (168/50) (too-many-statements) tools/net/ynl/pyynl/ethtool.py:126: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:159:4: W0612: Unused variable 'script_abs_dir' (unused-variable) 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) tools/net/ynl/pyynl/ethtool.py:5:0: W0611: Unused import json (unused-import) ----------------------------------- Your code has been rated at 7.92/10 ====== Checking the tree with the patch ====== ************* Module pyynl.ethtool tools/net/ynl/pyynl/ethtool.py:145:5: W0511: TODO: --show-tunnels tunnel-info-get (fixme) tools/net/ynl/pyynl/ethtool.py:146:5: W0511: TODO: --show-module module-get (fixme) tools/net/ynl/pyynl/ethtool.py:147:5: W0511: TODO: --get-plca-cfg plca-get (fixme) tools/net/ynl/pyynl/ethtool.py:148:5: W0511: TODO: --get-plca-status plca-get-status (fixme) tools/net/ynl/pyynl/ethtool.py:149:5: W0511: TODO: --show-mm mm-get (fixme) tools/net/ynl/pyynl/ethtool.py:150:5: W0511: TODO: --show-fec fec-get (fixme) tools/net/ynl/pyynl/ethtool.py:151:5: W0511: TODO: --dump-module-eerpom module-eeprom-get (fixme) tools/net/ynl/pyynl/ethtool.py:152:5: W0511: TODO: pse-get (fixme) tools/net/ynl/pyynl/ethtool.py:153:5: W0511: TODO: rss-get (fixme) tools/net/ynl/pyynl/ethtool.py:166:9: W0511: TODO: parse the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:180:9: W0511: TODO: parse the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:303:9: W0511: TODO: pass id? (fixme) tools/net/ynl/pyynl/ethtool.py:312:17: W0511: TODO: support passing the bitmask (fixme) tools/net/ynl/pyynl/ethtool.py:441: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:13: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:13:0: E0611: No name 'YnlFamily' in module 'lib' (no-name-in-module) tools/net/ynl/pyynl/ethtool.py:14:0: E0401: Unable to import 'cli' (import-error) tools/net/ynl/pyynl/ethtool.py:14: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:16:30: W0621: Redefining name 'args' from outer scope (line 157) (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:76:14: W0621: Redefining name 'args' from outer scope (line 157) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:89:0: W0102: Dangerous default value {} as argument (dangerous-default-value) tools/net/ynl/pyynl/ethtool.py:89:16: W0621: Redefining name 'args' from outer scope (line 157) (redefined-outer-name) tools/net/ynl/pyynl/ethtool.py:115:15: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) 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:126:0: C0116: Missing function or method docstring (missing-function-docstring) tools/net/ynl/pyynl/ethtool.py:126:0: R0914: Too many local variables (41/15) (too-many-locals) tools/net/ynl/pyynl/ethtool.py:156:4: W0601: Global variable 'args' undefined at the module level (global-variable-undefined) tools/net/ynl/pyynl/ethtool.py:258:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:265:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:279:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:286:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:301:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) tools/net/ynl/pyynl/ethtool.py:339: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:345: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:351: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:357: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:126:0: R0911: Too many return statements (16/6) (too-many-return-statements) tools/net/ynl/pyynl/ethtool.py:126:0: R0912: Too many branches (37/12) (too-many-branches) tools/net/ynl/pyynl/ethtool.py:126:0: R0915: Too many statements (168/50) (too-many-statements) tools/net/ynl/pyynl/ethtool.py:126: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:159:4: W0612: Unused variable 'script_abs_dir' (unused-variable) 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) tools/net/ynl/pyynl/ethtool.py:5:0: W0611: Unused import json (unused-import) ------------------------------------------------------------------ Your code has been rated at 7.95/10 (previous run: 7.92/10, +0.04)