Skip to content

Commit d38e330

Browse files
committed
check then cleanup osp comments
1 parent 106cfc3 commit d38e330

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

winpython/associate.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import sys
1616
import os
17-
# import os.path as osp
1817
from pathlib import Path
1918
# import subprocess
2019

@@ -44,19 +43,15 @@ def _get_shortcut_data(target, current=True):
4443
wpgroup = utils.create_winpython_start_menu_folder(
4544
current=current
4645
)
47-
# wpdir = osp.join(target, os.pardir)
4846
wpdir = str(Path(target).parent)
4947
data = []
5048
for name in os.listdir(wpdir):
51-
# bname, ext = osp.splitext(name)
5249
bname, ext = Path(name).stem, Path(name).suffix
5350
if ext == '.exe':
5451
data.append(
5552
(
56-
# osp.join(wpdir, name),
5753
str(Path(wpdir) / name),
5854
bname,
59-
# osp.join(wpgroup, bname),
6055
str(Path(wpgroup) / bname),
6156
)
6257
)
@@ -118,24 +113,11 @@ def register(target, current=True):
118113
)
119114

120115
# Verbs
121-
# python = osp.abspath(osp.join(target, 'python.exe'))
122-
# python = osp.abspath(str(Path(target) / 'python.exe'))
123116
python = str((Path(target) / 'python.exe').resolve())
124-
# pythonw = osp.abspath(osp.join(target, 'pythonw.exe'))
125-
#pythonw = osp.abspath(str(Path(target) / 'pythonw.exe'))
126117
pythonw = str((Path(target) / 'pythonw.exe').resolve())
127-
#spyder = osp.abspath(
128-
# # osp.join(target, os.pardir, 'Spyder.exe')
129-
# str(Path(target).parent / 'Spyder.exe')
130-
#)
131118
spyder = str((Path(target).parent / 'Spyder.exe').resolve())
132119

133-
# if not osp.isfile(spyder):
134120
if not Path(spyder).is_file():
135-
#spyder = '%s" "%s\Scripts\spyder' % (
136-
# pythonw,
137-
# target,
138-
#)
139121
spyder = f'{pythonw}" "{target}\Scripts\spyder'
140122
winreg.SetValueEx(
141123
winreg.CreateKey(root, KEY_C2 % ("", "open")),
@@ -202,7 +184,6 @@ def register(target, current=True):
202184
handler,
203185
)
204186
# Icons
205-
# dlls = osp.join(target, 'DLLs')
206187
dlls = str(Path(target) / 'DLLs')
207188
winreg.SetValueEx(
208189
winreg.CreateKey(root, KEY_I % ""),
@@ -374,7 +355,6 @@ def unregister(target, current=True):
374355
for path, desc, fname in _get_shortcut_data(
375356
target, current=current
376357
):
377-
# if osp.exists(fname):
378358
if Path(fname).exists():
379359
os.remove(fname)
380360

0 commit comments

Comments
 (0)