Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7ad6c64

Browse files
authoredOct 13, 2022
Add typing to maths/add.py (TheAlgorithms#7064)
* Add typing to maths/add.py https://stackoverflow.com/questions/50928592/mypy-type-hint-unionfloat-int-is-there-a-number-type * Update add.py * Update add.py
1 parent 6118b05 commit 7ad6c64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎maths/add.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55

6-
def add(a, b):
6+
def add(a: float, b: float) -> float:
77
"""
88
>>> add(2, 2)
99
4

0 commit comments

Comments
 (0)
Please sign in to comment.