Skip to content

Commit

Permalink
fix: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-sembira-1 committed Dec 21, 2024
1 parent f6042d6 commit 0bbe711
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/python_package_template/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

4 changes: 2 additions & 2 deletions src/python_package_template/template.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

def template_function(value: int) -> str:
if value < 0:
raise ValueError(f"value can only be a non-negative integer. Got {value=}")
raise ValueError(
f"value can only be a non-negative integer. Got {value=}")
return f"The value is less then {value + 1}"
6 changes: 3 additions & 3 deletions tests/test_template.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import pytest

from python_package_template.template import template_function


@pytest.mark.parametrize(
"value,expected", [(0, "The value is less then 1"), (3, "The value is less then 4")]
)
@pytest.mark.parametrize("value,expected", [(0, "The value is less then 1"),
(3, "The value is less then 4")])
def test_template_function(value: int, expected: str):
assert template_function(value) == expected

Expand Down

0 comments on commit 0bbe711

Please sign in to comment.