from subprocess import Popen
from typing import List


def systemctl(*args: List[str]):
    Popen(['systemctl'] + list(args))


def start(service: str):
    systemctl('start', service)


def stop(service: str):
    systemctl('stop', service)


def restart(service: str):
    systemctl('restart', service)


def reload(service: str):
    systemctl('reload', service)

from subprocess import Popen
from typing import Tuple


def systemctl(*args: Tuple[str, ...]) -> None:
    Popen(['systemctl'] + list(args))


def disable(*services: Tuple[str, ...]) -> None:
    return systemctl('disable', *services)


def enable(*services: Tuple[str, ...]) -> None:
    return systemctl('enable', *services)


def start(*services: Tuple[str, ...]) -> None:
    return systemctl('start', *services)


def stop(*services: Tuple[str, ...]) -> None:
    return systemctl('stop', *services)


def reload(*services: Tuple[str, ...]) -> None:
    return systemctl('reload', *services)


def restart(services: Tuple[str, ...]) -> None:
    return systemctl('restart', *services)

Add more functions, improve type checking
Add more functions, improve type checking

  from subprocess import Popen
- from typing import List
+ from typing import Tuple
  
  
- def systemctl(*args: List[str]):
+ def systemctl(*args: Tuple[str, ...]) -> None:
      Popen(['systemctl'] + list(args))
  
  
- def start(service: str):
+ def disable(*services: Tuple[str, ...]) -> None:
-     systemctl('start', service)
+     return systemctl('disable', *services)
  
  
- def stop(service: str):
-     systemctl('stop', service)
+ def enable(*services: Tuple[str, ...]) -> None:
+     return systemctl('enable', *services)
  
  
- def restart(service: str):
+ def start(*services: Tuple[str, ...]) -> None:
-     systemctl('restart', service)
+     return systemctl('start', *services)
  
  
- def reload(service: str):
+ def stop(*services: Tuple[str, ...]) -> None:
-     systemctl('reload', service)
+     return systemctl('stop', *services)
  
+ 
+ def reload(*services: Tuple[str, ...]) -> None:
+     return systemctl('reload', *services)
+ 
+ 
+ def restart(services: Tuple[str, ...]) -> None:
+     return systemctl('restart', *services)
+ 
Add more functions, improve type checking
## Code Before:
from subprocess import Popen
from typing import List


def systemctl(*args: List[str]):
    Popen(['systemctl'] + list(args))


def start(service: str):
    systemctl('start', service)


def stop(service: str):
    systemctl('stop', service)


def restart(service: str):
    systemctl('restart', service)


def reload(service: str):
    systemctl('reload', service)

## Instruction:
Add more functions, improve type checking
## Code After:
from subprocess import Popen
from typing import Tuple


def systemctl(*args: Tuple[str, ...]) -> None:
    Popen(['systemctl'] + list(args))


def disable(*services: Tuple[str, ...]) -> None:
    return systemctl('disable', *services)


def enable(*services: Tuple[str, ...]) -> None:
    return systemctl('enable', *services)


def start(*services: Tuple[str, ...]) -> None:
    return systemctl('start', *services)


def stop(*services: Tuple[str, ...]) -> None:
    return systemctl('stop', *services)


def reload(*services: Tuple[str, ...]) -> None:
    return systemctl('reload', *services)


def restart(services: Tuple[str, ...]) -> None:
    return systemctl('restart', *services)
