Skip to content

Commit

Permalink
fix: fix return type hint for grid(), add a few others (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored May 16, 2024
1 parent c67f240 commit bf0ac9b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/rapids_dependency_file_generator/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def generate_matrix(matrix_arg):
return matrix


def main(argv=None):
def main(argv=None) -> None:
args = validate_args(argv)

parsed_config = load_config_from_file(args.config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def dedupe(
return sorted(string_deps)


def grid(gridspec: dict[str, list[str]]) -> Generator[dict[str, str]]:
def grid(gridspec: dict[str, list[str]]) -> Generator[dict[str, str], None, None]:
"""Yield the Cartesian product of a `dict` of iterables.
The input ``gridspec`` is a dictionary whose keys correspond to
Expand Down Expand Up @@ -281,7 +281,7 @@ def get_output_dir(*, file_type: _config.Output, config_file_path: os.PathLike,
return os.path.join(*path)


def should_use_specific_entry(matrix_combo: dict[str, str], specific_entry_matrix: dict[str, str]):
def should_use_specific_entry(matrix_combo: dict[str, str], specific_entry_matrix: dict[str, str]) -> bool:
"""Check if an entry should be used.
Dependencies listed in the [dependencies.$DEPENDENCY_GROUP.specific]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
SCHEMA = json.loads(importlib.resources.files(__package__).joinpath("schema.json").read_bytes())


def validate_dependencies(dependencies):
def validate_dependencies(dependencies) -> None:
"""Validate a dictionary against the dependencies.yaml spec.
Parameters
Expand Down

0 comments on commit bf0ac9b

Please sign in to comment.