Skip to content

Commit 2e735f5

Browse files
Per feedback, make the change and avoid the overloads (importlib/abc.pyi).
1 parent f9e02a5 commit 2e735f5

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

stdlib/importlib/abc.pyi

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,10 @@ class InspectLoader(Loader):
5151
@abstractmethod
5252
def get_source(self, fullname: str) -> str | None: ...
5353
def exec_module(self, module: types.ModuleType) -> None: ...
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,
63-
path: ReadableBuffer | StrPath = "<string>",
64-
) -> types.CodeType: ...
54+
@staticmethod
55+
def source_to_code(
56+
data: ReadableBuffer | str | _ast.Module | _ast.Expression | _ast.Interactive, path: bytes | StrPath = "<string>"
57+
) -> types.CodeType: ...
6558

6659
class ExecutionLoader(InspectLoader):
6760
@abstractmethod

0 commit comments

Comments
 (0)