Break circle_area function
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2021-11-05 01:12:37 +01:00
parent a09122f1ff
commit 7a944caf44
3 changed files with 12 additions and 5 deletions

9
drone_test/__main__.py Normal file
View File

@@ -0,0 +1,9 @@
"""Python module to test drone builds"""
import sys
from _circle_area import circle_area
if __name__ == '__main__':
for arg in sys.argv[1:]:
print(circle_area(float(arg)))

View File

@@ -1,5 +1,3 @@
"""Python module to test drone builds"""
import math
def circle_area(radius: float):
@@ -9,7 +7,7 @@ def circle_area(radius: float):
:raises ValueError: radius is negative
:return: area of the circle
"""
if radius < 0:
raise ValueError("Circle can't have negative radius")
#if radius < 0:
#raise ValueError("Circle can't have negative radius")
return math.pi * radius ** 2