python: add type hints

This commit is contained in:
Max Kellermann
2023-09-16 23:23:18 +02:00
parent dd89ea4505
commit 3f2016e552
9 changed files with 68 additions and 54 deletions

@ -1,9 +1,10 @@
import subprocess
from typing import Union
def run_quilt(toolchain, cwd, patches_path, *args):
def run_quilt(toolchain, cwd: str, patches_path: str, *args: str) -> None:
env = dict(toolchain.env)
env['QUILT_PATCHES'] = patches_path
subprocess.check_call(['quilt'] + list(args), cwd=cwd, env=env)
def push_all(toolchain, src_path, patches_path):
def push_all(toolchain, src_path: str, patches_path: str) -> None:
run_quilt(toolchain, src_path, patches_path, 'push', '-a')