Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e07284f

Browse filesBrowse files
Add missing _optimize parameter to importlib.machinery.SourceFileLoader method. (#13880)
1 parent 22b55fb commit e07284f
Copy full SHA for e07284f

1 file changed

+7Lines changed: 7 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎stdlib/_frozen_importlib_external.pyi‎

Copy file name to clipboardExpand all lines: stdlib/_frozen_importlib_external.pyi
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ class FileLoader:
121121
class SourceFileLoader(importlib.abc.FileLoader, FileLoader, importlib.abc.SourceLoader, SourceLoader): # type: ignore[misc] # incompatible method arguments in base classes
122122
def set_data(self, path: str, data: ReadableBuffer, *, _mode: int = 0o666) -> None: ...
123123
def path_stats(self, path: str) -> Mapping[str, Any]: ...
124+
def source_to_code( # type: ignore[override] # incompatible with InspectLoader.source_to_code
125+
self,
126+
data: ReadableBuffer | str | _ast.Module | _ast.Expression | _ast.Interactive,
127+
path: ReadableBuffer | StrPath,
128+
*,
129+
_optimize: int = -1,
130+
) -> types.CodeType: ...
124131

125132
class SourcelessFileLoader(importlib.abc.FileLoader, FileLoader, _LoaderBasics):
126133
def get_code(self, fullname: str) -> types.CodeType | None: ...

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.