[damned-lies] chore: flake8 fixes on languages
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] chore: flake8 fixes on languages
- Date: Fri, 7 May 2021 12:21:44 +0000 (UTC)
commit 78ea1f215ed067273abf293a8bab9adfdfb927ee
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date: Fri Apr 30 11:29:05 2021 +0200
chore: flake8 fixes on languages
languages/management/commands/load-plurals.py | 2 ++
languages/tests.py | 2 +-
languages/views.py | 6 +++---
3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/languages/management/commands/load-plurals.py b/languages/management/commands/load-plurals.py
index fbddffd3..9c66f70e 100644
--- a/languages/management/commands/load-plurals.py
+++ b/languages/management/commands/load-plurals.py
@@ -4,6 +4,7 @@ from languages.models import Language
# Shamelessly copied from http://translate.sourceforge.net/wiki/l10n/pluralforms (2009-05-25)
# pylint: disable=line-too-long
+# flake8: noqa
plurals = {
'af': "nplurals=2; plural=(n != 1)",
'ak': "nplurals=2; plural=(n > 1)",
@@ -117,6 +118,7 @@ plurals = {
# 'zh Chinese nplurals=2; plural=(n > 1)",
}
+
class Command(BaseCommand):
def handle(self, *args, **options):
diff --git a/languages/tests.py b/languages/tests.py
index 63f7e1ad..ecea8f50 100644
--- a/languages/tests.py
+++ b/languages/tests.py
@@ -7,7 +7,7 @@ from languages.models import Language
class LanguageTestCase(TestCase):
fixtures = ['sample_data.json']
- def testLanguageReleaseXML(self):
+ def test_language_release_xml(self):
response = self.client.get(reverse('language_release_xml', args=['fr', 'gnome-3-8']))
self.assertContains(response, """<stats language="fr" release="gnome-3-8">""")
diff --git a/languages/views.py b/languages/views.py
index 4eb27a92..d82c377a 100644
--- a/languages/views.py
+++ b/languages/views.py
@@ -1,6 +1,6 @@
-from datetime import date, datetime
import os
import tarfile
+from datetime import date, datetime
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect
@@ -28,7 +28,7 @@ def language_all(request, locale, dtype):
'pageSection': "languages",
'language': language,
'stats_title': {
- 'ui': _("UI Translations"),
+ 'ui': _("UI Translations"),
'ui-part': _("UI Translations (reduced)"),
'doc': _("Documentation")}.get(dtype),
'stats': stats,
@@ -63,7 +63,7 @@ def language_release(request, locale, release_name, dtype):
'language_name': language and language.get_name() or _("Original strings"),
'release': release,
'stats_title': {
- 'ui': _("UI Translations"),
+ 'ui': _("UI Translations"),
'ui-part': _("UI Translations (reduced)"),
'doc': _("Documentation")}.get(dtype),
'stats': stats,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]