mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
inspect.getmoduleinfo was removed in 3.6 (#1318)
Compare https://docs.python.org/3.5/library/inspect.html#inspect.getmoduleinfo and https://docs.python.org/3.6/library/inspect.html
This commit is contained in:
committed by
Matthias Kramm
parent
cca81d864a
commit
4ea798b869
@@ -1,5 +1,4 @@
|
||||
# Stubs for inspect
|
||||
|
||||
import sys
|
||||
from typing import (AbstractSet, Any, Tuple, List, Dict, Callable, Generator,
|
||||
Mapping, MutableMapping, NamedTuple, Optional, Sequence, Union,
|
||||
)
|
||||
@@ -8,15 +7,17 @@ from types import FrameType, ModuleType, TracebackType
|
||||
#
|
||||
# Types and members
|
||||
#
|
||||
ModuleInfo = NamedTuple('ModuleInfo', [('name', str),
|
||||
('suffix', str),
|
||||
('mode', str),
|
||||
('module_type', int),
|
||||
])
|
||||
if sys.version_info < (3, 6):
|
||||
ModuleInfo = NamedTuple('ModuleInfo', [('name', str),
|
||||
('suffix', str),
|
||||
('mode', str),
|
||||
('module_type', int),
|
||||
])
|
||||
def getmoduleinfo(path: str) -> Optional[ModuleInfo]: ...
|
||||
|
||||
def getmembers(object: object,
|
||||
predicate: Callable[[Any], bool] = ...,
|
||||
) -> List[Tuple[str, Any]]: ...
|
||||
def getmoduleinfo(path: str) -> Optional[ModuleInfo]: ...
|
||||
def getmodulename(path: str) -> Optional[str]: ...
|
||||
|
||||
def ismodule(object: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user