Visitar URL original
No need for two spaces between words in an import error message by nedbat · Pull Request #103458 · python/cpython · GitHub
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
No need for two spaces between words in an import error message
  • Loading branch information
nedbat committed Apr 11, 2023
commit 7d79d7605f5b0d847cf35ef93751c7b9f66d7594
2 changes: 1 addition & 1 deletion Lib/importlib/_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ def _find_and_load_unlocked(name, import_):
try:
path = parent_module.__path__
except AttributeError:
msg = f'{_ERR_MSG_PREFIX} {name!r}; {parent!r} is not a package'
msg = f'{_ERR_MSG_PREFIX}{name!r}; {parent!r} is not a package'
raise ModuleNotFoundError(msg, name=name) from None
parent_spec = parent_module.__spec__
child = name.rpartition('.')[2]
Expand Down