mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 21:31:09 +08:00
Accept unicode in importlib.import_module (#1910)
On Python 2, importlib.import_module accepts bytes or unicode.
This commit is contained in:
committed by
Jelle Zijlstra
parent
2c6296034f
commit
84b6e95bdc
@@ -1,3 +1,4 @@
|
||||
import types
|
||||
from typing import Optional, Text
|
||||
|
||||
def import_module(name: str, package: str = ...) -> types.ModuleType: ...
|
||||
def import_module(name: Text, package: Optional[Text] = ...) -> types.ModuleType: ...
|
||||
|
||||
Reference in New Issue
Block a user