Import probatio directly instead of aliasing it as vol (#182595)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Joost Lekkerkerker
2026-09-18 16:48:52 +02:00
committed by GitHub
co-authored by Claude epenet Copilot Autofix powered by AI
parent b29d2abbb8
commit 69c2215121
2 changed files with 11 additions and 7 deletions
@@ -5,7 +5,7 @@ from typing import Any, override
import diematic_modbus
from modbus_connection import ModbusError, ModbusTcpParams
import probatio as vol
import probatio
from homeassistant.components.modbus import async_get_temporary_unit
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
@@ -31,20 +31,20 @@ from .const import (
_LOGGER = logging.getLogger(__name__)
STEP_USER_DATA_SCHEMA = vol.Schema(
STEP_USER_DATA_SCHEMA = probatio.Schema(
{
vol.Required(CONF_HOST): TextSelector(),
vol.Required(CONF_PORT, default=DEFAULT_PORT): vol.All(
probatio.Required(CONF_HOST): TextSelector(),
probatio.Required(CONF_PORT, default=DEFAULT_PORT): probatio.All(
NumberSelector(
NumberSelectorConfig(mode=NumberSelectorMode.BOX, min=1, max=65535)
),
vol.Coerce(int),
probatio.Coerce(int),
),
vol.Required(CONF_UNIT_ID, default=DEFAULT_UNIT_ID): vol.All(
probatio.Required(CONF_UNIT_ID, default=DEFAULT_UNIT_ID): probatio.All(
NumberSelector(
NumberSelectorConfig(mode=NumberSelectorMode.BOX, min=1, max=247)
),
vol.Coerce(int),
probatio.Coerce(int),
),
}
)
+4
View File
@@ -662,6 +662,7 @@ select = [
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"ICN001", # import concentions; {name} should be imported as {asname}
"ICN002", # import conventions; {name} should not be imported as {asname}
"LOG", # flake8-logging
"N804", # First argument of a class method should be named cls
"N805", # First argument of a method should be named self
@@ -840,6 +841,9 @@ ignore = [
"homeassistant.util.uuid" = "uuid_util"
"homeassistant.util.yaml" = "yaml_util"
[tool.ruff.lint.flake8-import-conventions.banned-aliases]
"probatio" = ["vol"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false