Skip to content

Commit 7e670d5

Browse files
Display req name on error (#14117)
Signed-off-by: Emmanuel Ferdman <[email protected]>
1 parent 3e26a91 commit 7e670d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/pytype_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def _get_pkgs_associated_with_requirement(req_name: str) -> list[str]:
169169
toplevel_txt_contents = dist.read_text("top_level.txt")
170170
if toplevel_txt_contents is None:
171171
if dist.files is None:
172-
raise RuntimeError("Can't read find the packages associated with requirement {req_name!r}")
172+
raise RuntimeError(f"Can't read find the packages associated with requirement {req_name!r}")
173173
maybe_modules = [f.parts[0] if len(f.parts) > 1 else inspect.getmodulename(f) for f in dist.files]
174174
packages = [name for name in maybe_modules if name is not None and "." not in name]
175175
else:

0 commit comments

Comments
 (0)