mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Increase test coverage in Brother integration (#51657)
This commit is contained in:
parent
443463e19d
commit
4e0c9dd18c
@ -30,9 +30,9 @@ def host_valid(host: str) -> bool:
|
||||
if ipaddress.ip_address(host).version in [4, 6]:
|
||||
return True
|
||||
except ValueError:
|
||||
disallowed = re.compile(r"[^a-zA-Z\d\-]")
|
||||
return all(x and not disallowed.search(x) for x in host.split("."))
|
||||
return False
|
||||
pass
|
||||
disallowed = re.compile(r"[^a-zA-Z\d\-]")
|
||||
return all(x and not disallowed.search(x) for x in host.split("."))
|
||||
|
||||
|
||||
class BrotherConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
|
Loading…
x
Reference in New Issue
Block a user