Permalink
Browse files

PEP8: W291 trailing whitespace

  • Loading branch information...
1 parent 2444a80 commit 150c9306e79a4e8fbcd5eb912a89323f0788acc4 dwaynebailey committed Aug 26, 2010
@@ -1,8 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2008 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2009 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# translate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -63,7 +63,7 @@ def must_display(cls, request, *args, **kwargs):
def __init__(self, request, data=None, files=None):
self.form = self.Form(data=data, files=files)
- def dispatch(self, action, request, *args, **kwargs):
+ def dispatch(self, action, request, *args, **kwargs):
handler = getattr(self, action)
return handler(request, *args, **kwargs)
@@ -93,14 +93,14 @@ def make_messages(locale=None, domain='django', verbosity='1', all=False, extens
xversion = (int(match.group('major')), int(match.group('minor')))
if xversion < (0, 15):
xgettext_reencodes_utf8 = True
-
+
languages = []
if locale is not None:
languages.append(locale)
elif all:
- locale_dirs = filter(os.path.isdir, glob.glob('%s/*' % localedir))
+ locale_dirs = filter(os.path.isdir, glob.glob('%s/*' % localedir))
languages = [os.path.basename(l) for l in locale_dirs]
-
+
for locale in languages:
if verbosity > 0:
print "processing language", locale
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2008 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# translate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2009 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# translate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2009 Zuza Software Foundation
-#
+#
# This file is part of Pootle.
#
# Pootle is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# Pootle is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2008 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# translate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -1,8 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2008 Zuza Software Foundation
-#
+#
# This file is part of Pootle.
#
# Pootle is free software; you can redistribute it and/or modify
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2008 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# translate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -69,10 +69,10 @@ def save_extra(self, instance, password, commit=True):
if instance.is_staff != instance.is_superuser:
instance.is_staff = instance.is_superuser
changed = True
-
+
if commit and changed:
instance.save()
-
+
return instance
def save_existing(self, form, instance, commit=True):
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2008 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# translate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -95,7 +95,7 @@ def review_link(request, path_obj):
text = _('Review Suggestions')
else:
text = _('View Suggestions')
- return {
+ return {
'href': dispatch.translate(request, path_obj.pootle_path, matchnames=['hassuggestion']),
'text': text }
except IOError:
@@ -28,7 +28,7 @@ def process_request(self, request):
if 'HTTP_HOST' in request.META:
domain = request.META['HTTP_HOST']
- if 'SCRIPT_NAME' in request.META:
+ if 'SCRIPT_NAME' in request.META:
settings.SCRIPT_NAME = request.META['SCRIPT_NAME']
if domain is not None:
domain += request.META['SCRIPT_NAME']
@@ -42,7 +42,7 @@ def process_exception(self, request, exception):
elif isinstance(exception, PermissionDenied):
templatevars = {}
if len(exception.args) > 0:
- templatevars['permission_error'] = unicode(exception.args[0])
+ templatevars['permission_error'] = unicode(exception.args[0])
if not request.user.is_authenticated():
login_msg = _('You need to <a href="%(login_link)s">login</a> to access this page.' % {
'login_link': l("/accounts/login/") })
@@ -58,7 +58,7 @@ def process_exception(self, request, exception):
templatevars = {}
if len(exception.args) > 0:
templatevars['exception'] = unicode(exception.args[0])
-
+
if hasattr(exception, 'filename'):
templatevars['fserror'] = _('Error accessing %(filename)s, Filesystem sent error: %(errormsg)s',
{'filename': exception.filename, 'errormsg': exception.strerror})
@@ -75,4 +75,4 @@ def process_exception(self, request, exception):
RequestContext(request)))
except:
# let's not confuse things by throwing an exception here
- pass
+ pass
@@ -52,7 +52,7 @@ def __init__(self, slug, request, directory):
self.directory = directory
self.recusrive = request.GET.get('all', False)
super(NoticeFeed, self).__init__(slug, request)
-
+
def get_object(self, bits):
return self.directory
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2009 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# translate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
View
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2008 Zuza Software Foundation
-#
+#
# This file is part of Pootle.
#
# Pootle is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# Pootle is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2009 Mozilla Corporation, Zuza Software Foundation
-#
+#
# This file is part of Pootle.
#
# Pootle is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# Pootle is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -29,7 +29,7 @@
class LdapBackend(object):
"""
This is a Django authentication module which implements LDAP
- authentication.
+ authentication.
To use this module, simply add it to the tuple AUTHENTICATION_BACKENDS
in settings.py.
@@ -52,7 +52,7 @@ def _translate_message(singular, plural, n):
if live_translation is None:
from django.conf import settings
default_locale = translation.to_locale(settings.LANGUAGE_CODE)
-
+
if default_locale in ('en', 'en_US'):
return _dummy_translate(singular, plural, n)
View
@@ -1,15 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+#
# Copyright 2008 Zuza Software Foundation
-#
+#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# translate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -67,9 +67,9 @@ def lang_choices():
name = data.tr_lang(translation.to_locale('en'))(name)
tr_name = data.tr_lang(translation.to_locale(code))(name)
if tr_name != name:
- # We have to use the LRO (left-to-right override) to ensure that
+ # We have to use the LRO (left-to-right override) to ensure that
# brackets in the English part of the name is rendered correctly
- # in an RTL layout like Arabic. We can't use markup because this
+ # in an RTL layout like Arabic. We can't use markup because this
# is used inside an option tag.
name = u"%s | \u202d%s" % (tr_name, name)
choices.append((code, name))
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
-# This code is based on a Django snippet by the user sgb at
+# This code is based on a Django snippet by the user sgb at
# http://www.djangosnippets.org/snippets/727/
import sys
@@ -1,13 +1,13 @@
#!/usr/bin/env python
# lang.py
-# Defines standard translation-toolkit structions for .lang files
+# Defines standard translation-toolkit structions for .lang files
# Author: Dan Schafer <dschafer@mozilla.com>
# Date: 10 Jun 2008
from translate.storage import base
-from translate.storage import txt
+from translate.storage import txt
class LangUnit(base.TranslationUnit):
"""This is just a normal unit with a weird string output"""
Oops, something went wrong.

0 comments on commit 150c930

Please sign in to comment.