Use float instead of Union[int, float] (#2308)

This commit is contained in:
Yusuke Miyazaki
2018-07-10 11:02:03 +09:00
committed by Jelle Zijlstra
parent 2a888416b2
commit 5bb58af6c8
5 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
import typing
from typing import Optional, Union
from typing import Optional
__version__ = ... # type: str
@@ -215,7 +215,7 @@ class Repr(expr):
value = ... # type: expr
class Num(expr):
n = ... # type: Union[int, float]
n = ... # type: float
class Str(expr):
s = ... # type: str

View File

@@ -1,6 +1,6 @@
import sys
import typing
from typing import Any, Optional, Union, ClassVar
from typing import Any, Optional, ClassVar
PyCF_ONLY_AST = ... # type: int
@@ -233,7 +233,7 @@ class Call(expr):
keywords = ... # type: typing.List[keyword]
class Num(expr):
n = ... # type: Union[int, float]
n = ... # type: float
class Str(expr):
s = ... # type: str

View File

@@ -66,7 +66,7 @@ class AbstractEventLoop(metaclass=ABCMeta):
@abstractmethod
def call_soon(self, callback: Callable[..., Any], *args: Any) -> Handle: ...
@abstractmethod
def call_later(self, delay: Union[int, float], callback: Callable[..., Any], *args: Any) -> Handle: ...
def call_later(self, delay: float, callback: Callable[..., Any], *args: Any) -> Handle: ...
@abstractmethod
def call_at(self, when: float, callback: Callable[..., Any], *args: Any) -> Handle: ...
@abstractmethod

View File

@@ -46,7 +46,7 @@ class ExecutionLoader(InspectLoader):
def get_code(self, fullname: str) -> Optional[types.CodeType]: ...
class SourceLoader(ResourceLoader, ExecutionLoader, metaclass=ABCMeta):
def path_mtime(self, path: _Path) -> Union[int, float]: ...
def path_mtime(self, path: _Path) -> float: ...
def set_data(self, path: _Path, data: bytes) -> None: ...
def get_source(self, fullname: str) -> Optional[str]: ...
def path_stats(self, path: _Path) -> Mapping[str, Any]: ...

View File

@@ -260,7 +260,7 @@ class Call(expr):
keywords = ... # type: typing.List[keyword]
class Num(expr):
n = ... # type: Union[int, float]
n = ... # type: float
class Str(expr):
s = ... # type: str