Skip to content

Commit 77ff987

Browse files
authored
Add some missing attribute annotations to trace.pyi (#11091)
1 parent d067f20 commit 77ff987

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

stdlib/trace.pyi

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
import types
3-
from _typeshed import StrPath, TraceFunction
4-
from collections.abc import Callable, Mapping, Sequence
3+
from _typeshed import Incomplete, StrPath, TraceFunction
4+
from collections.abc import Callable, Iterable, Mapping, Sequence
55
from typing import Any, TypeVar
66
from typing_extensions import ParamSpec, TypeAlias
77

@@ -12,6 +12,12 @@ _P = ParamSpec("_P")
1212
_FileModuleFunction: TypeAlias = tuple[str, str | None, str]
1313

1414
class CoverageResults:
15+
counts: dict[tuple[str, int], int]
16+
counter: dict[tuple[str, int], int]
17+
calledfuncs: dict[_FileModuleFunction, int]
18+
callers: dict[tuple[_FileModuleFunction, _FileModuleFunction], int]
19+
inifile: StrPath | None
20+
outfile: StrPath | None
1521
def __init__(
1622
self,
1723
counts: dict[tuple[str, int], int] | None = None,
@@ -27,7 +33,21 @@ class CoverageResults:
2733
) -> tuple[int, int]: ...
2834
def is_ignored_filename(self, filename: str) -> bool: ... # undocumented
2935

36+
class _Ignore:
37+
def __init__(self, modules: Iterable[str] | None = None, dirs: Iterable[StrPath] | None = None) -> None: ...
38+
def names(self, filename: str, modulename: str) -> int: ...
39+
3040
class Trace:
41+
inifile: StrPath | None
42+
outfile: StrPath | None
43+
ignore: _Ignore
44+
counts: dict[str, int]
45+
pathtobasename: dict[Incomplete, Incomplete]
46+
donothing: int
47+
trace: int
48+
start_time: int | None
49+
globaltrace: TraceFunction
50+
localtrace: TraceFunction
3151
def __init__(
3252
self,
3353
count: int = 1,

0 commit comments

Comments
 (0)