[damned-lies] Cleaned some imports
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Cleaned some imports
- Date: Wed, 20 Jun 2018 20:53:42 +0000 (UTC)
commit 81546603e3a7ec9480586662ef281e9d42081d5d
Author: Claude Paroz <claude 2xlibre net>
Date: Wed Jun 20 21:55:21 2018 +0200
Cleaned some imports
common/tests.py | 1 -
common/utils.py | 1 +
common/views.py | 2 +-
damnedlies/wsgi.py | 3 ++-
stats/doap.py | 1 -
stats/tests/tests.py | 1 -
stats/tests/utils.py | 2 --
stats/utils.py | 1 -
vertimus/forms.py | 1 -
vertimus/views.py | 3 +--
10 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/common/tests.py b/common/tests.py
index f7662180..4deb92e4 100644
--- a/common/tests.py
+++ b/common/tests.py
@@ -6,7 +6,6 @@ from unittest.mock import MagicMock, patch
from django.conf import settings
from django.core.management import call_command
from django.test import TestCase
-from django.urls import reverse
from django.utils import translation
from people.models import Person
diff --git a/common/utils.py b/common/utils.py
index f7948728..64609bd6 100644
--- a/common/utils.py
+++ b/common/utils.py
@@ -1,3 +1,4 @@
+import errno
import logging
import os
from subprocess import Popen, PIPE
diff --git a/common/views.py b/common/views.py
index 8289cc8d..bbedad01 100644
--- a/common/views.py
+++ b/common/views.py
@@ -2,7 +2,7 @@ from pathlib import Path
from threading import Thread
from django.conf import settings
-from django.contrib.auth import login, authenticate
+from django.contrib.auth import login
from django.contrib import messages
from django.core.management import call_command
from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect, Http404
diff --git a/damnedlies/wsgi.py b/damnedlies/wsgi.py
index 0dbbc54e..8bb78280 100644
--- a/damnedlies/wsgi.py
+++ b/damnedlies/wsgi.py
@@ -1,6 +1,7 @@
import os
+from django.core.wsgi import get_wsgi_application
+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "damnedlies.settings")
-from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
diff --git a/stats/doap.py b/stats/doap.py
index 563563fe..90e6f55d 100644
--- a/stats/doap.py
+++ b/stats/doap.py
@@ -1,4 +1,3 @@
-import os
import re
from urllib.parse import unquote
from xml.etree.ElementTree import ParseError, parse
diff --git a/stats/tests/tests.py b/stats/tests/tests.py
index ae3577f8..986c5544 100644
--- a/stats/tests/tests.py
+++ b/stats/tests/tests.py
@@ -4,7 +4,6 @@ import shutil
import tempfile
from datetime import date
from pathlib import Path
-from unittest import skipUnless
from django.conf import settings
from django.contrib.auth.models import User
diff --git a/stats/tests/utils.py b/stats/tests/utils.py
index 17b48efd..e523866d 100644
--- a/stats/tests/utils.py
+++ b/stats/tests/utils.py
@@ -7,8 +7,6 @@ from unittest.mock import patch
from django.conf import settings
-from common import utils
-
class patch_shell_command:
"""
diff --git a/stats/utils.py b/stats/utils.py
index 70a9ee6f..8be65915 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -1,4 +1,3 @@
-import errno
import hashlib
import logging
import os
diff --git a/vertimus/forms.py b/vertimus/forms.py
index c9f00f61..ffe80bf7 100644
--- a/vertimus/forms.py
+++ b/vertimus/forms.py
@@ -3,7 +3,6 @@ import os
from django import forms
from django.core.exceptions import ValidationError
from django.urls import reverse
-from django.utils.html import format_html
from django.utils.translation import ugettext, ugettext_lazy as _
from vertimus.models import Action, ActionCI, ActionSeparator
diff --git a/vertimus/views.py b/vertimus/views.py
index c40adcbc..94933f6c 100644
--- a/vertimus/views.py
+++ b/vertimus/views.py
@@ -4,8 +4,7 @@ import re
from django.conf import settings
from django.contrib import messages
-from django.db import IntegrityError
-from django.http import HttpResponse, HttpResponseRedirect, Http404
+from django.http import HttpResponseRedirect, Http404
from django.shortcuts import render, get_object_or_404
from django.urls import reverse
from django.utils.html import escape
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]