Skip to content

Commit 2d71822

Browse files
message_about_scripts_not_on_PATH: create one Path object for parent_dir and script_name
Co-authored-by: Tzu-ping Chung <[email protected]>
1 parent 52a6318 commit 2d71822

File tree

1 file changed

+3
-2
lines changed
  • src/pip/_internal/operations/install

1 file changed

+3
-2
lines changed

src/pip/_internal/operations/install/wheel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ def message_about_scripts_not_on_PATH(scripts: Sequence[str]) -> Optional[str]:
138138
# Group scripts by the path they were installed in
139139
grouped_by_dir: Dict[Path, Set[str]] = collections.defaultdict(set)
140140
for destfile in scripts:
141-
parent_dir = Path(destfile).parent.resolve()
142-
script_name = Path(destfile).name
141+
dest_path = Path(destfile)
142+
parent_dir = dest_path.parent.resolve()
143+
script_name = dest_path.name
143144
grouped_by_dir[parent_dir].add(script_name)
144145

145146
# We don't want to warn for directories that are on PATH.

0 commit comments

Comments
 (0)