Skip to content

Commit dbbf6f5

Browse files
committed
Use .removesuffix in script maker
1 parent 614e536 commit dbbf6f5

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,7 @@ class PipScriptMaker(ScriptMaker):
411411
import sys
412412
from %(module)s import %(import_name)s
413413
if __name__ == '__main__':
414-
if sys.argv[0].endswith('.exe'):
415-
sys.argv[0] = sys.argv[0][:-4]
414+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
416415
sys.exit(%(func)s())
417416
"""
418417
)

0 commit comments

Comments
 (0)