mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Use float instead of Union[int, float] (#2308)
This commit is contained in:
committed by
Jelle Zijlstra
parent
2a888416b2
commit
5bb58af6c8
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]: ...
|
||||
|
||||
2
third_party/3/typed_ast/ast3.pyi
vendored
2
third_party/3/typed_ast/ast3.pyi
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user