File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change
1
+ import _ast
1
2
import sys
2
3
import types
3
4
from _typeshed import (
@@ -7,6 +8,7 @@ from _typeshed import (
7
8
OpenBinaryModeWriting ,
8
9
OpenTextMode ,
9
10
ReadableBuffer ,
11
+ StrPath ,
10
12
)
11
13
from abc import ABCMeta , abstractmethod
12
14
from collections .abc import Iterator , Mapping , Sequence
@@ -52,7 +54,9 @@ class InspectLoader(Loader):
52
54
def get_source (self , fullname : str ) -> str | None : ...
53
55
def exec_module (self , module : types .ModuleType ) -> None : ...
54
56
@staticmethod
55
- def source_to_code (data : ReadableBuffer | str , path : str = "<string>" ) -> types .CodeType : ...
57
+ def source_to_code (
58
+ data : ReadableBuffer | str | _ast .Module | _ast .Expression | _ast .Interactive , path : ReadableBuffer | StrPath = "<string>"
59
+ ) -> types .CodeType : ...
56
60
57
61
class ExecutionLoader (InspectLoader ):
58
62
@abstractmethod
You can’t perform that action at this time.
0 commit comments