Skip to content

Commit 4601581

Browse files
authored
Update ModuleType.__file__ to be Optional (#6186)
Per the Python documentation, `ModuleType.__file__` is `Optional`: https://docs.python.org/3/reference/import.html#file__
1 parent 6d318e7 commit 4601581

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/types.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class SimpleNamespace:
171171

172172
class ModuleType:
173173
__name__: str
174-
__file__: str
174+
__file__: str | None
175175
__dict__: dict[str, Any]
176176
__loader__: _LoaderProtocol | None
177177
__package__: str | None

0 commit comments

Comments
 (0)