mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Enable error-code truthy-iterable
[mypy 1.0] (#87596)
This commit is contained in:
parent
aa00114c2f
commit
42008c50f3
@ -418,7 +418,7 @@ class EntityPlatform:
|
|||||||
This method must be run in the event loop.
|
This method must be run in the event loop.
|
||||||
"""
|
"""
|
||||||
# handle empty list from component/platform
|
# handle empty list from component/platform
|
||||||
if not new_entities:
|
if not new_entities: # type: ignore[truthy-iterable]
|
||||||
return
|
return
|
||||||
|
|
||||||
hass = self.hass
|
hass = self.hass
|
||||||
|
2
mypy.ini
2
mypy.ini
@ -14,7 +14,7 @@ warn_incomplete_stub = true
|
|||||||
warn_redundant_casts = true
|
warn_redundant_casts = true
|
||||||
warn_unused_configs = true
|
warn_unused_configs = true
|
||||||
warn_unused_ignores = true
|
warn_unused_ignores = true
|
||||||
enable_error_code = ignore-without-code
|
enable_error_code = ignore-without-code, truthy-iterable
|
||||||
disable_error_code = annotation-unchecked
|
disable_error_code = annotation-unchecked
|
||||||
strict_concatenate = false
|
strict_concatenate = false
|
||||||
check_untyped_defs = true
|
check_untyped_defs = true
|
||||||
|
@ -48,7 +48,7 @@ GENERAL_SETTINGS: Final[dict[str, str]] = {
|
|||||||
"warn_redundant_casts": "true",
|
"warn_redundant_casts": "true",
|
||||||
"warn_unused_configs": "true",
|
"warn_unused_configs": "true",
|
||||||
"warn_unused_ignores": "true",
|
"warn_unused_ignores": "true",
|
||||||
"enable_error_code": ", ".join(["ignore-without-code"]),
|
"enable_error_code": ", ".join(["ignore-without-code", "truthy-iterable"]),
|
||||||
"disable_error_code": ", ".join(["annotation-unchecked"]),
|
"disable_error_code": ", ".join(["annotation-unchecked"]),
|
||||||
# Strict_concatenate breaks passthrough ParamSpec typing
|
# Strict_concatenate breaks passthrough ParamSpec typing
|
||||||
"strict_concatenate": "false",
|
"strict_concatenate": "false",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user