diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a00cee1..9afa737 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,9 +10,9 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.3.0 hooks: - - id: ruff # Linting + - id: ruff # Linting - repo: https://github.com/psf/black - rev: stable + rev: 24.4.2 hooks: - id: black # formatting diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd945f2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# README + +neuer Branch -> Übung1 (mit Tag) und PR diff --git a/moduleA.py b/moduleA.py new file mode 100644 index 0000000..b7f0906 --- /dev/null +++ b/moduleA.py @@ -0,0 +1,10 @@ +def addition(a=1, b=2): + return a + b + + +def f(x: int, y: int) -> int: + return x + y + + +if __name__ == "__main__": + print(addition(5, 5)) diff --git a/pyproject.toml b/pyproject.toml index d6609b8..3c32f93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,2 @@ [tool.pytest.ini_options] pythonpath = ["."] - diff --git a/test_moduleA.py b/test_moduleA.py new file mode 100644 index 0000000..42fe6cc --- /dev/null +++ b/test_moduleA.py @@ -0,0 +1,6 @@ +from src.moduleA import addition + + +def test_a(): + assert addition() == 3 + assert addition(5, 5) == 10