Skip to content

Respect docstring-min-length in docparams extension #10104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

berkersal
Copy link

@berkersal berkersal commented Dec 2, 2024

Even though visit_functiondef is checking for docstring-min-length, it is not enough. This commit fixes the issue by adding the same check to visit_raise and visit_yield

If there is a better way of implementing this, please go forward. I am just providing a working fix to this problem.

Type of Changes

Type
🐛 Bug fix

Description

Refs #XXXX

Closes #XXXX

@Pierre-Sassoulas Pierre-Sassoulas added the False Negative 🦋 No message is emitted but something is wrong with the code label Dec 2, 2024
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.91%. Comparing base (59b01f2) to head (d7fd351).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #10104   +/-   ##
=======================================
  Coverage   95.91%   95.91%           
=======================================
  Files         176      176           
  Lines       19147    19155    +8     
=======================================
+ Hits        18364    18372    +8     
  Misses        783      783           
Files with missing lines Coverage Δ
pylint/extensions/docparams.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This comment has been minimized.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening a PR ! Would you mind adding functional tests (https://github.com/pylint-dev/pylint/tree/main/tests/functional/ext/docparams) and a changelog (https://github.com/pylint-dev/pylint/tree/main/doc/whatsnew/fragments) for this please ?

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thank you ! Any reasons not to create a reusable function for the new code in the doc param class (copy pasted thrice as far as I understand) ?

@Pierre-Sassoulas
Copy link
Member

Don't mind the fail of the CI this is due to python/cpython#125415 in 3.13.1 we're going to be able to rebase on main once it's fixed.

@berkersal berkersal force-pushed the main branch 5 times, most recently from b794ef3 to c8d7ec9 Compare December 7, 2024 16:07
@berkersal
Copy link
Author

Sorry for a lot of pushes 😅

@berkersal
Copy link
Author

Something not related to my changes is giving an error on pre-commit checks

@Pierre-Sassoulas
Copy link
Member

Sorry about that it's going to be fixed in #10165

This comment has been minimized.

Comment on lines +343 to +345
# skip functions smaller than 'docstring-min-length'
if self._is_shorter_than_min_length(node):
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it's possible to cover this, do return nodes ever have a docstring attached ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I understand the problem 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those two lines are not covered by tests, and it's in a visit_return function, so I suppose it's not covered because it's impossible to ever reach this code (return node don't have docstrings, right ?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what return node is but there is a part in docstrings that documents what the function is returning

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return node would be obtained from something like return 4, once parsed you'll get an ast's Return node:

Parsing:

print(ast.dump(ast.parse('return 4')))

Resut:

Module(body=[Return(value=Constant(value=4))])

(Which then become an astroid return node in pylint, before we use the visitor pattern to do something with it)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the extension is deciding the return part of the docstring from -> int part of the function definition. Then it wouldn't care about the return node

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, would it be possible to create a functional test for it then ? (I.e. with a docstring too small and return type information that we don't need to analyse because the docstring is too small if I understood correctly)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielNoord DanielNoord added the Needs take over 🛎️ Orignal implementer went away but the code could be salvaged. label Mar 30, 2025
@Pierre-Sassoulas Pierre-Sassoulas removed the Needs take over 🛎️ Orignal implementer went away but the code could be salvaged. label May 25, 2025
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added functional tests look amazing ! I authorized the workflow, let's see how it goes.

This comment has been minimized.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great first merge request @berkersal. Thank you for the great functional tests. I asked for some clarification on the intent of the MR, there seem to be some contradiction between the title and the test cases (and the description did not permit to clarify for me).

@Pierre-Sassoulas Pierre-Sassoulas added False Positive 🦟 A message is emitted but nothing is wrong with the code and removed False Negative 🦋 No message is emitted but something is wrong with the code labels May 25, 2025
Copy link
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on home-assistant:
The following messages are now emitted:

  1. too-many-lines:
    Too many lines in module (1486/1000)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L1
  2. magic-value-comparison:
    Consider using a named constant or an enum instead of ''countries''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L651
  3. consider-using-assignment-expr:
    Use 'if (domain := split_entity_id(e_or_u)[0]) not in allowed_domains:' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L826
  4. magic-value-comparison:
    Consider using a named constant or an enum instead of ''languages''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L974
  5. magic-value-comparison:
    Consider using a named constant or an enum instead of ''box''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L1065
  6. magic-value-comparison:
    Consider using a named constant or an enum instead of ''min''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L1068
  7. magic-value-comparison:
    Consider using a named constant or an enum instead of ''max''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L1068
  8. magic-value-comparison:
    Consider using a named constant or an enum instead of ''min''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L1107
  9. magic-value-comparison:
    Consider using a named constant or an enum instead of ''max''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/selector.py#L1110
  10. consider-ternary-expression:
    Consider rewriting as a ternary expression
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/schema_config_entry_flow.py#L231
  11. unused-argument:
    Unused argument 'user_input'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/schema_config_entry_flow.py#L294
  12. protected-access:
    Access to a protected member _common_handler of a client class
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/schema_config_entry_flow.py#L365
  13. arguments-differ:
    Number of parameters was 7 in 'ConfigFlow.async_create_entry' and is now 3 in overriding 'SchemaConfigFlowHandler.async_create_entry' method
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/schema_config_entry_flow.py#L398
  14. protected-access:
    Access to a protected member _common_handler of a client class
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/schema_config_entry_flow.py#L461
  15. arguments-differ:
    Number of parameters was 5 in 'FlowHandler.async_create_entry' and is now 3 in overriding 'SchemaOptionsFlowHandler.async_create_entry' method
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/schema_config_entry_flow.py#L466
  16. consider-using-assignment-expr:
    Use 'if (entry := registry.async_get(entity_id)):' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/schema_config_entry_flow.py#L491
  17. consider-using-assignment-expr:
    Use 'if (state := hass.states.get(entity_id)):' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/helpers/schema_config_entry_flow.py#L494
  18. too-many-instance-attributes:
    Too many instance attributes (10/7)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/util/aiohttp.py#L58
  19. too-many-arguments:
    Too many arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/util/aiohttp.py#L63
  20. too-many-positional-arguments:
    Too many positional arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/util/aiohttp.py#L63
  21. protected-access:
    Access to a protected member _value of a client class
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/util/aiohttp.py#L126
  22. consider-using-assignment-expr:
    Use 'if (entity := hass.data[DOMAIN]['devices'].get(dev_id)) is not None:' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L51
  23. invalid-overridden-method:
    Method 'unique_id' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L76
  24. invalid-overridden-method:
    Method 'battery_level' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L81
  25. invalid-overridden-method:
    Method 'extra_state_attributes' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L86
  26. invalid-overridden-method:
    Method 'location_accuracy' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L91
  27. invalid-overridden-method:
    Method 'latitude' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L96
  28. invalid-overridden-method:
    Method 'longitude' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L105
  29. invalid-overridden-method:
    Method 'location_name' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L114
  30. invalid-overridden-method:
    Method 'device_info' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L124
  31. magic-value-comparison:
    Consider using a named constant or an enum instead of ''host_name''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/owntracks/device_tracker.py#L127
  32. locally-disabled:
    Locally disabling import-outside-toplevel (C0415)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2858
  33. empty-comment:
    Line with empty comment
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L984
  34. empty-comment:
    Line with empty comment
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2438
  35. empty-comment:
    Line with empty comment
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2638
  36. empty-comment:
    Line with empty comment
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2643
  37. empty-comment:
    Line with empty comment
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2649
  38. empty-comment:
    Line with empty comment
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2650
  39. line-too-long:
    Line too long (103/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2364
  40. line-too-long:
    Line too long (106/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2508
  41. line-too-long:
    Line too long (108/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2823
  42. line-too-long:
    Line too long (143/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2833
  43. line-too-long:
    Line too long (106/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2848
  44. line-too-long:
    Line too long (104/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2849
  45. too-many-lines:
    Too many lines in module (2864/1000)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1
  46. too-complex:
    '_compile_statistics' is too complex. The McCabe rating is 14
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L637
  47. too-complex:
    '_reduce_statistics' is too complex. The McCabe rating is 15
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1015
  48. too-complex:
    'statistic_during_period' is too complex. The McCabe rating is 18
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1601
  49. too-complex:
    '_statistics_during_period_with_session' is too complex. The McCabe rating is 19
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1855
  50. too-complex:
    '_sorted_statistics_to_dict' is too complex. The McCabe rating is 12
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2372
  51. consider-ternary-expression:
    Consider rewriting as a ternary expression
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L347
  52. consider-using-any-or-all:
    for loop could be any(from_unit in converter.VALID_UNITS and to_unit in converter.VALID_UNITS for converter in STATISTIC_UNIT_TO_UNIT_CONVERTER.values())
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L395
  53. too-many-locals:
    Too many local variables (20/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L492
  54. consider-using-assignment-expr:
    Use 'if (stats := execute_stmt_lambda_element(session, stmt)):' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L509
  55. consider-using-augmented-assign:
    Use '%=' to do an augmented assign directly
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L517
  56. consider-using-assignment-expr:
    Use 'if (stats := execute_stmt_lambda_element(session, stmt)):' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L530
  57. while-used:
    Used while loop
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L582
  58. too-many-locals:
    Too many local variables (22/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L637
  59. magic-value-comparison:
    Consider using a named constant or an enum instead of '50'.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L699
  60. magic-value-comparison:
    Consider using a named constant or an enum instead of '55'.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L710
  61. magic-value-comparison:
    Consider using a named constant or an enum instead of '55'.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L718
  62. too-many-branches:
    Too many branches (13/12)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L637
  63. too-many-try-statements:
    try clause contains 2 statements, expected at most 1
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L774
  64. too-many-arguments:
    Too many arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1015
  65. too-many-positional-arguments:
    Too many positional arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1015
  66. too-many-locals:
    Too many local variables (29/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1015
  67. magic-value-comparison:
    Consider using a named constant or an enum instead of ''mean''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1026
  68. magic-value-comparison:
    Consider using a named constant or an enum instead of ''min''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1027
  69. magic-value-comparison:
    Consider using a named constant or an enum instead of ''max''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1028
  70. magic-value-comparison:
    Consider using a named constant or an enum instead of ''last_reset''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1029
  71. magic-value-comparison:
    Consider using a named constant or an enum instead of ''state''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1030
  72. magic-value-comparison:
    Consider using a named constant or an enum instead of ''sum''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1031
  73. too-many-branches:
    Too many branches (14/12)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1015
  74. too-many-arguments:
    Too many arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1285
  75. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1285
  76. too-many-locals:
    Too many local variables (18/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1285
  77. magic-value-comparison:
    Consider using a named constant or an enum instead of ''max''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1298
  78. magic-value-comparison:
    Consider using a named constant or an enum instead of ''mean''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1300
  79. magic-value-comparison:
    Consider using a named constant or an enum instead of ''min''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1307
  80. consider-using-assignment-expr:
    Use 'if not (stats := cast(Sequence[Row[Any]], execute_stmt_lambda_element(session, stmt))):' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1314
  81. magic-value-comparison:
    Consider using a named constant or an enum instead of ''max''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1316
  82. magic-value-comparison:
    Consider using a named constant or an enum instead of ''mean''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1319
  83. magic-value-comparison:
    Consider using a named constant or an enum instead of ''min''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1334
  84. too-many-arguments:
    Too many arguments (10/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1339
  85. too-many-positional-arguments:
    Too many positional arguments (10/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1339
  86. magic-value-comparison:
    Consider using a named constant or an enum instead of ''max''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1393
  87. magic-value-comparison:
    Consider using a named constant or an enum instead of ''mean''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1395
  88. consider-using-augmented-assign:
    Use '/=' to do an augmented assign directly
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1405
  89. magic-value-comparison:
    Consider using a named constant or an enum instead of ''min''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1407
  90. too-many-arguments:
    Too many arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1446
  91. too-many-positional-arguments:
    Too many positional arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1446
  92. consider-using-assignment-expr:
    Use 'if (prev_period := period - Statistics.duration) < oldest_stat:' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1492
  93. too-many-boolean-expressions:
    Too many boolean expressions in if statement (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1496
  94. too-many-arguments:
    Too many arguments (9/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1537
  95. too-many-positional-arguments:
    Too many positional arguments (9/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1537
  96. too-many-arguments:
    Too many arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1601
  97. too-many-positional-arguments:
    Too many positional arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1601
  98. too-many-locals:
    Too many local variables (26/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1601
  99. too-many-boolean-expressions:
    Too many boolean expressions in if statement (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1654
  100. consider-using-assignment-expr:
    Use 'if (tail_start_time := _last_statistic(session, Statistics, metadata_id)):' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1679
  101. magic-value-comparison:
    Consider using a named constant or an enum instead of ''change''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1711
  102. consider-using-assignment-expr:
    Use 'if not (convert := _get_statistic_to_display_unit_converter(unit, state_unit, units)):' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1748
  103. too-many-branches:
    Too many branches (20/12)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1601
  104. too-many-statements:
    Too many statements (61/50)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1601
  105. too-many-arguments:
    Too many arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1803
  106. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1803
  107. too-many-locals:
    Too many local variables (22/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1803
  108. magic-value-comparison:
    Consider using a named constant or an enum instead of ''sum''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1814
  109. magic-value-comparison:
    Consider using a named constant or an enum instead of ''sum''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1842
  110. consider-ternary-expression:
    Consider rewriting as a ternary expression
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1844
  111. too-many-arguments:
    Too many arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1855
  112. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1855
  113. too-many-locals:
    Too many local variables (19/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1855
  114. magic-value-comparison:
    Consider using a named constant or an enum instead of ''change''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1883
  115. 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/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1903
  116. magic-value-comparison:
    Consider using a named constant or an enum instead of ''day''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1893
  117. 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/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1915
  118. magic-value-comparison:
    Consider using a named constant or an enum instead of ''week''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1903
  119. magic-value-comparison:
    Consider using a named constant or an enum instead of ''month''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1915
  120. magic-value-comparison:
    Consider using a named constant or an enum instead of ''5minute''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1923
  121. magic-value-comparison:
    Consider using a named constant or an enum instead of ''day''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1946
  122. magic-value-comparison:
    Consider using a named constant or an enum instead of ''week''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1949
  123. magic-value-comparison:
    Consider using a named constant or an enum instead of ''month''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1952
  124. magic-value-comparison:
    Consider using a named constant or an enum instead of ''change''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1955
  125. too-many-branches:
    Too many branches (18/12)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1855
  126. too-many-arguments:
    Too many arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1970
  127. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L1970
  128. too-many-arguments:
    Too many arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2026
  129. too-many-positional-arguments:
    Too many positional arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2026
  130. consider-ternary-expression:
    Consider rewriting as a ternary expression
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2045
  131. too-many-arguments:
    Too many arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2252
  132. too-many-positional-arguments:
    Too many positional arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2252
  133. too-many-arguments:
    Too many arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2372
  134. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2372
  135. too-many-locals:
    Too many local variables (31/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2372
  136. magic-value-comparison:
    Consider using a named constant or an enum instead of ''last_reset_ts''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2409
  137. magic-value-comparison:
    Consider using a named constant or an enum instead of ''sum''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2411
  138. too-many-branches:
    Too many branches (14/12)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2372
  139. use-implicit-booleaness-not-comparison-to-zero:
    "start.minute != 0" can be simplified to "start.minute", if it is strictly an int, as 0 is falsey
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2506
  140. use-implicit-booleaness-not-comparison-to-zero:
    "start.second != 0" can be simplified to "start.second", if it is strictly an int, as 0 is falsey
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2506
  141. use-implicit-booleaness-not-comparison-to-zero:
    "start.microsecond != 0" can be simplified to "start.microsecond", if it is strictly an int, as 0 is falsey
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2506
  142. magic-value-comparison:
    Consider using a named constant or an enum instead of ''last_reset''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2513
  143. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2605
  144. suppressed-message:
    Suppressed 'import-outside-toplevel' (from line 2858)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/statistics.py#L2858
  145. too-many-arguments:
    Too many arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L107
  146. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L107
  147. magic-value-comparison:
    Consider using a named constant or an enum instead of ''start_time''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L143
  148. magic-value-comparison:
    Consider using a named constant or an enum instead of ''end_time''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L143
  149. magic-value-comparison:
    Consider using a named constant or an enum instead of ''duration''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L143
  150. magic-value-comparison:
    Consider using a named constant or an enum instead of ''offset''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L145
  151. magic-value-comparison:
    Consider using a named constant or an enum instead of ''duration''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L145
  152. too-many-arguments:
    Too many arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L164
  153. too-many-positional-arguments:
    Too many positional arguments (8/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L164
  154. magic-value-comparison:
    Consider using a named constant or an enum instead of ''last_reset''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L184
  155. too-many-try-statements:
    try clause contains 2 statements, expected at most 1
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L357
  156. too-many-try-statements:
    try clause contains 2 statements, expected at most 1
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/recorder/websocket_api.py#L412
  157. magic-value-comparison:
    Consider using a named constant or an enum instead of ''tts''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/config_flow.py#L259
  158. magic-value-comparison:
    Consider using a named constant or an enum instead of ''vision''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/config_flow.py#L260
  159. line-too-long:
    Line too long (124/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L352
  160. line-too-long:
    Line too long (111/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L353
  161. line-too-long:
    Line too long (103/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L364
  162. line-too-long:
    Line too long (138/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L433
  163. magic-value-comparison:
    Consider using a named constant or an enum instead of ''gemma''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L324
  164. magic-value-comparison:
    Consider using a named constant or an enum instead of ''gemini-2.0-flash-preview-image-generation''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L325
  165. magic-value-comparison:
    Consider using a named constant or an enum instead of ''tool_result''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L344
  166. use-implicit-booleaness-not-comparison-to-string:
    "chat_content.content == ''" can be simplified to "not chat_content.content", if it is strictly a string, as an empty string is falsey
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L350
  167. redefined-loop-name:
    Redefining 'chat_content' from loop (line 343)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L354
  168. magic-value-comparison:
    Consider using a named constant or an enum instead of ''user''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L365
  169. invalid-name:
    Variable name "generateContentConfig" doesn't conform to snake_case naming style
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L373
  170. too-many-try-statements:
    try clause contains 6 statements, expected at most 1
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L428
  171. consider-using-assignment-expr:
    Use 'if not (response_parts := chat_response.candidates[0].content.parts):' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L463
  172. no-self-use:
    Method could be a function
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/google_generative_ai_conversation/conversation.py#L509
  173. import-error:
    Unable to import 'tuya_sharing'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/tuya/event.py#L5
  174. consider-using-assignment-expr:
    Use 'if (dpcode := description.key) in device.status:' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/tuya/event.py#L103
  175. too-many-lines:
    Too many lines in module (1446/1000)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/tuya/sensor.py#L1
  176. 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/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/tuya/sensor.py#L1360
  177. invalid-overridden-method:
    Method 'native_value' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/tuya/sensor.py#L1401
  178. consider-using-assignment-expr:
    Use 'if (value := self.device.status.get(self.entity_description.key)) is None:' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/tuya/sensor.py#L1415
  179. too-many-return-statements:
    Too many return statements (10/6)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/tuya/sensor.py#L1401
  180. invalid-overridden-method:
    Method 'extra_state_attributes' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/starline/device_tracker.py#L40
  181. invalid-overridden-method:
    Method 'battery_level' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/starline/device_tracker.py#L45
  182. invalid-overridden-method:
    Method 'location_accuracy' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/starline/device_tracker.py#L50
  183. invalid-overridden-method:
    Method 'latitude' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/starline/device_tracker.py#L55
  184. invalid-overridden-method:
    Method 'longitude' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/starline/device_tracker.py#L60
  185. consider-using-assignment-expr:
    Use 'if (num_previous_rounds := message_history.num_user_messages - 1) >= max_messages:' instead
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/ollama/conversation.py#L307
  186. no-self-use:
    Method could be a function
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/ollama/conversation.py#L291
  187. no-self-use:
    Method could be a function
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/ollama/conversation.py#L317
  188. import-error:
    Unable to import 'quantum_gateway'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/quantum_gateway/device_tracker.py#L5
  189. import-error:
    Unable to import 'voluptuous'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/quantum_gateway/device_tracker.py#L7
  190. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/quantum_gateway/device_tracker.py#L31
  191. abstract-method:
    Method 'get_extra_attributes' is abstract in class 'DeviceScanner' but is not overridden in child class 'QuantumGatewayDeviceScanner'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/quantum_gateway/device_tracker.py#L39
  192. too-many-try-statements:
    try clause contains 2 statements, expected at most 1
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/quantum_gateway/device_tracker.py#L50
  193. line-too-long:
    Line too long (102/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/reolink/__init__.py#L479
  194. too-many-locals:
    Too many local variables (26/15)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/reolink/__init__.py#L359
  195. magic-value-comparison:
    Consider using a named constant or an enum instead of ''update''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/reolink/__init__.py#L454
  196. magic-value-comparison:
    Consider using a named constant or an enum instead of '3'.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/reolink/__init__.py#L477
  197. too-many-statements:
    Too many statements (73/50)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/reolink/__init__.py#L359
  198. unused-variable:
    Unused variable 'old_ch'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/reolink/__init__.py#L389
  199. unused-variable:
    Unused variable 'old_is_chime'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/reolink/__init__.py#L389
  200. line-too-long:
    Line too long (114/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L211
  201. line-too-long:
    Line too long (160/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L252
  202. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L63
  203. unexpected-keyword-arg:
    Unexpected keyword argument 'name' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L63
  204. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L71
  205. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L71
  206. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L71
  207. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L78
  208. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L78
  209. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L78
  210. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L87
  211. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L87
  212. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L87
  213. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L93
  214. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L100
  215. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L100
  216. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L100
  217. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L106
  218. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L106
  219. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L106
  220. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L115
  221. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L115
  222. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L115
  223. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L124
  224. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L124
  225. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L124
  226. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L130
  227. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L130
  228. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L130
  229. abstract-method:
    Method 'turn_off' is abstract in class 'ToggleEntity' but is not overridden in child class 'SmartThingsSwitch'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L235
  230. abstract-method:
    Method 'turn_on' is abstract in class 'ToggleEntity' but is not overridden in child class 'SmartThingsSwitch'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L235
  231. too-many-arguments:
    Too many arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L240
  232. too-many-positional-arguments:
    Too many positional arguments (6/5)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L240
  233. invalid-overridden-method:
    Method 'is_on' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L275
  234. abstract-method:
    Method 'turn_off' is abstract in class 'ToggleEntity' but is not overridden in child class 'SmartThingsCommandSwitch'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L285
  235. abstract-method:
    Method 'turn_on' is abstract in class 'ToggleEntity' but is not overridden in child class 'SmartThingsCommandSwitch'
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/switch.py#L285
  236. line-too-long:
    Line too long (147/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L361
  237. line-too-long:
    Line too long (130/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L374
  238. line-too-long:
    Line too long (104/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L386
  239. line-too-long:
    Line too long (130/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L395
  240. too-complex:
    'async_migrate_entry' is too complex. The McCabe rating is 15
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L315
  241. magic-value-comparison:
    Consider using a named constant or an enum instead of '3'.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L318
  242. magic-value-comparison:
    Consider using a named constant or an enum instead of '2'.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L324
  243. magic-value-comparison:
    Consider using a named constant or an enum instead of ''binary_sensor''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L327
  244. magic-value-comparison:
    Consider using a named constant or an enum instead of ''sensor''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L343
  245. magic-value-comparison:
    Consider using a named constant or an enum instead of '' ''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L344
  246. magic-value-comparison:
    Consider using a named constant or an enum instead of ''switch''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L393
  247. too-many-return-statements:
    Too many return statements (12/6)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L326
  248. magic-value-comparison:
    Consider using a named constant or an enum instead of ''burner''.
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L524
  249. redefined-loop-name:
    Redefining 'component' from loop (line 521)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/__init__.py#L526
  250. locally-disabled:
    Locally disabling too-many-nested-blocks (R1702)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L1109
  251. line-too-long:
    Line too long (119/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L1154
  252. line-too-long:
    Line too long (121/100)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L1202
  253. too-many-lines:
    Too many lines in module (1256/1000)
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L1
  254. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L438
  255. unexpected-keyword-arg:
    Unexpected keyword argument 'options' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L438
  256. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L448
  257. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L448
  258. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L448
  259. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L448
  260. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L459
  261. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L459
  262. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L459
  263. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L459
  264. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L459
  265. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L471
  266. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L471
  267. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L471
  268. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L471
  269. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L481
  270. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L481
  271. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L481
  272. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L481
  273. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L481
  274. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L490
  275. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L490
  276. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L496
  277. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L496
  278. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L496
  279. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L504
  280. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L504
  281. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L504
  282. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L504
  283. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L515
  284. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L515
  285. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L515
  286. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L515
  287. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L526
  288. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L526
  289. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/535d128f8a98827185ace3df2bd8f7761da9a535/homeassistant/components/smartthings/sensor.py#L526
  290. unexpected-ke...

This comment was truncated because GitHub allows only 65536 characters in a comment.

This comment was generated for commit 274a614

berkersal and others added 3 commits June 10, 2025 15:22
Even though visit_functiondef is checking for docstring-min-length, it is not enough. This commit fixes the issue by adding the same check to visit_raise, visit_return and visit_yield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport maintenance/3.3.x False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants