From 4601581e83485751e545f538dd7ab9f17f490e7d Mon Sep 17 00:00:00 2001 From: Oz Anani Date: Sun, 7 Nov 2021 16:03:01 +0200 Subject: [PATCH] Update ModuleType.__file__ to be Optional (#6186) Per the Python documentation, `ModuleType.__file__` is `Optional`: https://docs.python.org/3/reference/import.html#file__ --- stdlib/types.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index e60c6475e2e9..fe81185e70c4 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -171,7 +171,7 @@ class SimpleNamespace: class ModuleType: __name__: str - __file__: str + __file__: str | None __dict__: dict[str, Any] __loader__: _LoaderProtocol | None __package__: str | None