Skip to content

Commit

Permalink
Formatted with black
Browse files Browse the repository at this point in the history
  • Loading branch information
HenningTimm committed Mar 25, 2024
1 parent ae852d6 commit 6e9af05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions tests/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ def test_minimal_valid_example_convert():
path_expected = "tests/valid/minimal_working_example_expected.tsv"
path_output = "/tmp/y2b_mwe.tsv"
result = runner.invoke(
yml2block.__main__.main, ["convert", "tests/valid/minimal_working_example.yml", "-o", path_output]
yml2block.__main__.main,
["convert", "tests/valid/minimal_working_example.yml", "-o", path_output],
)
print(result)
print(result.stdout)
assert result.exit_code == 0, result.stdout
with open(path_output, "r") as converted_file, open(path_expected, "r") as expected_file:
with open(path_output, "r") as converted_file, open(
path_expected, "r"
) as expected_file:
converted_tsv = converted_file.read()
expected_tsv = expected_file.read()
assert converted_tsv == expected_tsv
Expand Down
4 changes: 3 additions & 1 deletion yml2block/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ def return_violations(lint_violations, warn_ec, verbose):
print("Errors detected. File(s) cannot safely be converted to TSV.")
sys.exit(1)
elif max_severity == Level.WARNING:
print("Warnings detected. File(s) can probably not be safely converted to TSV.")
print(
"Warnings detected. File(s) can probably not be safely converted to TSV."
)
sys.exit(warn_ec)
elif max_severity == Level.NONE:
print("\nAll Checks passed! 🎉 Safe covnersion is possible.\n\n")
Expand Down

0 comments on commit 6e9af05

Please sign in to comment.