Add ruff rules PIE790, PIE794, PIE807, PIE810 (#113617)
This commit is contained in:
parent
cbe2a5883b
commit
0b9c9aff62
25 changed files with 29 additions and 47 deletions
|
@ -36,7 +36,7 @@ class UptimeRobotConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
errors: dict[str, str] = {}
|
||||
response: UptimeRobotApiResponse | UptimeRobotApiError | None = None
|
||||
key: str = data[CONF_API_KEY]
|
||||
if key.startswith("ur") or key.startswith("m"):
|
||||
if key.startswith(("ur", "m")):
|
||||
LOGGER.error("Wrong API key type detected, use the 'main' API key")
|
||||
errors["base"] = "not_main_key"
|
||||
return errors, None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue