summaryrefslogtreecommitdiffstats
path: root/pyload/utils
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/utils')
-rw-r--r--pyload/utils/__init__.py12
-rw-r--r--pyload/utils/packagetools.py2
-rw-r--r--pyload/utils/pylgettext.py2
3 files changed, 8 insertions, 8 deletions
diff --git a/pyload/utils/__init__.py b/pyload/utils/__init__.py
index 2e23bf99b..3d26983b5 100644
--- a/pyload/utils/__init__.py
+++ b/pyload/utils/__init__.py
@@ -63,7 +63,7 @@ def remove_chars(string, repl):
def safe_filename(name):
""" remove bad chars """
- name = unquote(name).encode('ascii', 'replace') # Non-ASCII chars usually breaks file saving. Replacing.
+ name = unquote(name).encode('ascii', 'replace') #: Non-ASCII chars usually breaks file saving. Replacing.
if os.name == 'nt':
return remove_chars(name, u'\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32'
u'\33\34\35\36\37/?%*|"<>')
@@ -95,15 +95,15 @@ if sys.getfilesystemencoding().startswith('ANSI'):
def fs_encode(string):
return safe_filename(encode(string))
- fs_decode = decode # decode utf8
+ fs_decode = decode #: decode utf8
else:
- fs_encode = fs_decode = lambda x: x # do nothing
+ fs_encode = fs_decode = lambda x: x #: do nothing
def get_console_encoding(enc):
if os.name == "nt":
- if enc == "cp65001": # aka UTF-8
+ if enc == "cp65001": #: aka UTF-8
print "WARNING: Windows codepage 65001 is not supported."
enc = "cp850"
else:
@@ -178,7 +178,7 @@ def uniqify(seq): #: Originally by Dave Kirby
return [x for x in seq if x not in seen and not seen_add(x)]
-def parseFileSize(string, unit=None): # returns bytes
+def parseFileSize(string, unit=None): #: returns bytes
if not unit:
m = re.match(r"([\d.,]+) *([a-zA-Z]*)", string.strip().lower())
if m:
@@ -244,7 +244,7 @@ def fixup(m):
except KeyError:
pass
- return text # leave as is
+ return text #: leave as is
def has_method(obj, name):
diff --git a/pyload/utils/packagetools.py b/pyload/utils/packagetools.py
index 0ab68a869..8ed55d0f7 100644
--- a/pyload/utils/packagetools.py
+++ b/pyload/utils/packagetools.py
@@ -79,7 +79,7 @@ def parseNames(files):
if len(split) > 1:
name = split.pop(1)
- #check if an already existing package may be ok for this file
+ # check if an already existing package may be ok for this file
# found = False
# for pack in packs:
# if pack in file:
diff --git a/pyload/utils/pylgettext.py b/pyload/utils/pylgettext.py
index 86cfc586a..76bb268ec 100644
--- a/pyload/utils/pylgettext.py
+++ b/pyload/utils/pylgettext.py
@@ -37,7 +37,7 @@ def find(domain, localedir=None, languages=None, all=False):
if _searchdirs is None:
return origfind(domain, localedir, languages, all)
searches = [localedir] + _searchdirs
- results = list()
+ results = []
for dir in searches:
res = origfind(domain, dir, languages, all)
if all is False: