Make use of str.removeprefix and .removesuffix (#85584)

This commit is contained in:
Ville Skyttä 2023-01-13 13:19:38 +02:00 committed by GitHub
parent d44210e573
commit ae302bbec0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 33 additions and 52 deletions

View file

@ -702,7 +702,7 @@ async def websocket_get_version(
for req in integration.requirements:
if req.startswith("home-assistant-frontend=="):
frontend = req.split("==", 1)[1]
frontend = req.removeprefix("home-assistant-frontend==")
if frontend is None:
connection.send_error(msg["id"], "unknown_version", "Version not found")