mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add stubs for importlib.machinery (#323)
* Fix some misspelled method names that were also missing 'self' * Initial stubs for importlib.machinery * Use importlib.machinery.ModuleSpec everywhere
This commit is contained in:
committed by
Guido van Rossum
parent
05e02c188f
commit
43c3406770
@@ -4,6 +4,7 @@
|
||||
# TODO parts of this should be conditional on version
|
||||
|
||||
import importlib.abc
|
||||
from importlib._modulespec import ModuleSpec
|
||||
import sys
|
||||
from typing import (
|
||||
Any, Callable, Dict, Generic, Iterator, Mapping, Optional, Tuple, TypeVar,
|
||||
@@ -115,7 +116,7 @@ class ModuleType:
|
||||
__package__ = ... # type: Optional[str]
|
||||
# Should be Optional[ModuleSpec], but importlib.machinery has no stub
|
||||
# yet.
|
||||
__spec__ = ... # type: Optional[Any]
|
||||
__spec__ = ... # type: Optional[ModuleSpec]
|
||||
def __init__(self, name: str, doc: str) -> None: ...
|
||||
|
||||
class TracebackType:
|
||||
|
||||
Reference in New Issue
Block a user