Skip to content

Commit 75fd232

Browse files
committed
check then cleanup osp comments
1 parent d38e330 commit 75fd232

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

winpython/controlpanel.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
Created on Mon Aug 13 11:40:01 2012
1111
"""
1212

13-
# import os.path as osp
1413
from pathlib import Path
1514
import os
1615
import sys
@@ -249,7 +248,6 @@ def add_packages(self, fnames):
249248
notcompatible = []
250249
dist = self.distribution
251250
for fname in fnames:
252-
# bname = osp.basename(fname)
253251
bname = Path(fname).name
254252
try:
255253
package = wppm.Package(fname)
@@ -356,7 +354,7 @@ def dropEvent(self, event):
356354
fnames = [
357355
path
358356
for path in mimedata2url(source)
359-
if Path(path).is_file() # if osp.isfile(path)
357+
if Path(path).is_file()
360358
]
361359
self.add_packages(fnames)
362360
event.acceptProposedAction()
@@ -408,7 +406,6 @@ def select_directory(self):
408406
"""Select directory"""
409407
# basedir = to_text_string(self.line_edit.text())
410408
basedir = str(self.line_edit.text())
411-
# if not osp.isdir(basedir):
412409
if not Path(basedir).is_dir():
413410
basedir = str(Path.cwd()) # getcwd()
414411
while True:
@@ -426,8 +423,6 @@ def select_directory(self):
426423
)
427424
basedir = directory
428425
continue
429-
# directory = osp.abspath(osp.normpath(directory))
430-
# directory = str(Path(osp.normpath(directory)).resolve())
431426
directory = str(Path(directory).resolve(strict=False))
432427
self.set_distribution(directory)
433428
# PyQt4 old SIGNAL: self.emit(SIGNAL('selected_distribution(QString)'), directory)
@@ -672,7 +667,6 @@ def setup_window(self):
672667
),
673668
)
674669
open_console_action.setEnabled(
675-
# osp.exists(self.command_prompt_path)
676670
Path(self.command_prompt_path).exists()
677671
)
678672
add_actions(
@@ -816,11 +810,6 @@ def unregister_distribution(self):
816810

817811
@property
818812
def command_prompt_path(self):
819-
# return osp.join(
820-
# self.distribution.target,
821-
# osp.pardir,
822-
# "WinPython Command Prompt.exe",
823-
# )
824813
return str(Path(self.distribution.target).parent /
825814
"WinPython Command Prompt.exe")
826815

@@ -850,7 +839,6 @@ def add_packages(self):
850839
filters='*.exe *.zip *.tar.gz *.whl',
851840
)
852841
if fnames:
853-
# self.basedir = osp.dirname(fnames[0])
854842
self.basedir = str(Path(fnames[0]).parent)
855843
self.table.add_packages(fnames)
856844

0 commit comments

Comments
 (0)