mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Enable Ruff RUF017 (#121693)
This commit is contained in:
parent
1e0c03257c
commit
319fdf42c3
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import functools
|
||||||
|
import operator
|
||||||
from types import MappingProxyType
|
from types import MappingProxyType
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@ -74,7 +76,7 @@ def tts_options_schema(
|
|||||||
): SelectSelector(
|
): SelectSelector(
|
||||||
SelectSelectorConfig(
|
SelectSelectorConfig(
|
||||||
mode=SelectSelectorMode.DROPDOWN,
|
mode=SelectSelectorMode.DROPDOWN,
|
||||||
options=["", *sum(voices.values(), [])],
|
options=["", *functools.reduce(operator.iadd, voices.values(), [])],
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
vol.Optional(
|
vol.Optional(
|
||||||
|
@ -746,6 +746,7 @@ select = [
|
|||||||
"RUF006", # Store a reference to the return value of asyncio.create_task
|
"RUF006", # Store a reference to the return value of asyncio.create_task
|
||||||
"RUF010", # Use explicit conversion flag
|
"RUF010", # Use explicit conversion flag
|
||||||
"RUF013", # PEP 484 prohibits implicit Optional
|
"RUF013", # PEP 484 prohibits implicit Optional
|
||||||
|
"RUF017", # Avoid quadratic list summation
|
||||||
"RUF018", # Avoid assignment expressions in assert statements
|
"RUF018", # Avoid assignment expressions in assert statements
|
||||||
"RUF019", # Unnecessary key check before dictionary access
|
"RUF019", # Unnecessary key check before dictionary access
|
||||||
# "RUF100", # Unused `noqa` directive; temporarily every now and then to clean them up
|
# "RUF100", # Unused `noqa` directive; temporarily every now and then to clean them up
|
||||||
|
Loading…
x
Reference in New Issue
Block a user