##// END OF EJS Templates
PR cleanup according to comments.
Antony Lee -
Show More
@@ -121,7 +121,7 b' def protect_filename(s):'
121 if sys.platform == "win32":
121 if sys.platform == "win32":
122 return '"' + s + '"'
122 return '"' + s + '"'
123 else:
123 else:
124 return "".join("\\" + c if c in PROTECTABLES else c for c in s)
124 return "".join(("\\" + c if c in PROTECTABLES else c) for c in s)
125 else:
125 else:
126 return s
126 return s
127
127
@@ -73,6 +73,9 b' def get_long_path_name(path):'
73
73
74 def unquote_filename(name, win32=(sys.platform=='win32')):
74 def unquote_filename(name, win32=(sys.platform=='win32')):
75 """ On Windows, remove leading and trailing quotes from filenames.
75 """ On Windows, remove leading and trailing quotes from filenames.
76
77 This function has been deprecated and should not be used any more:
78 unquoting is now taken care of by :func:`IPython.utils.process.arg_split`.
76 """
79 """
77 warn("'unquote_filename' is deprecated", DeprecationWarning)
80 warn("'unquote_filename' is deprecated", DeprecationWarning)
78 if win32:
81 if win32:
@@ -83,7 +86,7 b" def unquote_filename(name, win32=(sys.platform=='win32')):"
83
86
84 def compress_user(path):
87 def compress_user(path):
85 """Reverse of :func:`os.path.expanduser`
88 """Reverse of :func:`os.path.expanduser`
86 """
89 """
87 path = py3compat.unicode_to_str(path, sys.getfilesystemencoding())
90 path = py3compat.unicode_to_str(path, sys.getfilesystemencoding())
88 home = os.path.expanduser('~')
91 home = os.path.expanduser('~')
89 if path.startswith(home):
92 if path.startswith(home):
General Comments 0
You need to be logged in to leave comments. Login now