Skip to content

Commit d787dbe

Browse files
fabianhjrmatthiaskramm
authored andcommitted
Add conditional floor for Python 3.x (#380)
1 parent c1b1297 commit d787dbe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stdlib/2and3/math.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ def exp(x: float) -> float: ...
2929
def expm1(x: float) -> float: ...
3030
def fabs(x: float) -> float: ...
3131
def factorial(x: int) -> int: ...
32-
def floor(x: float) -> float: ...
32+
if sys.version_info >= (3,):
33+
def floor(x: float) -> int: ...
34+
else:
35+
def floor(x: float) -> float: ... # type: ignore
3336
def fmod(x: float, y: float) -> float: ...
3437
def frexp(x: float) -> Tuple[float, int]: ...
3538
def fsum(iterable: Iterable) -> float: ...

0 commit comments

Comments
 (0)