Skip to content

Commit 2058f60

Browse files
committed
_frozen_importlib: simplify module __repr__ delegate to importlib._module_repr
1 parent 0fb7dc5 commit 2058f60

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

graalpython/lib-graalpython/_frozen_importlib.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,4 @@ def load(suffix=""):
5757
# Insert our meta finder for caching
5858
_imp.CachedImportFinder.ModuleSpec = importlib.ModuleSpec
5959
sys.meta_path.insert(0, _imp.CachedImportFinder)
60-
61-
ModuleType = type(sys)
62-
63-
64-
def _repr(module):
65-
from importlib import _bootstrap
66-
return _bootstrap._module_repr(module)
67-
68-
69-
ModuleType.__repr__ = _repr
60+
type(sys).__repr__ = importlib._module_repr

0 commit comments

Comments
 (0)