File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,16 @@ class InspectLoader(Loader):
5151 @abstractmethod
5252 def get_source (self , fullname : str ) -> str | None : ...
5353 def exec_module (self , module : types .ModuleType ) -> None : ...
54- @staticmethod
55- def source_to_code (
56- data : ReadableBuffer | str | _ast .Module | _ast .Expression | _ast .Interactive , path : ReadableBuffer | StrPath = "<string>"
57- ) -> types .CodeType : ...
54+ if sys .version_info >= (3 , 12 ):
55+ @staticmethod
56+ def source_to_code (
57+ data : ReadableBuffer | str | _ast .Module | _ast .Expression | _ast .Interactive , path : bytes | StrPath = "<string>"
58+ ) -> types .CodeType : ...
59+ else :
60+ @staticmethod
61+ def source_to_code (
62+ data : ReadableBuffer | str | _ast .Module | _ast .Expression | _ast .Interactive , path : ReadableBuffer | StrPath = "<string>"
63+ ) -> types .CodeType : ...
5864
5965class ExecutionLoader (InspectLoader ):
6066 @abstractmethod
You can’t perform that action at this time.
0 commit comments