diff --git a/pyproject.toml b/pyproject.toml index 1cb71f7..0d59e60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ tests = ["pytest"] "Bug Reports" = "https://github.com/ultralytics/template/issues" "Changelog" = "https://github.com/ultralytics/template/releases" -# [project.scripts] # Optional +[project.scripts] # Optional sample = "sample:main" # executes the function `main` from this package when "template sample" is run from CLI # Tools settings ------------------------------------------------------------------------------------------------------- diff --git a/template/module1.py b/template/module1.py index fc3c13f..a001cd6 100644 --- a/template/module1.py +++ b/template/module1.py @@ -2,27 +2,5 @@ def add_numbers(a, b): - """ - Adds two numbers and returns the sum. - Args: - a (float | int): The first number in the addition. - b (float | int): The second number in the addition. - - Returns: - (float | int): The sum of `a` and `b`. - - Notes: - This function supports both integer and floating-point numbers. The returned value will match the type of the input - values unless they're mixed, in which case a float is returned. - - Examples: - ```python - result = add_numbers(3, 5) - assert result == 8 - - result = add_numbers(3.5, 2) - assert result == 5.5 - ``` - """ return a + b diff --git a/tests/test_module1.py b/tests/test_module1.py index 14302ef..570b04f 100644 --- a/tests/test_module1.py +++ b/tests/test_module1.py @@ -4,20 +4,6 @@ def test_add_numbers(): - """ - Test the add_numbers function from module1 by verifying the correctness of summation operation between pairs of - integers. - - Tests: - - Ensures that the sum of 2 and 3 equals 5. - - Validates that the sum of -1 and 1 equals 0. - - Returns: - (None): This function performs assertions to validate the behavior of add_numbers. It does not return a value. - - Raises: - AssertionError: If any of the assertions fail, this error is raised indicating a test case failure. - """ assert add_numbers(2, 3) == 5 assert add_numbers(-1, 1) == 0 assert add_numbers(-1, -1) == -2