Skip to content
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

Change _iterate_file_descrs to _get_file_items #10142

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

Conversation

jzohrab
Copy link

@jzohrab jzohrab commented Dec 18, 2024

Returning a materialized list instead of an iterator lets us do simple progress reporting in the future. As the list of FileItems is very lightweight, there shouldn't be a performance hit.

Type of Changes

Type
🔨 Refactoring

Refs

This work was initially done as part of draft PR #10134 , and it makes sense as a small refactor of the internal method.

Returning a materialized list instead of an iterator lets us do
simple progress reporting in the future.  As the list of FileItems
is very lightweight, there shouldn't be a performance hit.
@Pierre-Sassoulas
Copy link
Member

Why not just call list on the iterator instead of refactoring everything ?

@Pierre-Sassoulas Pierre-Sassoulas added the Needs decision 🔒 Needs a decision before implemention or rejection label Dec 18, 2024
@jzohrab
Copy link
Author

jzohrab commented Dec 18, 2024

Why not just call list on the iterator instead of refactoring everything ?

Good question. Either way, it kind of ends up being the same thing: we either edit code so that we do list(iterator) everywhere, or we return a list and change code that uses it. Since this is an internal method, and the content is always only used as a list (to facilitate progress logging), it made sense for the code to reflect that intent.

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 (1132/1000)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/const.py#L1
  2. locally-disabled:
    Locally disabling import-outside-toplevel (C0415)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L543
  3. locally-disabled:
    Locally disabling import-outside-toplevel (C0415)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L872
  4. locally-disabled:
    Locally disabling import-outside-toplevel (C0415)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L890
  5. locally-disabled:
    Locally disabling broad-exception-caught (W0718)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L905
  6. too-complex:
    'async_process_ha_core_config' is too complex. The McCabe rating is 19
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L351
  7. too-complex:
    '_async_update' is too complex. The McCabe rating is 15
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L737
  8. too-many-branches:
    Too many branches (18/12)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L351
  9. too-many-statements:
    Too many statements (51/50)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L351
  10. magic-value-comparison:
    Consider using a named constant or an enum instead of ''.''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L514
  11. magic-value-comparison:
    Consider using a named constant or an enum instead of ''.''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L525
  12. too-many-instance-attributes:
    Too many instance attributes (30/7)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L535
  13. too-many-try-statements:
    try clause contains 2 statements, expected at most 1
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L657
  14. consider-ternary-expression:
    Consider rewriting as a ternary expression
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L659
  15. too-many-arguments:
    Too many arguments (14/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L737
  16. too-many-branches:
    Too many branches (13/12)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L737
  17. protected-access:
    Access to a protected member _name of a client class
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L836
  18. magic-value-comparison:
    Consider using a named constant or an enum instead of '2'.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L875
  19. magic-value-comparison:
    Consider using a named constant or an enum instead of '3'.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L882
  20. too-many-try-statements:
    try clause contains 7 statements, expected at most 1
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L886
  21. consider-using-assignment-expr:
    Use 'if (owner := await self.hass.auth.async_get_owner()) is not None:' instead
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L888
  22. magic-value-comparison:
    Consider using a named constant or an enum instead of ''language''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L897
  23. magic-value-comparison:
    Consider using a named constant or an enum instead of ''language''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L898
  24. magic-value-comparison:
    Consider using a named constant or an enum instead of '4'.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L907
  25. suppressed-message:
    Suppressed 'import-outside-toplevel' (from line 543)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L543
  26. suppressed-message:
    Suppressed 'import-outside-toplevel' (from line 872)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L872
  27. suppressed-message:
    Suppressed 'broad-exception-caught' (from line 905)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L905
  28. suppressed-message:
    Suppressed 'import-outside-toplevel' (from line 890)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core_config.py#L890
  29. magic-value-comparison:
    Consider using a named constant or an enum instead of ''cadata''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/block_async_io.py#L56
  30. consider-using-assignment-expr:
    Use 'if (calls := _BLOCKED_CALLS.calls):' instead
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/block_async_io.py#L242
  31. line-too-long:
    Line too long (104/100)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/backup_restore.py#L112
  32. import-error:
    Unable to import 'collections.abc'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/backup_restore.py#L5
  33. import-error:
    Unable to import 'awesomeversion'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/backup_restore.py#L15
  34. import-error:
    Unable to import 'securetar'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/backup_restore.py#L16
  35. too-many-try-statements:
    try clause contains 2 statements, expected at most 1
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/backup_restore.py#L56
  36. too-many-lines:
    Too many lines in module (2853/1000)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L1
  37. too-complex:
    'async_call' is too complex. The McCabe rating is 16
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2690
  38. too-many-arguments:
    Too many arguments (7/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2437
  39. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2437
  40. too-many-arguments:
    Too many arguments (6/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2532
  41. too-many-positional-arguments:
    Too many positional arguments (6/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2532
  42. too-many-arguments:
    Too many arguments (7/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2558
  43. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2558
  44. too-many-arguments:
    Too many arguments (7/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2585
  45. too-many-positional-arguments:
    Too many positional arguments (7/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2585
  46. consider-using-assignment-expr:
    Use 'if (service := service.lower()) not in self._services.get(domain, {}):' instead
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2650
  47. too-many-arguments:
    Too many arguments (8/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2663
  48. too-many-positional-arguments:
    Too many positional arguments (8/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2663
  49. too-many-arguments:
    Too many arguments (8/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2690
  50. too-many-positional-arguments:
    Too many positional arguments (8/5)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2690
  51. 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/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2748
  52. too-many-branches:
    Too many branches (13/12)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2690
  53. broad-exception-caught:
    Catching too general exception Exception
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2824
  54. no-self-use:
    Method could be a function
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/core.py#L2808
  55. consider-using-namedtuple-or-dataclass:
    Consider using namedtuple or dataclass for dictionary values
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/generated/zeroconf.py#L6
  56. import-error:
    Unable to import 'ohme'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/coordinator.py#L7
  57. import-error:
    Unable to import 'ohme'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/__init__.py#L5
  58. used-before-assignment:
    Using variable 'OhmeRuntimeData' before assignment
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/__init__.py#L15
  59. too-many-try-statements:
    try clause contains 3 statements, expected at most 1
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/__init__.py#L31
  60. import-error:
    Unable to import 'collections.abc'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/entity.py#L3
  61. import-error:
    Unable to import 'ohme'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/entity.py#L6
  62. import-error:
    Unable to import 'collections.abc'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L5
  63. import-error:
    Unable to import 'ohme'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L8
  64. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L34
  65. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L34
  66. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L34
  67. unexpected-keyword-arg:
    Unexpected keyword argument 'options' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L34
  68. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L41
  69. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L41
  70. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L41
  71. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L47
  72. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L47
  73. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L47
  74. unexpected-keyword-arg:
    Unexpected keyword argument 'suggested_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L47
  75. unexpected-keyword-arg:
    Unexpected keyword argument 'suggested_display_precision' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L47
  76. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L55
  77. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L55
  78. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L55
  79. unexpected-keyword-arg:
    Unexpected keyword argument 'suggested_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L55
  80. unexpected-keyword-arg:
    Unexpected keyword argument 'suggested_display_precision' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L55
  81. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L55
  82. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L67
  83. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L67
  84. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L67
  85. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L67
  86. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L79
  87. invalid-overridden-method:
    Method 'native_value' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/sensor.py#L104
  88. import-error:
    Unable to import 'collections.abc'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/config_flow.py#L3
  89. import-error:
    Unable to import 'ohme'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/config_flow.py#L6
  90. import-error:
    Unable to import 'voluptuous'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/config_flow.py#L7
  91. abstract-method:
    Method 'is_matching' is abstract in class 'ConfigFlow' but is not overridden in child class 'OhmeConfigFlow'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/config_flow.py#L48
  92. unused-argument:
    Unused argument 'entry_data'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/config_flow.py#L74
  93. no-self-use:
    Method could be a function
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/config_flow.py#L102
  94. import-error:
    Unable to import 'collections.abc'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/button.py#L5
  95. import-error:
    Unable to import 'ohme'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/button.py#L8
  96. unexpected-keyword-arg:
    Unexpected keyword argument 'key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/button.py#L31
  97. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/button.py#L31
  98. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/button.py#L42
  99. abstract-method:
    Method 'press' is abstract in class 'ButtonEntity' but is not overridden in child class 'OhmeButton'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/ohme/button.py#L56
  100. line-too-long:
    Line too long (102/100)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L163
  101. too-complex:
    '_async_migrate_entries' is too complex. The McCabe rating is 15
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L104
  102. import-error:
    Unable to import 'screenlogicpy.const.common'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L7
  103. import-error:
    Unable to import 'screenlogicpy.const.data'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L8
  104. unused-argument:
    Unused argument 'config'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L48
  105. too-many-try-statements:
    try clause contains 2 statements, expected at most 1
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L65
  106. consider-using-assignment-expr:
    Use 'if (unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS)):' instead
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L91
  107. too-many-locals:
    Too many local variables (19/15)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L104
  108. magic-value-comparison:
    Consider using a named constant or an enum instead of '2'.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L117
  109. consider-using-assignment-expr:
    Use 'if (new_key := migrations['new_key']) in SHARED_VALUES:' instead
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L139
  110. magic-value-comparison:
    Consider using a named constant or an enum instead of ''pump''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L146
  111. too-many-branches:
    Too many branches (15/12)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/screenlogic/__init__.py#L104
  112. invalid-overridden-method:
    Method 'state_attributes' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/remote/__init__.py#L185
  113. import-error:
    Unable to import 'pydrawise'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/hydrawise/config_flow.py#L9
  114. too-many-try-statements:
    try clause contains 2 statements, expected at most 1
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/hydrawise/config_flow.py#L41
  115. unused-argument:
    Unused argument 'entry_data'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/hydrawise/config_flow.py#L91
  116. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L38
  117. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L38
  118. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L43
  119. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L43
  120. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L48
  121. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L48
  122. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L53
  123. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L53
  124. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L58
  125. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L58
  126. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L63
  127. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L63
  128. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L68
  129. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L68
  130. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L73
  131. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L73
  132. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L78
  133. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L78
  134. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L87
  135. invalid-overridden-method:
    Method 'is_on' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L133
  136. invalid-overridden-method:
    Method 'extra_state_attributes' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L138
  137. magic-value-comparison:
    Consider using a named constant or an enum instead of ''plugwise_notification''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L140
  138. redefined-loop-name:
    Redefining 'msg_type' from loop (line 146)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L147
  139. consider-using-assignment-expr:
    Use 'if (msg_type := msg_type.lower()) not in SEVERITIES:' instead
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L148
  140. redefined-loop-name:
    Redefining 'msg_type' from loop (line 146)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/binary_sensor.py#L149
  141. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L35
  142. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L35
  143. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L40
  144. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L40
  145. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L45
  146. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L45
  147. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L50
  148. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L50
  149. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L59
  150. abstract-method:
    Method 'turn_off' is abstract in class 'ToggleEntity' but is not overridden in child class 'PlugwiseSwitchEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L84
  151. abstract-method:
    Method 'turn_on' is abstract in class 'ToggleEntity' but is not overridden in child class 'PlugwiseSwitchEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L84
  152. invalid-overridden-method:
    Method 'is_on' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/switch.py#L101
  153. too-many-try-statements:
    try clause contains 3 statements, expected at most 1
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/coordinator.py#L71
  154. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L34
  155. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L34
  156. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L34
  157. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L34
  158. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L41
  159. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L41
  160. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L41
  161. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L41
  162. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L48
  163. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L48
  164. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L48
  165. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L48
  166. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L59
  167. abstract-method:
    Method 'set_native_value' is abstract in class 'NumberEntity' but is not overridden in child class 'PlugwiseNumberEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L83
  168. abstract-method:
    Method 'set_value' is abstract in class 'NumberEntity' but is not overridden in child class 'PlugwiseNumberEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L83
  169. magic-value-comparison:
    Consider using a named constant or an enum instead of ''temperature_offset''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L104
  170. invalid-overridden-method:
    Method 'native_value' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/number.py#L109
  171. invalid-name:
    Variable name "_P" doesn't conform to snake_case naming style
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/util.py#L14
  172. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L30
  173. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L35
  174. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L35
  175. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L41
  176. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L41
  177. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L47
  178. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L47
  179. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L57
  180. abstract-method:
    Method 'select_option' is abstract in class 'SelectEntity' but is not overridden in child class 'PlugwiseSelectEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L81
  181. invalid-overridden-method:
    Method 'current_option' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L102
  182. invalid-overridden-method:
    Method 'options' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/select.py#L107
  183. magic-value-comparison:
    Consider using a named constant or an enum instead of ''Adam''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L44
  184. magic-value-comparison:
    Consider using a named constant or an enum instead of ''climate''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L48
  185. unused-argument:
    Unused argument 'hass'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L31
  186. abstract-method:
    Method 'set_fan_mode' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  187. abstract-method:
    Method 'set_humidity' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  188. abstract-method:
    Method 'set_hvac_mode' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  189. abstract-method:
    Method 'set_preset_mode' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  190. abstract-method:
    Method 'set_swing_horizontal_mode' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  191. abstract-method:
    Method 'set_swing_mode' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  192. abstract-method:
    Method 'set_temperature' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  193. abstract-method:
    Method 'toggle' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  194. abstract-method:
    Method 'turn_aux_heat_off' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  195. abstract-method:
    Method 'turn_aux_heat_on' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  196. abstract-method:
    Method 'turn_off' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  197. abstract-method:
    Method 'turn_on' is abstract in class 'ClimateEntity' but is not overridden in child class 'PlugwiseClimateEntity'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  198. too-many-instance-attributes:
    Too many instance attributes (11/7)
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L62
  199. magic-value-comparison:
    Consider using a named constant or an enum instead of ''Adam''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L91
  200. redefined-variable-type:
    Redefinition of self._attr_supported_features type from homeassistant.components.climate.const.ClimateEntityFeature.TARGET_TEMPERATURE to homeassistant.components.climate.const.ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L92
  201. magic-value-comparison:
    Consider using a named constant or an enum instead of ''regulation_modes''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L117
  202. magic-value-comparison:
    Consider using a named constant or an enum instead of ''cooling''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L118
  203. consider-using-assignment-expr:
    Use 'if (mode := self._gateway_data['select_regulation_mode']) in ('cooling', 'heating'):' instead
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L121
  204. use-set-for-membership:
    Consider using set for membership test
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L121
  205. unused-argument:
    Unused argument 'coordinator'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L110
  206. invalid-overridden-method:
    Method 'current_temperature' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L125
  207. invalid-overridden-method:
    Method 'target_temperature' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L130
  208. invalid-overridden-method:
    Method 'target_temperature_high' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L139
  209. invalid-overridden-method:
    Method 'target_temperature_low' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L147
  210. invalid-overridden-method:
    Method 'hvac_mode' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L155
  211. invalid-overridden-method:
    Method 'hvac_modes' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L164
  212. magic-value-comparison:
    Consider using a named constant or an enum instead of ''regulation_modes''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L167
  213. magic-value-comparison:
    Consider using a named constant or an enum instead of ''available_schedules''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L170
  214. magic-value-comparison:
    Consider using a named constant or an enum instead of ''regulation_modes''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L174
  215. magic-value-comparison:
    Consider using a named constant or an enum instead of ''cooling''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L175
  216. magic-value-comparison:
    Consider using a named constant or an enum instead of ''heating''.
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L177
  217. invalid-overridden-method:
    Method 'hvac_action' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L187
  218. invalid-overridden-method:
    Method 'preset_mode' was expected to be 'method', found it instead as 'property'
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/climate.py#L197
  219. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L46
  220. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L46
  221. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L46
  222. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L46
  223. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L46
  224. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L54
  225. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L54
  226. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L54
  227. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L54
  228. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L54
  229. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L62
  230. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L62
  231. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L62
  232. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L62
  233. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L62
  234. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L70
  235. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L70
  236. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L70
  237. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L70
  238. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L77
  239. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L77
  240. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L77
  241. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L77
  242. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L77
  243. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L85
  244. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L85
  245. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L85
  246. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L85
  247. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L85
  248. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L93
  249. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L93
  250. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L93
  251. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L93
  252. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L100
  253. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L100
  254. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L100
  255. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L100
  256. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L100
  257. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L108
  258. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L108
  259. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L108
  260. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L108
  261. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L108
  262. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L116
  263. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L116
  264. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L116
  265. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_category' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L116
  266. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L116
  267. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L124
  268. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L124
  269. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L124
  270. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L124
  271. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L131
  272. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L131
  273. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L131
  274. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L131
  275. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_registry_enabled_default' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L131
  276. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L139
  277. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L139
  278. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L139
  279. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L139
  280. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L146
  281. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L146
  282. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L146
  283. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L146
  284. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L153
  285. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L153
  286. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L153
  287. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L153
  288. unexpected-keyword-arg:
    Unexpected keyword argument 'translation_key' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L160
  289. unexpected-keyword-arg:
    Unexpected keyword argument 'native_unit_of_measurement' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L160
  290. unexpected-keyword-arg:
    Unexpected keyword argument 'device_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L160
  291. unexpected-keyword-arg:
    Unexpected keyword argument 'state_class' in constructor call
    https://github.com/home-assistant/core/blob/03707e6308628b6010045282d5e8b522bdd932dc/homeassistant/components/plugwise/sensor.py#L160
  292. unexpected-keyword-arg:
    Unexpected keyword argument 'entity_registry_enabled_default' in constructor call
    https://github.com/h...

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

This comment was generated for commit 04e2cee

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Awesome!

If Pierre agrees let's merge this!

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Uhhh, this seems to fail CI? 😅

Is that an actual failure? And if so, do you understand why?

@jzohrab
Copy link
Author

jzohrab commented Dec 19, 2024

Will check it out, thank you @DanielNoord.

@jzohrab
Copy link
Author

jzohrab commented Dec 19, 2024

@DanielNoord - this failure actually exists in commit cb12577, immediately prior to my two new commits.

I went back a bit just using git reset, and unless there are steps that I'm missing, at appears that this error has been present since at least 713e563 (Thu Oct 5 22:12:56 2023 +0200, Merge branch 'maintenance/3.0.x' into merge-maintenance-into-main):

$ pytest -k test_one_module_fatal_error

...
>       assert pylint_code == code, msg
E       AssertionError: expected output status 1, got 3. Below pylint output: 
E         ************* Module /Users/jeff/Documents/Projects/pylint/tests/garbagePath.py
E         tests/garbagePath.py:1:0: F0001: No module named tests/garbagePath.py (fatal)
E         ************* Module conftest
E         tests/conftest.py:10:0: E0401: Unable to import 'collections.abc' (import-error)
E         
E         -----------------------------------
E         Your code has been rated at 0.00/10
E         
E         
E       assert 3 == 1

I haven't read the tests, but I'm assuming that each test can be run independently (no global state trash etc). When I run all of the tests as at that commit 713e563, I get a bunch of failures, including that bad test FAILED tests/test_self.py::TestRunTC::test_one_module_fatal_error - AssertionError: expected output status 1, got 3. Below pylint output:

Just for fun, rechecking cb12577 which was the base of my branch:

HEAD is now at cb125773c [skip ci] Add python 3.13 to tox configuration
(venv) MacBook-Pro:pylint jeff$ pytest
...
FAILED tests/test_self.py::TestRunTC::test_one_module_fatal_error - AssertionError: expected output status 1, got 3. Below pylint output: 
================================= 24 failed, ... etc

I got few failures than the older commit, but that same test failed (on my machine).

@jzohrab
Copy link
Author

jzohrab commented Dec 19, 2024

If we change the code=1 arg to 3, that test now passes (locally), though I have no idea why.

    def test_one_module_fatal_error(self) -> None:
        """Fatal errors in one of several modules linted still exits non-zero."""
        valid_path = join(HERE, "conftest.py")
        invalid_path = join(HERE, "garbagePath.py")
        self._runtest([valid_path, invalid_path, "--disable=C"], code=3)

Here's git blame for that function, it's been around a while:

6417e8cdee (Pierre Sassoulas      2022-07-14     def test_one_module_fatal_error(self) -> None:
fffde57ac0 (Daniël van Noord      2022-01-02         """Fatal errors in one of several modules linted still exits non-zero."""
af8cc2e750 (Jacob Walls           2021-12-14         valid_path = join(HERE, "conftest.py")
af8cc2e750 (Jacob Walls           2021-12-14         invalid_path = join(HERE, "garbagePath.py")
8482d2ee74 (Pierre Sassoulas      2022-04-22         self._runtest([valid_path, invalid_path, "--disable=C"], code=1)

Cheers!

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.

As the list of FileItems is very lightweight

I'm not sure this is always true, and I'm not sure it's the main consideration. We need to understand why it was done this way before changing it (the first implementation is not often an iterator for no good reasons).

I don't have the time to read everything to confirm it right now but it seems this is required for multiprocessing, I dug into the git history and here's the MR that introduced this:

#3016

Last comment might be interesting: #3016 (comment)

@jzohrab
Copy link
Author

jzohrab commented Dec 19, 2024

Hi @Pierre-Sassoulas , thanks for checking. I was basing this on my review of the code, but that may not have been deep enough.

You know, the only reason I suggested this change was to allow for a progress message, “linting 1000 files” eg. Instead of making any changes, I could just make a 2 line function to get the count of items, using mostly the same logic as in the iterator method, which is only called when needed. Would that feel better to you? If yes, this PR can be closed and I can add that in my smaller progress logging draft PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs decision 🔒 Needs a decision before implemention or rejection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants