formats/v1: add type hints
Add type hints to most arguments and return types to aid editors and type checking.
This commit is contained in:
parent
aaf61ce9fc
commit
b49ee53d0a
1 changed files with 3 additions and 2 deletions
|
|
@ -1,9 +1,10 @@
|
|||
# Version 1 of the manifest description
|
||||
|
||||
from typing import Dict
|
||||
from ..pipeline import Pipeline, detect_host_runner
|
||||
|
||||
|
||||
def load_build(description, sources_options):
|
||||
def load_build(description: Dict, sources_options: Dict):
|
||||
pipeline = description.get("pipeline")
|
||||
if pipeline:
|
||||
build_pipeline = load(pipeline, sources_options)
|
||||
|
|
@ -13,7 +14,7 @@ def load_build(description, sources_options):
|
|||
return build_pipeline, description["runner"]
|
||||
|
||||
|
||||
def load(description, sources_options):
|
||||
def load(description: Dict, sources_options: Dict) -> Pipeline:
|
||||
build = description.get("build")
|
||||
if build:
|
||||
build_pipeline, runner = load_build(build, sources_options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue