Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-el committed Jan 16, 2025
1 parent 3a15707 commit 694da3a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion komodo/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import itertools
import re
from typing import Iterator, Sequence, Tuple, Optional, Dict
from typing import Dict, Iterator, Optional, Sequence, Tuple


def get_matrix(
Expand Down
9 changes: 7 additions & 2 deletions komodo/release_transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import argparse
import os
import re
from typing import Dict, Union, Optional
from typing import Dict, Optional, Sequence, Union

import yaml
from typing_extensions import Sequence

from komodo.matrix import format_release, get_matrix
from komodo.prettier import load_yaml, write_to_file
Expand Down Expand Up @@ -136,6 +135,9 @@ def transpile_releases(matrix_file: str, output_folder: str, matrix: dict) -> No
Write one dimension file for each element in the matrix
(e.g. rhel7 and py3.8, rhel6 and py3.6).
"""
if not isinstance(matrix, dict):
raise TypeError("Matrix coordinates must be a dictionary")

rhel_versions = matrix.get("rhel", "8")
python_versions = matrix.get("py", "311")
other_versions = None
Expand Down Expand Up @@ -171,6 +173,9 @@ def transpile_releases_for_pip(
repository_file: str,
matrix: dict,
) -> None:
if not isinstance(matrix, dict):
raise TypeError("Matrix coordinates must be a dictionary")

rhel_versions = matrix.get("rhel", "8")
python_versions = matrix.get("py", "311")
other_versions = None
Expand Down
4 changes: 1 addition & 3 deletions tests/test_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,5 @@ def test_get_matrix_base(test_input, expected):
],
)
def test_get_matrix(rhel_ver, py_ver, other_ver, expected_yield):
yielded = []
for mat in matrix.get_matrix(rhel_ver, py_ver, other_ver):
yielded.append(mat)
yielded = list(matrix.get_matrix(rhel_ver, py_ver, other_ver))
assert yielded == expected_yield

0 comments on commit 694da3a

Please sign in to comment.