diff --git a/PyInstaller/lib/modulegraph/modulegraph.py b/PyInstaller/lib/modulegraph/modulegraph.py index f4acf15cce9..788de51f1ad 100644 --- a/PyInstaller/lib/modulegraph/modulegraph.py +++ b/PyInstaller/lib/modulegraph/modulegraph.py @@ -26,8 +26,6 @@ from collections import deque, namedtuple import warnings -from typing import Optional - from altgraph.ObjectGraph import ObjectGraph from altgraph import GraphError @@ -2059,7 +2057,9 @@ def _safe_import_module( co = self._replace_paths_in_code(co) module.code = co except SyntaxError: - self.msg(1, "safe_import_module: SyntaxError in ", pathname) + self.msg( + 1, "safe_import_module: SyntaxError in ", pathname, + ) cls = InvalidSourceModule module = self.createNode(cls, module_name)