pylint
pylint copied to clipboard
Issue 9519 super init with non self arg
Work-in-progress for issue #9519, to see if I can crack it.
This is going to contain many junk commits that I'll rebase and get rid of later, just doing this so that people can see it and maybe comment.
The first commit adds a failing test case, then there is some debug crap just so I can understand the code as I go.
Closes #9519
the test file lines 11-13
class Win(Window):
def __init__(self, txt):
super().__init__(txt) # the bad line
Running pytest -k test_super_init_with_non_self_argument -vv, line 13 stops debugging at point i
-------------------------
visit call, node: Call(func=<Attribute.__init__ l.13 at 0x105fd42d0>,
args=[<Name.txt l.13 at 0x106131fd0>],
keywords=[])
a
b
c
d
f
g
i
which is this:
_dp("f")
if called.args.args is None:
_dp("g")
if called.name == "isinstance":
# Verify whether second argument of isinstance is a valid type
_dp("h")
self._check_isinstance_args(node, callable_name)
# Built-in functions have no argument information.
_dp("i")
return
_dp("j")
so the function actually exits earlier than what was suggested in the original issue.
Current debug cruft:
visit call, node: Call(func=<Attribute.__init__ l.13 at 0x108038190>,
args=[<Name.txt l.13 at 0x1078c26d0>],
keywords=[])
Data dump for __init__ call
node frame: FunctionDef.__init__(name='__init__',
position=Position(lineno=12, col_offset=4, end_lineno=12, end_col_offset=16),
decorators=None,
args=<Arguments l.12 at 0x107f7d9d0>,
returns=None,
type_params=[],
doc_node=None,
body=[<Expr l.13 at 0x107fbce60>])
isinst: False
funcdef: False
called: <BoundMethod __init__ of builtins.object at 0x4429550992
frame body: [<Expr l.13 at 0x107fbce60>]
called in frame body: False
npa: 1
dec names: set()
called.args.args is None
called.name: __init__
Returning now
Just prior to turning off the debug cruft, here is the output:
- visit call, node: Call(func=<Attribute.__init__ l.13 at 0x104b14190>,
- args=[<Name.txt l.13 at 0x10439e6d0>],
- keywords=[])
- Data dump for __init__ call
- call_site: <astroid.arguments.CallSite object at 0x104acc8a0>
- call site positional args:: [<Name.txt l.13 at 0x10439e6d0>]
- call site keyword args:: {}
- call site invalid args: False
- call site inv keywords: False
- node args: [<Name.txt l.13 at 0x10439e6d0>]
- node frame: FunctionDef.__init__(name='__init__',
- position=Position(lineno=12, col_offset=4, end_lineno=12, end_col_offset=16),
- decorators=None,
- args=<Arguments l.12 at 0x104a599d0>,
- returns=None,
- type_params=[],
- doc_node=None,
- body=[<Expr l.13 at 0x104a98e60>])
- isinst: False
- funcdef: False
- called: <BoundMethod __init__ of builtins.object at 0x4373829008
- called.args: Arguments(vararg=None,
- kwarg=None,
- args=None,
- defaults=None,
- kwonlyargs=[],
- posonlyargs=[],
- posonlyargs_annotations=[],
- kw_defaults=None,
- annotations=[],
- varargannotation=None,
- kwargannotation=None,
- kwonlyargs_annotations=[],
- type_comment_args=[],
- type_comment_kwonlyargs=[],
- type_comment_posonlyargs=[])
- frame body: [<Expr l.13 at 0x104a98e60>]
- called in frame body: False
- npa: 1
- dec names: set()
************* Module super_init_with_non_self_argument
+ tests/regrtest_data/super_init_with_non_self_argument.py:11:0: blah
- tests/regrtest_data/super_init_with_non_self_argument.py:13:8: E1121: Too many positional arguments for __init__ call (too-many-function-args)
- called.args.args is None
- called.name: __init__
- Returning now
-
There's a bunch of cruft in the commits and the code, but the idea is there, so I'm going to mark this as ready for review.
I'm sure the actual ast checking for the __init__ call can be done better but I'm not sure how to do it; I came to the current state after putting in all of the debug cruft during my hacking with the test. It's a start, anyway.
As you can probably tell from my hacking, I'm very new at ast hacking, so there may be a far better way to do it than what I have. At least the test case should be good as a starting point.
There are some test failures, but I'll wait for feedback/notes before I try to address them, as there will likely be changes needed.
🤖 Effect of this PR on checked open source code: 🤖
Effect on home-assistant: The following messages are now emitted:
- locally-disabled: Locally disabling broad-exception-caught (W0718) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L717
- empty-comment: Line with empty comment https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L723
- empty-comment: Line with empty comment https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L727
- empty-comment: Line with empty comment https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L730
- line-too-long: Line too long (108/100) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2426
- too-many-lines: Too many lines in module (3332/1000) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1
- too-complex: '__async_setup_with_context' is too complex. The McCabe rating is 23 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L552
- too-complex: 'async_unload' is too complex. The McCabe rating is 17 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L796
- too-complex: 'async_migrate' is too complex. The McCabe rating is 11 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L942
- too-complex: 'async_finish_flow' is too complex. The McCabe rating is 15 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1366
- too-complex: 'async_update_issues' is too complex. The McCabe rating is 11 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2447
- too-few-public-methods: Too few public methods (0/2) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L295
- too-many-arguments: Too many arguments (17/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L350
- too-many-locals: Too many local variables (18/15) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L350
- too-many-locals: Too many local variables (17/15) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L552
- too-many-try-statements: try clause contains 5 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L633
- too-many-branches: Too many branches (22/12) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L552
- too-many-statements: Too many statements (84/50) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L552
- consider-using-assignment-expr: Use 'if not (supports_unload := hasattr(component, 'async_unload_entry')):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L841
- broad-exception-caught: Catching too general exception Exception https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L861
- too-many-try-statements: try clause contains 7 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L848
- too-many-return-statements: Too many return statements (8/6) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L796
- too-many-branches: Too many branches (14/12) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L796
- broad-exception-caught: Catching too general exception Exception https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L904
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L914
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L914
- while-used:
Used
whileloop https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L955 - consider-using-assignment-expr: Use 'if not (supports_migrate := hasattr(component, 'async_migrate_entry')):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L966
- broad-exception-caught: Catching too general exception Exception https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L985
- too-many-try-statements: try clause contains 6 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L976
- protected-access: Access to a protected member _async_schedule_save of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L984
- too-many-return-statements: Too many return statements (7/6) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L942
- while-used:
Used
whileloop https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1032 - consider-using-any-or-all:
forloop could beany(flow.flow_id != flow_id and flow.context['source'] in DISCOVERY_SOURCES for flow in self._progress.values())https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1245 - magic-value-comparison: Consider using a named constant or an enum instead of ''source''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1258
- magic-value-comparison: Consider using a named constant or an enum instead of ''entry_id''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1265
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1303
- consider-using-assignment-expr: Use 'if not (flow := await self.async_create_flow(handler, context=context, data=data)):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1335
- protected-access: Access to a protected member _async_remove of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1508
- protected-access: Access to a protected member _async_clean_up of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1514
- too-many-branches: Too many branches (14/12) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1366
- magic-value-comparison: Consider using a named constant or an enum instead of ''source''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1533
- consider-using-any-or-all:
forloop could beany(match_items <= progress.context.items() and progress.init_data == data for progress in flows)https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1592 - consider-using-any-or-all:
forloop could beany(other_flow is not flow and flow.is_matching(other_flow) for other_flow in set(flows))https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1602 - consider-using-assignment-expr: Use 'if not (entries := self._domain_unique_id_index.get(domain, {}).get(unique_id)):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1731
- magic-value-comparison: Consider using a named constant or an enum instead of '2'. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1757
- magic-value-comparison: Consider using a named constant or an enum instead of ''system_options''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1763
- magic-value-comparison: Consider using a named constant or an enum instead of '3'. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1779
- magic-value-comparison: Consider using a named constant or an enum instead of '4'. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1785
- consider-using-any-or-all:
forloop could beany((include_ignore or entry.source != SOURCE_IGNORE) and (include_disabled or not entry.disabled_by) for entry in entries)https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1853 - consider-ternary-expression: Consider rewriting as a ternary expression https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1932
- magic-value-comparison: Consider using a named constant or an enum instead of ''flow_id''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1962
- unused-argument: Unused argument 'event' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1970
- too-many-arguments: Too many arguments (11/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2147
- too-many-locals: Too many local variables (17/15) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2147
- magic-value-comparison: Consider using a named constant or an enum instead of ''flipr''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2184
- protected-access: Access to a protected member _domain_unique_id_index of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2461
- magic-value-comparison: Consider using a named constant or an enum instead of ''flipr''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2466
- redefined-loop-name: Redefining 'entries' from loop (line 2468) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2471
- magic-value-comparison: Consider using a named constant or an enum instead of '2'. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2480
- too-many-public-methods: Too many public methods (23/20) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L1795
- unused-argument: Unused argument 'config_entry' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2578
- unused-argument: Unused argument 'user_input' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2761
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2801
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2830
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2836
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2842
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2848
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2854
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2860
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2866
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2871
- unused-argument: Unused argument 'discovery_info' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2876
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2882
- too-many-arguments: Too many arguments (9/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2914
- missing-param-doc: "entry" missing in parameter documentation https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2914
- too-many-arguments: Too many arguments (7/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2961
- magic-value-comparison: Consider using a named constant or an enum instead of ''entry_id''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2975
- too-many-public-methods: Too many public methods (21/20) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L2553
- too-few-public-methods: Too few public methods (1/2) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L3178
- magic-value-comparison: Consider using a named constant or an enum instead of ''update''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L3268
- magic-value-comparison: Consider using a named constant or an enum instead of ''disabled_by''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L3269
- suppressed-message: Suppressed 'broad-exception-caught' (from line 717) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/config_entries.py#L717
- too-many-instance-attributes: Too many instance attributes (8/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/auth/providers/init.py#L195
- consider-using-assignment-expr: Use 'if (auth_module := self._auth_manager.get_auth_mfa_module(self._auth_module_id)) is None:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/auth/providers/init.py#L259
- consider-using-assignment-expr: Use 'if not (result := await auth_module.async_validate(self.user.id, user_input)):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/auth/providers/init.py#L279
- unused-argument: Unused argument 'value' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/util/event_type.pyi#L21
- too-many-function-args: Too many positional arguments for init call https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/util/yaml/loader.py#L142
- too-many-function-args: Too many positional arguments for init call https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/util/yaml/loader.py#L151
- consider-using-assignment-expr: Use 'if (entity_comp := hass.data.get(DATA_INSTANCES, {}).get(domain)) is None:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L48
- too-many-instance-attributes: Too many instance attributes (9/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L63
- consider-using-assignment-expr: Use 'if (key := config_entry.entry_id) in self._platforms:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L181
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L219
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L219
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L256
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L256
- consider-using-assignment-expr: Use 'if (key := (platform_type, scan_interval, entity_namespace)) not in self._platforms:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L302
- unused-argument: Unused argument 'event' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_component.py#L392
- locally-disabled: Locally disabling import-outside-toplevel (C0415) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1539
- too-many-lines: Too many lines in module (1695/1000) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1
- too-complex: 'async_device_modified' is too complex. The McCabe rating is 12 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L970
- too-complex: '_async_update_entity' is too complex. The McCabe rating is 12 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1037
- too-many-arguments: Too many arguments (10/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L646
- while-used:
Used
whileloop https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L804 - too-many-arguments: Too many arguments (20/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L814
- too-many-locals: Too many local variables (28/15) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L814
- consider-using-assignment-expr: Use 'if (entity_id := self.async_get_entity_id(domain, platform, unique_id)):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L852
- magic-value-comparison: Consider using a named constant or an enum instead of ''remove''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L981
- magic-value-comparison: Consider using a named constant or an enum instead of ''update''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L989
- consider-using-assignment-expr: Use 'if not (device := device_registry.async_get(event.data['device_id'])):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L998
- too-many-arguments: Too many arguments (26/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1037
- too-many-locals: Too many local variables (34/15) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1037
- too-many-arguments: Too many arguments (24/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1166
- too-many-locals: Too many local variables (24/15) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1166
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1221
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1282
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1344
- magic-value-comparison: Consider using a named constant or an enum instead of ''remove''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1547
- unused-argument: Unused argument 'event' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1585
- magic-value-comparison: Consider using a named constant or an enum instead of ''remove''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1599
- suppressed-message: Suppressed 'import-outside-toplevel' (from line 1539) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/entity_registry.py#L1539
- too-many-lines: Too many lines in module (1169/1000) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1
- unused-argument: Unused argument 'variables' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L901
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L975
- unused-argument: Unused argument 'variables' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L967
- magic-value-comparison: Consider using a named constant or an enum instead of ''trigger''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1012
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1008
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1002
- consider-using-assignment-expr: Use 'if (condition := config[CONF_CONDITION]) in ('and', 'not', 'or'):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1048
- use-set-for-membership: Consider using set for membership test https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1048
- redefined-loop-name: Redefining 'sub_cond' from loop (line 1050) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1051
- use-set-for-membership: Consider using set for membership test https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1059
- too-many-try-statements: try clause contains 3 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1094
- while-used:
Used
whileloop https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1124 - consider-using-assignment-expr: Use 'if (condition := config[CONF_CONDITION]) in ('and', 'not', 'or'):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1131
- use-set-for-membership: Consider using set for membership test https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1131
- while-used:
Used
whileloop https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1152 - use-set-for-membership: Consider using set for membership test https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1159
- magic-value-comparison: Consider using a named constant or an enum instead of ''device''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/condition.py#L1163
- while-used:
Used
whileloop https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L104 - consider-using-assignment-expr: Use 'if (item_id := item[CONF_ID]) in old_ids:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L209
- no-self-use: Method could be a function https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L388
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L523
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L523
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L541
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L541
- magic-value-comparison: Consider using a named constant or an enum instead of ''/''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L559
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L632
- too-many-try-statements: try clause contains 5 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L641
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L638
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L658
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L715
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L707
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/collection.py#L734
- locally-disabled: Locally disabling broad-exception-caught (W0718) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L328
- locally-disabled: Locally disabling possibly-used-before-assignment (E0606) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L456
- too-complex: '_async_refresh' is too complex. The McCabe rating is 31 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L351
- too-few-public-methods: Too few public methods (1/2) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L45
- too-many-instance-attributes: Too many instance attributes (20/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L55
- too-many-arguments: Too many arguments (10/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L63
- overlapping-except: Overlapping exceptions (requests.exceptions.RequestException is an ancestor class of requests.exceptions.Timeout) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L313
- broad-exception-caught: Catching too general exception Exception https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L441
- magic-value-comparison: Consider using a named constant or an enum instead of ''timed out''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L393
- too-many-branches: Too many branches (34/12) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L351
- too-many-statements: Too many statements (84/50) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L351
- redefined-variable-type: Redefinition of self.last_exception type from requests.exceptions.RequestException to urllib.error.URLError https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L390
- invalid-overridden-method: Method 'available' was expected to be 'method', found it instead as 'property' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L581
- useless-suppression: Useless suppression of 'possibly-used-before-assignment' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L456
- suppressed-message: Suppressed 'broad-exception-caught' (from line 328) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/update_coordinator.py#L328
- too-many-lines: Too many lines in module (2111/1000) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1
- too-complex: '_async_repeat_step' is too complex. The McCabe rating is 37 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L865
- too-complex: '_find_referenced_target' is too complex. The McCabe rating is 12 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1552
- too-complex: '_find_referenced_devices' is too complex. The McCabe rating is 16 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1601
- too-complex: '_find_referenced_entities' is too complex. The McCabe rating is 16 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1651
- too-complex: 'async_run' is too complex. The McCabe rating is 20 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1702
- magic-value-comparison: Consider using a named constant or an enum instead of ''trigger''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L759
- use-set-for-membership: Consider using set for membership test https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L760
- too-many-try-statements: try clause contains 4 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L823
- consider-using-assignment-expr: Use 'if (trace_element := trace_stack_top(trace_stack_cv)):' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L825
- too-many-try-statements: try clause contains 5 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L850
- protected-access: Access to a protected member _get_repeat_script of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L882
- too-many-try-statements: try clause contains 4 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L945
- too-many-try-statements: try clause contains 4 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L993
- use-set-for-membership: Consider using set for membership test https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L996
- too-many-branches: Too many branches (29/12) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L865
- too-many-statements: Too many statements (88/50) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L865
- protected-access: Access to a protected member _async_get_choose_data of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1038
- too-many-try-statements: try clause contains 5 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1043
- protected-access: Access to a protected member _async_get_if_data of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1059
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1062
- use-implicit-booleaness-not-comparison-to-zero: "timeout == 0" can be simplified to "not timeout", if it is strictly an int, as 0 is falsey https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1141
- unused-argument: Unused argument 'context' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1153
- too-many-try-statements: try clause contains 3 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1194
- consider-using-assignment-expr: Use 'if (resp := self._action[CONF_SET_CONVERSATION_RESPONSE]) is None:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1215
- protected-access: Access to a protected member _async_get_sequence_script of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1248
- protected-access: Access to a protected member _async_get_parallel_scripts of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1254
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1290
- protected-access: Access to a protected member _queue_lck of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1292
- protected-access: Access to a protected member _queue_lck of a client class https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1304
- unused-argument: Unused argument 'point_in_time' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1318
- unused-argument: Unused argument 'event' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1336
- too-many-instance-attributes: Too many instance attributes (28/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1397
- too-many-arguments: Too many arguments (15/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1400
- too-many-locals: Too many local variables (16/15) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1400
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1579
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1584
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1629
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1636
- too-many-branches: Too many branches (15/12) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1601
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1680
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1687
- too-many-branches: Too many branches (15/12) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1651
- magic-value-comparison: Consider using a named constant or an enum instead of ''SILENT''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1723
- magic-value-comparison: Consider using a named constant or an enum instead of ''SILENT''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1728
- consider-ternary-expression: Consider rewriting as a ternary expression https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1785
- too-many-branches: Too many branches (20/12) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1702
- too-many-statements: Too many statements (55/50) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1702
- redefined-loop-name: Redefining 'parallel_script' from loop (line 1974) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/script.py#L1976
- unused-argument: Unused argument 'async_' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/singleton.py#L35
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/singleton.py#L94
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/singleton.py#L98
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/singleton.py#L106
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/singleton.py#L113
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/singleton.py#L117
- superfluous-parens: Unnecessary parens after ':=' keyword https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1517
- too-many-lines: Too many lines in module (2007/1000) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1
- too-complex: '_refresh' is too complex. The McCabe rating is 11 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1219
- too-many-instance-attributes: Too many instance attributes (9/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L974
- unused-argument: Unused argument 'now' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1102
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1336
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1336
- unused-argument: Unused argument 'now' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1417
- consider-ternary-expression: Consider rewriting as a ternary expression https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1436
- too-many-instance-attributes: Too many instance attributes (8/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1615
- too-many-instance-attributes: Too many instance attributes (8/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1791
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1848
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1848
- magic-value-comparison: Consider using a named constant or an enum instead of ''''.* https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1862
- consider-using-any-or-all:
forloop could beany(render_info.all_states or render_info.all_states_lifecycle for render_info in render_infos)https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/event.py#L1948 - locally-disabled: Locally disabling too-many-nested-blocks (R1702) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2192
- too-many-lines: Too many lines in module (3232/1000) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1
- too-complex: 'merge_response' is too complex. The McCabe rating is 12 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2170
- consider-using-assignment-expr: Use 'if (attr := state_obj.attributes.get(name, _SENTINEL)) is _SENTINEL:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1885
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1907
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1915
- too-many-try-statements: try clause contains 4 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1934
- magic-value-comparison: Consider using a named constant or an enum instead of ''ceil''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1937
- magic-value-comparison: Consider using a named constant or an enum instead of ''floor''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1939
- magic-value-comparison: Consider using a named constant or an enum instead of ''half''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1941
- use-implicit-booleaness-not-comparison-to-zero: "precision == 0" can be simplified to "not precision", if it is strictly an int, as 0 is falsey https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1946
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L1984
- too-many-try-statements: try clause contains 5 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2059
- magic-value-comparison: Consider using a named constant or an enum instead of '2'. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2061
- magic-value-comparison: Consider using a named constant or an enum instead of '3'. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2065
- too-many-try-statements: try clause contains 4 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2093
- unidiomatic-typecheck: Use isinstance() rather than type() for a typecheck. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2142
- unidiomatic-typecheck: Use isinstance() rather than type() for a typecheck. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2145
- too-many-try-statements: try clause contains 2 statements, expected at most 1 https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2147
- use-implicit-booleaness-not-comparison-to-zero: "len(args) == 0" can be simplified to "not len(args)", if it is strictly an int, as 0 is falsey https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2253
- use-implicit-booleaness-not-comparison-to-zero: "len(args) == 0" can be simplified to "not len(args)", if it is strictly an int, as 0 is falsey https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2274
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2283
- use-implicit-booleaness-not-comparison-to-zero: "len(args) == 0" can be simplified to "not len(args)", if it is strictly an int, as 0 is falsey https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2303
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2312
- confusing-consecutive-elif: Consecutive elif with differing indentation level, consider creating a function to separate the inner elif https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2343
- consider-using-assignment-expr: Use 'if (result := jinja2.filters.do_int(value, default=default, base=base)) is _SENTINEL:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2379
- consider-using-assignment-expr: Use 'if (result := jinja2.filters.do_int(value, default=default, base=base)) is _SENTINEL:' instead https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2387
- unused-argument: Unused argument 'context' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2597
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2606
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2623
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2650
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2672
- no-self-use: Method could be a function https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2727
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2827
- invalid-name: Variable name "_P" doesn't conform to snake_case naming style https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2981
- too-many-statements: Too many statements (185/50) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2862
- magic-value-comparison: Consider using a named constant or an enum instead of ''_''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L3174
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L3182
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L3182
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L3192
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L3192
- too-many-arguments: Too many arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L3201
- too-many-positional-arguments: Too many positional arguments (6/5) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L3201
- suppressed-message: Suppressed 'too-many-nested-blocks' (from line 2192) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/helpers/template.py#L2192
- line-too-long: Line too long (101/100) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/init.py#L229
- too-many-locals: Too many local variables (31/15) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/init.py#L64
- magic-value-comparison: Consider using a named constant or an enum instead of ''energy_site_id''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/init.py#L147
- magic-value-comparison: Consider using a named constant or an enum instead of ''wall_connectors''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/init.py#L152
- too-many-statements: Too many statements (60/50) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/init.py#L64
- magic-value-comparison: Consider using a named constant or an enum instead of '2'. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/init.py#L251
- magic-value-comparison: Consider using a named constant or an enum instead of ''vehicle_data''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/init.py#L274
- magic-value-comparison: Consider using a named constant or an enum instead of ''state''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/init.py#L277
- too-many-ancestors: Too many ancestors (8/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/switch.py#L173
- import-error: Unable to import 'propcache' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L6
- import-error: Unable to import 'tesla_fleet_api' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L7
- import-error: Unable to import 'tesla_fleet_api.const' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L8
- import-error: Unable to import 'teslemetry_stream' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L9
- too-many-function-args: Too many positional arguments for init call https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L64
- invalid-overridden-method: Method 'available' was expected to be 'method', found it instead as 'property' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L70
- abstract-method: Method '_async_update_attrs' is abstract in class 'TeslemetryEntity' but is not overridden in child class 'TeslemetryVehicleEntity' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L104
- abstract-method: Method '_async_update_attrs' is abstract in class 'TeslemetryEntity' but is not overridden in child class 'TeslemetryEnergyLiveEntity' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L134
- abstract-method: Method '_async_update_attrs' is abstract in class 'TeslemetryEntity' but is not overridden in child class 'TeslemetryEnergyInfoEntity' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L155
- abstract-method: Method '_async_update_attrs' is abstract in class 'TeslemetryEntity' but is not overridden in child class 'TeslemetryEnergyHistoryEntity' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L174
- abstract-method: Method '_async_update_attrs' is abstract in class 'TeslemetryEntity' but is not overridden in child class 'TeslemetryWallConnectorEntity' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L193
- too-many-instance-attributes: Too many instance attributes (9/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/entity.py#L249
- import-error: Unable to import 'teslemetry_stream' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/models.py#L11
- too-many-instance-attributes: Too many instance attributes (9/7) https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/models.py#L34
- import-error: Unable to import 'tesla_fleet_api.const' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L8
- import-error: Unable to import 'teslemetry_stream' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L9
- import-error: Unable to import 'teslemetry_stream.const' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L10
- magic-value-comparison: Consider using a named constant or an enum instead of ''2024.26''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L47
- magic-value-comparison: Consider using a named constant or an enum instead of ''2024.44.25''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L53
- magic-value-comparison: Consider using a named constant or an enum instead of ''2024.26''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L61
- magic-value-comparison: Consider using a named constant or an enum instead of ''2024.26''. https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L69
- unused-argument: Unused argument 'hass' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L37
- abstract-method: Method 'close_cover' is abstract in class 'CoverEntity' but is not overridden in child class 'CoverRestoreEntity' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L84
- abstract-method: Method 'open_cover' is abstract in class 'CoverEntity' but is not overridden in child class 'CoverRestoreEntity' https://github.com/home-assistant/core/blob/abc256fb3e1163859e77be5d478912b0205ea21b/homeassistant/components/teslemetry/cover.py#L84
- magic-value-comparison: *Consider using a named constant...
This comment was truncated because GitHub allows only 65536 characters in a comment.
This comment was generated for commit 94a32c25a746d7997ac19d52fad88f807728e4bc
Hey, thanks for tackling this one!
What do you think about something like this?
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index edef5188b..afed2d3fe 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -1453,8 +1453,19 @@ accessed. Python regular expressions are accepted.",
"""Check that called functions/methods are inferred to callable objects,
and that passed arguments match the parameters in the inferred function.
"""
- called = safe_infer(node.func, compare_constructors=True)
+ is_super = False
+ if (
+ isinstance(node.func, nodes.Attribute)
+ and node.func.attrname == "__init__"
+ and isinstance(node.func.expr, nodes.Call)
+ and isinstance(node.func.expr.func, nodes.Name)
+ and node.func.expr.func.name == "super"
+ ):
+ inferred = safe_infer(node.func.expr)
+ if isinstance(inferred, astroid.objects.Super):
+ is_super = True
+ called = safe_infer(node.func, compare_constructors=True)
self._check_not_callable(node, called)
try:
@@ -1468,7 +1479,21 @@ accessed. Python regular expressions are accepted.",
if called.name == "isinstance":
# Verify whether second argument of isinstance is a valid type
self._check_isinstance_args(node, callable_name)
- # Built-in functions have no argument information.
+ # Built-in functions have no argument information, but we know
+ # super() only takes self.
+ if is_super and utils.is_builtin_object(called):
+ if (
+ (call_site := astroid.arguments.CallSite.from_call(node))
+ and call_site.positional_arguments
+ and (first_arg := call_site.positional_arguments[0])
+ and not (isinstance(first_arg, nodes.Name) and first_arg.name == "self")
+ ):
+ self.add_message(
+ "too-many-function-args",
+ node=node,
+ args=(callable_name,),
+ )
+
return
if len(called.argnames()) != len(set(called.argnames())):
Hi @jacobtylerwalls - thanks very much. I confess that this is out of my range of experience and so I can't say that your suggestion is the right way to handle it! It looks right to the uninformed (aka me), but I'm flying blind.
If you'd like, I can make the change you suggested in the branch, remove the cruft code comments, and push (without squashing).
Hey @jzohrab that would be great. Once you get a clean test run (I think I remember seeing there were a couple functional tests that needed updating?) the CI will run a "primer" job showing results of making this change on lint runs on several python packages. That might help us see if my suggestions is missing any edge cases. All part of the fun!
(I'm not saying my sketch is perfect, but I was trying to rely less on asserting on the str()ingified value of a node and things like that.)
Rebased off of upstream/main, added the changes suggested by @jacobtylerwalls, moved the is_super check to a separate function for readability. Will see where that leaves us at the end of the run. I don't think there will be any new test failures introduced with this change, but I'm not sure. It's possible that there are some existing test failures (which should be deactivated/indicated in a separate PR, maybe).
There are failures:
=================================== FAILURES ===================================
____________________ test_functional[metaclass_attr_access] ____________________
self = <pylint.testutils.lint_module_test.LintModuleTest object at 0x7f0445c2cd00>
def runTest(self) -> None:
> self._runTest()
E AssertionError: Wrong message(s) raised for "metaclass_attr_access.py":
E
E Unexpected in testdata:
E 8: too-many-function-args (times 1)
pylint/testutils/lint_module_test.py:[142](https://github.com/pylint-dev/pylint/actions/runs/13796483619/job/38589265264?pr=10190#step:7:143): AssertionError
________________________ test_functional[super_checks] _________________________
self = <pylint.testutils.lint_module_test.LintModuleTest object at 0x7f043aaf4600>
def runTest(self) -> None:
> self._runTest()
E AssertionError: Wrong message(s) raised for "super_checks.py":
E
E Unexpected in testdata:
E 61: too-many-function-args (times 1)
but I have no idea how to approach them! Here's the metaclass_attr_access file:
class Meta(type):
"""the meta class"""
def __init__(cls, name, bases, dictionary):
super(Meta, cls).__init__(name, bases, dictionary)
print(cls, cls._meta_args)
delattr(cls, '_meta_args')
class Test:
"""metaclassed class"""
__metaclass__ = Meta
_meta_args = ('foo', 'bar')
def __init__(self):
print('__init__', self)
so maybe the super code suggested is handling super(Meta, cls) incorrectly. Not sure, and I think I might be breaking things if I hack at it further. Maybe someone with more experience with asts etc can take my work as a startisg point.
🤖 Effect of this PR on checked open source code: 🤖
Effect on astroid: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/pylint-dev/astroid/blob/9f8faeb3c0025aee08698e1a3cd02910579e4220/astroid/exceptions.py#L61
Effect on home-assistant: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/loader.py#L1453
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/loader.py#L1462
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/loader.py#L1471
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/util/yaml/loader.py#L142
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/util/yaml/loader.py#L151
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/util/yaml/input.py#L15
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/ecovacs/select.py#L85
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/ecovacs/event.py#L44
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/ecovacs/lawn_mower.py#L69
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/ecovacs/vacuum.py#L254
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/assist_pipeline/pipeline.py#L493
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/google_assistant/error.py#L14
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/switchbee/light.py#L63
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/switchbee/climate.py#L102
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/teslemetry/entity.py#L64
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/meteo_france/weather.py#L101
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/deconz/binary_sensor.py#L207
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/deconz/alarm_control_panel.py#L90
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/deconz/fan.py#L71
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/deconz/climate.py#L107
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/deconz/number.py#L116
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/deconz/sensor.py#L411
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/deconz/cover.py#L61
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/knx/storage/entity_store_validation.py#L71
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/stream/exceptions.py#L27
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/rainbird/config_flow.py#L56
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/ring/light.py#L67
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/ring/button.py#L50
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/syncthru/binary_sensor.py#L62
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/syncthru/sensor.py#L85
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/econet/water_heater.py#L72
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/econet/climate.py#L85
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/econet/switch.py#L39
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/here_travel_time/sensor.py#L122
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/osoenergy/binary_sensor.py#L77
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/osoenergy/water_heater.py#L177
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/osoenergy/sensor.py#L172
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/emonitor/sensor.py#L80
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/landisgyr_heat_meter/sensor.py#L312
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/nibe_heatpump/config_flow.py#L81
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/blebox/light.py#L67
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/blebox/binary_sensor.py#L46
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/blebox/button.py#L33
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/blebox/sensor.py#L140
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/blebox/cover.py#L63
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/lacrosse_view/sensor.py#L230
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/eheimdigital/light.py#L80
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/eheimdigital/climate.py#L82
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/wemo/coordinator.py#L59
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/fritz/coordinator.py#L93
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/lookin/entity.py#L72
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/lookin/entity.py#L113
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/nextdns/binary_sensor.py#L78
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/nextdns/button.py#L49
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/nextdns/switch.py#L552
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/devolo_home_network/binary_sensor.py#L86
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/devolo_home_network/device_tracker.py#L98
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/components/medcom_ble/sensor.py#L78
- too-many-function-args: Too many positional arguments for method call https://github.com/home-assistant/core/blob/d498dbd5ace41dc9657c265e42749dc49b9c8ea7/homeassistant/helpers/script.py#L400
Effect on pygame: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/pygame/pygame/blob/79807da84c9bacf8df5a177763e14c924e3b15e2/src_py/midi.py#L662
Effect on poetry-core: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/python-poetry/poetry-core/blob/5209a795b12dc9b553c0eb9df3743dc6931c7a73/src/poetry/core/packages/path_dependency.py#L45
Effect on music21: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/cuthbertLab/music21/blob/f7df489a066287f8721cd632a7134af583474a2f/music21/exceptions21.py#L39
- too-many-function-args: Too many positional arguments for method call https://github.com/cuthbertLab/music21/blob/f7df489a066287f8721cd632a7134af583474a2f/music21/environment.py#L120
- too-many-function-args: Too many positional arguments for method call https://github.com/cuthbertLab/music21/blob/f7df489a066287f8721cd632a7134af583474a2f/music21/musicxml/xmlObjects.py#L111
Effect on pytest: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/pytest-dev/pytest/blob/03b5a79170679a017fb58894518b167ff9be463e/src/_pytest/outcomes.py#L28
- too-many-function-args: Too many positional arguments for method call https://github.com/pytest-dev/pytest/blob/03b5a79170679a017fb58894518b167ff9be463e/src/_pytest/outcomes.py#L77
- too-many-function-args: Too many positional arguments for method call https://github.com/pytest-dev/pytest/blob/03b5a79170679a017fb58894518b167ff9be463e/src/_pytest/_code/code.py#L369
- too-many-function-args: Too many positional arguments for method call https://github.com/pytest-dev/pytest/blob/03b5a79170679a017fb58894518b167ff9be463e/src/_pytest/_code/code.py#L371
Effect on django: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/template/exceptions.py#L36
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/contrib/gis/gdal/raster/source.py#L45
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/contrib/postgres/fields/array.py#L259
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/utils/datastructures.py#L73
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/utils/datastructures.py#L268
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/core/exceptions.py#L146
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/test/client.py#L63
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/db/models/deletion.py#L13
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/db/models/deletion.py#L19
- too-many-function-args: Too many positional arguments for method call https://github.com/django/django/blob/e44e8327d3d88d86895735c0e427102063ff5b55/django/db/models/fields/json.py#L479
Effect on pandas: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/pandas-dev/pandas/blob/513e78760a8faee6723908ca23ea83dcabc5dd77/pandas/core/arrays/categorical.py#L496
- too-many-function-args: Too many positional arguments for method call https://github.com/pandas-dev/pandas/blob/513e78760a8faee6723908ca23ea83dcabc5dd77/pandas/core/arrays/categorical.py#L946
- too-many-function-args: Too many positional arguments for method call https://github.com/pandas-dev/pandas/blob/513e78760a8faee6723908ca23ea83dcabc5dd77/pandas/core/arrays/numpy_.py#L118
Effect on sentry: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/http.py#L50
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/exceptions.py#L46
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/exceptions.py#L87
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/hybridcloud/models/outbox.py#L46
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/hybridcloud/rpc/sig.py#L16
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/hybridcloud/rpc/service.py#L54
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/features/exceptions.py#L10
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/dynamic_sampling/tasks/common.py#L46
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/api/paginator.py#L55
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/api/endpoints/custom_rules.py#L39
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/api/bases/project.py#L34
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/api/helpers/source_map_helper.py#L40
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/utils/retries.py#L18
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/utils/warnings.py#L15
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/utils/github_client.py#L24
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/shared_integrations/exceptions/init.py#L77
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/shared_integrations/exceptions/init.py#L197
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/testutils/helpers/backups.py#L149
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/auth/email.py#L16
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/auth/providers/github/client.py#L11
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/auth/providers/fly/client.py#L11
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/integrations/discord/message_builder/base/component/action_row.py#L10
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/integrations/messaging/commands.py#L34
- too-many-function-args: Too many positional arguments for method call https://github.com/getsentry/sentry/blob/19d613ea777fb1f2396a935638a6df01e46c5082/src/sentry/data_export/base.py#L13
Effect on flask: The following messages are now emitted:
- too-many-function-args: Too many positional arguments for method call https://github.com/pallets/flask/blob/f61172b8dd3f962d33f25c50b2f5405e90ceffa5/src/flask/sessions.py#L82
- too-many-function-args: Too many positional arguments for method call https://github.com/pallets/flask/blob/f61172b8dd3f962d33f25c50b2f5405e90ceffa5/src/flask/config.py#L99
- too-many-function-args: Too many positional arguments for method call https://github.com/pallets/flask/blob/f61172b8dd3f962d33f25c50b2f5405e90ceffa5/src/flask/debughelpers.py#L78
This comment was generated for commit 68bd688fd612623598022894b9814e80e4a6eb5d
Hey thanks for the push. What I can say at a glance is that the pylint annotations you see in the files tab of this PR show some false positives with my suggestion -- looks like the logic needs to be fixed to make sure that the inference result for the class being init'ed is really object and not something else that might indeed take non-self args. Does that help?