Skip to content

Commit 1422fce

Browse files
authored
pstats: fix stream type, add class var (#3862)
Co-authored-by: hauntsaninja <>
1 parent 2be4dca commit 1422fce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

stdlib/2and3/pstats.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from profile import Profile
22
from cProfile import Profile as _cProfile
33
import os
44
import sys
5-
from typing import Any, Dict, IO, Iterable, List, Text, Tuple, TypeVar, Union, overload
5+
from typing import Any, Dict, IO, Iterable, List, Optional, Text, Tuple, TypeVar, Union, overload
66

77
_Selector = Union[str, float, int]
88
_T = TypeVar('_T', bound=Stats)
@@ -12,9 +12,10 @@ else:
1212
_Path = Union[bytes, Text]
1313

1414
class Stats:
15+
sort_arg_dict_default: Dict[str, Tuple[Any, str]]
1516
def __init__(self: _T, __arg: Union[None, str, Text, Profile, _cProfile] = ...,
1617
*args: Union[None, str, Text, Profile, _cProfile, _T],
17-
stream: IO[Any] = ...) -> None: ...
18+
stream: Optional[IO[Any]] = ...) -> None: ...
1819
def init(self, arg: Union[None, str, Text, Profile, _cProfile]) -> None: ...
1920
def load_stats(self, arg: Union[None, str, Text, Profile, _cProfile]) -> None: ...
2021
def get_top_level_stats(self) -> None: ...

tests/stubtest_whitelists/py3_common.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,6 @@ posix.uname_result._replace
596596
posix.waitid_result._asdict
597597
posix.waitid_result._make
598598
posix.waitid_result._replace
599-
pstats.Stats.__init__
600599
pwd.getpwnam
601600
pydoc.HTMLDoc.docdata
602601
pydoc.HTMLDoc.docproperty

0 commit comments

Comments
 (0)