Skip to content

Commit

Permalink
Formatting corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
adnaniazi committed Aug 15, 2023
1 parent fb8a88d commit 34a5a61
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.testing.pytestEnabled": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
}
7 changes: 4 additions & 3 deletions src/capfinder/add.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
def add(a:int,b:int,c:int)->int:
def add(a: int, b: int, c: int) -> int:
"""
Add three numbers together
param a: first number
param b: second number
param c: third number
return: sum of a, b, and c
"""
return a+b+c
return a + b + c


if __name__ == "__main__":
print(add(1,2,3))
print(add(1, 2, 3))
6 changes: 4 additions & 2 deletions tests/test_add.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import pytest
from capfinder.add import add


def test_add_function():
result = add(1, 2, 3)
assert result == 6, "Incorrect sum"



if __name__ == "__main__":
test_add_function()
test_add_function()

0 comments on commit 34a5a61

Please sign in to comment.