feat: add addition function and its test-function

This commit is contained in:
Jan D BM 2026-02-20 16:32:52 +01:00
parent 0ae176e3e9
commit cde7c8ecd2
3 changed files with 23 additions and 1 deletions

18
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: ruff # Linting
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black # formatting

View File

@ -4,3 +4,7 @@ def addition(a=1, b=2):
def f(x: int, y: int) -> int: def f(x: int, y: int) -> int:
return x + y return x + y
if __name__ == "__main__":
print(addition(5, 5))

View File

@ -3,4 +3,4 @@ from src.moduleA import addition
def test_a(): def test_a():
assert addition() == 3 assert addition() == 3
assert addition(5, 5) == 10 assert addition(5, 5) == 10