mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Add typing to maths/add.py (#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
This commit is contained in:
@ -3,7 +3,7 @@ Just to check
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def add(a, b):
|
def add(a: float, b: float) -> float:
|
||||||
"""
|
"""
|
||||||
>>> add(2, 2)
|
>>> add(2, 2)
|
||||||
4
|
4
|
||||||
|
Reference in New Issue
Block a user