Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41b3fe2

Browse files
brettcannongvanrossum
authored andcommitted
Add stubs for importlib.__init__ (#314)
* Ignore VS Code * Add stubs for importlib.__init__ Part of #189
1 parent 4a79dec commit 41b3fe2

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ analyze.py
5959
# Editor backup files
6060
*~
6161
.*.sw?
62+
.vscode/

stdlib/3/importlib/__init__.pyi

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import sys
2+
import types
3+
from typing import Any, Mapping, Optional, Sequence
4+
5+
6+
def __import__(name: str, globals: Mapping[str, Any] = None,
7+
locals: Mapping[str, Any] = None, fromlist: Sequence[str] = (),
8+
level: int = 0) -> types.ModuleType: ...
9+
10+
11+
def import_module(name: str, package: str = None) -> types.ModuleType: ...
12+
13+
14+
if sys.version_info >= (3, 3):
15+
# Optionally returns a loader, but importlib.abc doesn't have a stub file.
16+
def find_loader(name: str, path: str = None): ...
17+
18+
19+
def invalidate_caches() -> None: ...
20+
21+
22+
if sys.version_info >= (3, 4):
23+
def reload(module: types.ModuleType) -> types.ModuleType: ...

0 commit comments

Comments
 (0)