Fix implicit-return in macos script (#122945)

This commit is contained in:
epenet 2024-08-02 15:30:29 +02:00 committed by GitHub
parent e734971d33
commit b609f8e962
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@ def uninstall_osx():
print("Home Assistant has been uninstalled.")
def run(args):
def run(args: list[str]) -> int:
"""Handle OSX commandline script."""
commands = "install", "uninstall", "restart"
if not args or args[0] not in commands:
@ -63,3 +63,5 @@ def run(args):
time.sleep(0.5)
install_osx()
return 0
raise ValueError(f"Invalid command {args[0]}")