mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 12:02:19 +08:00
use _typeshed's Path aliases (#4214)
This commit is contained in:
@@ -1,27 +1,19 @@
|
||||
# Stubs for trace (Python 2 and 3)
|
||||
|
||||
import os
|
||||
import sys
|
||||
from _typeshed import StrPath
|
||||
import types
|
||||
from typing import Any, Callable, Mapping, Optional, Sequence, Text, Tuple, TypeVar, Union
|
||||
from typing import Any, Callable, Mapping, Optional, Sequence, Tuple, TypeVar, Union
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_localtrace = Callable[[types.FrameType, str, Any], Callable[..., Any]]
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
_Path = Union[Text, os.PathLike]
|
||||
else:
|
||||
_Path = Text
|
||||
|
||||
class CoverageResults:
|
||||
def update(self, other: CoverageResults) -> None: ...
|
||||
def write_results(self, show_missing: bool = ..., summary: bool = ..., coverdir: Optional[_Path] = ...) -> None: ...
|
||||
def write_results_file(self, path: _Path, lines: Sequence[str], lnotab: Any, lines_hit: Mapping[int, int], encoding: Optional[str] = ...) -> Tuple[int, int]: ...
|
||||
def write_results(self, show_missing: bool = ..., summary: bool = ..., coverdir: Optional[StrPath] = ...) -> None: ...
|
||||
def write_results_file(self, path: StrPath, lines: Sequence[str], lnotab: Any, lines_hit: Mapping[int, int], encoding: Optional[str] = ...) -> Tuple[int, int]: ...
|
||||
|
||||
class Trace:
|
||||
def __init__(self, count: int = ..., trace: int = ..., countfuncs: int = ..., countcallers: int = ...,
|
||||
ignoremods: Sequence[str] = ..., ignoredirs: Sequence[str] = ..., infile: Optional[_Path] = ...,
|
||||
outfile: Optional[_Path] = ..., timing: bool = ...) -> None: ...
|
||||
ignoremods: Sequence[str] = ..., ignoredirs: Sequence[str] = ..., infile: Optional[StrPath] = ...,
|
||||
outfile: Optional[StrPath] = ..., timing: bool = ...) -> None: ...
|
||||
def run(self, cmd: Union[str, types.CodeType]) -> None: ...
|
||||
def runctx(self, cmd: Union[str, types.CodeType], globals: Optional[Mapping[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ...) -> None: ...
|
||||
def runfunc(self, func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user