Skip to content

Commit e07e017

Browse files
committed
test: apply ruff linter
1 parent 017d785 commit e07e017

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/test_snapshot_workflow_yaml.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def test_referenced_job_output_vars_correspond_to_existing_jobs(
2929
# The test is implemented as a pytest test because it's easier to write
3030
# than a custom script.
3131

32-
# GIVEN the supported 'cicd' options, available in 'generate-python' CLI
33-
CICDDesignOption: t.Literal["stable", "experimental"]
32+
CICDDesignOption = t.Literal["stable", "experimental"]
3433

34+
# GIVEN the supported 'cicd' options, available in 'generate-python' CLI
3535
CICD_OPTIONS: t.Set[CICDDesignOption] = {"stable", "experimental"}
3636

3737
# GIVEN the EXPECTED paths to the generated Github Workflows per CICD Option
@@ -48,7 +48,7 @@ def test_referenced_job_output_vars_correspond_to_existing_jobs(
4848
# Sanity check that the generated workflows are not empty, otherwise the test is pointless
4949
assert all_rendered_yaml_workflows, "No generated workflows found!"
5050
assert all(
51-
[type(x) == tuple for x in all_rendered_yaml_workflows]
51+
[type(x) is tuple for x in all_rendered_yaml_workflows]
5252
), "All paths should be tuples of strings"
5353

5454
cicd_option_2_yaml_file_paths: t.Dict[CICDDesignOption, t.Iterable[Path]] = {
@@ -66,10 +66,8 @@ def test_referenced_job_output_vars_correspond_to_existing_jobs(
6666
cicd_option_2_yaml_file_paths.values()
6767
), "No workflows found!"
6868
assert all(
69-
[type(x) == list for x in cicd_option_2_yaml_file_paths.values()]
69+
[type(x) is list for x in cicd_option_2_yaml_file_paths.values()]
7070
), "All values should be lists of paths"
71-
assert type(cicd_option_2_yaml_file_paths['stable']) == list
72-
assert type(cicd_option_2_yaml_file_paths['experimental']) == list
7371

7472
# GIVEN we maintain a registry of the cicd options used at generation time for every Snapshot
7573
snapshot_name_2_cicd_option_value: t.Dict[str, CICDDesignOption] = {

0 commit comments

Comments
 (0)