]> git.ozlabs.org Git - patchwork/commitdiff
Remove unused imports
authorGuilherme Salgado <guilherme.salgado@linaro.org>
Wed, 9 Mar 2011 01:15:06 +0000 (01:15 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 15 Mar 2011 08:07:06 +0000 (16:07 +0800)
This is so that we can use static analysis tools like pyflakes to find
undefined names (and other common mistakes we often make) without being
swamped with unused imports warnings.

Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/models.py
apps/patchwork/utils.py
apps/patchwork/views/base.py
apps/patchwork/views/bundle.py
apps/patchwork/views/patch.py
apps/patchwork/views/project.py
apps/patchwork/views/user.py
apps/patchwork/views/xmlrpc.py

index 134e12f7f30bb0b74360986ce78822742770352f..676f2192de5fe8a2f8a2aeafee0945ea5d5501e7 100644 (file)
@@ -21,12 +21,10 @@ from django.db import models
 from django.contrib.auth.models import User
 from django.core.urlresolvers import reverse
 from django.contrib.sites.models import Site
-from django.conf import settings
 from patchwork.parser import hash_patch
 
 import re
 import datetime, time
-import string
 import random
 
 try:
@@ -322,7 +320,7 @@ class Bundle(models.Model):
         return self.patches.all().count()
 
     def ordered_patches(self):
-        return self.patches.order_by('bundlepatch__order');
+        return self.patches.order_by('bundlepatch__order')
 
     def append_patch(self, patch):
         # todo: use the aggregate queries in django 1.1
index b6d86a4ddbd517892078b6030c32018f9dc0306a..53cf40ba7487b11e7e2d117606533db281d51d4f 100644 (file)
@@ -19,9 +19,8 @@
 
 
 from patchwork.forms import MultiplePatchForm
-from patchwork.models import Bundle, Project, BundlePatch, State, UserProfile
-from django.conf import settings
-from django.shortcuts import render_to_response, get_object_or_404
+from patchwork.models import Bundle, Project, BundlePatch, UserProfile
+from django.shortcuts import get_object_or_404
 
 def get_patch_ids(d, prefix = 'patch_id'):
     ids = []
index bb78fa47b52f54a5699ba446842b7e15b2a4fce7..2f6b602f18ae68e16a692aefda049ef3987c1d0d 100644 (file)
 
 
 from patchwork.models import Patch, Project, Person
-from patchwork.filters import Filters
-from patchwork.forms import LoginForm, PatchForm
 from django.shortcuts import render_to_response, get_object_or_404
 from django.http import HttpResponse, HttpResponseRedirect, Http404
-from django.db import transaction
-from django.contrib.auth.models import User
-from django.contrib.auth.decorators import login_required
 from patchwork.requestcontext import PatchworkRequestContext
 from django.core import serializers, urlresolvers
 from django.template.loader import render_to_string
index 62b50d4989314fc504431e40407ba5ba26da4d0d..54aa21da8ce1ddb2771d05b976aae9812a2d7d0e 100644 (file)
@@ -28,7 +28,6 @@ from patchwork.utils import get_patch_ids
 from patchwork.forms import BundleForm, DeleteBundleForm
 from patchwork.views import generic_list
 from patchwork.filters import DelegateFilter
-from patchwork.paginator import Paginator
 
 @login_required
 def setbundle(request):
index 66b314e4068fc680c49f3f089cb92813753f988d..6c9fb449328d5f49eb1a043806c693d47ee24962 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
-from patchwork.models import Patch, Project, Person, Bundle
-from patchwork.filters import Filters
-from patchwork.forms import PatchForm, MultiplePatchForm, CreateBundleForm
-from patchwork.utils import get_patch_ids, set_patches, Order
+from patchwork.models import Patch, Project, Bundle
+from patchwork.forms import PatchForm, CreateBundleForm
 from patchwork.requestcontext import PatchworkRequestContext
 from django.shortcuts import render_to_response, get_object_or_404
-from django.http import HttpResponse, HttpResponseRedirect, \
-        HttpResponseForbidden
-from django.contrib.auth.models import User
-from django.contrib.auth.decorators import login_required
-from django.contrib.auth import authenticate, login
-import django.core.urlresolvers
-from patchwork.paginator import Paginator
+from django.http import HttpResponse, HttpResponseForbidden
 from patchwork.views import generic_list
 
 def patch(request, patch_id):
index 798e8a7cd93eb7a46de450ac83692531d01c95cc..05f0912f09d52f9ab8ab4b7d49c25269fd293639 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
-from patchwork.models import Patch, Project, Person
+from patchwork.models import Patch, Project
 from django.shortcuts import render_to_response, get_object_or_404
 from django.contrib.auth.models import User
-from django.contrib.auth.decorators import login_required
 from patchwork.requestcontext import PatchworkRequestContext
 
 def project(request, project_id):
index 8358cbd2d752c349c443fa17c938853e8b9819ce..c83f0b1ec7e684c48561baa213797e8670fdefae 100644 (file)
 from django.contrib.auth.decorators import login_required
 from patchwork.requestcontext import PatchworkRequestContext
 from django.shortcuts import render_to_response, get_object_or_404
-from django.contrib import auth
-from django.http import HttpResponse, HttpResponseRedirect
-from patchwork.models import Project, Patch, Bundle, Person, UserProfile, \
-         UserPersonConfirmation, State
-from patchwork.forms import MultiplePatchForm, UserProfileForm, \
-         UserPersonLinkForm
-from patchwork.utils import Order, get_patch_ids
+from django.http import HttpResponseRedirect
+from patchwork.models import Project, Bundle, Person, UserPersonConfirmation, \
+         State
+from patchwork.forms import UserProfileForm, UserPersonLinkForm
 from patchwork.filters import DelegateFilter
-from patchwork.paginator import Paginator
 from patchwork.views import generic_list
 from django.template.loader import render_to_string
-from django.template import Context
 from django.conf import settings
 from django.core.mail import send_mail
 import django.core.urlresolvers
index 3310e69651ae5c52347e5e6af479b9dfd062865f..1d9d389c528a815342d6953b5b8b47147fe8a21f 100644 (file)
 # Patchwork XMLRPC interface
 #
 
-from django.core.exceptions import ImproperlyConfigured
 from SimpleXMLRPCServer import SimpleXMLRPCDispatcher
 from django.http import HttpResponse, HttpResponseRedirect, \
      HttpResponseServerError
-from django.conf import settings
 from django.core import urlresolvers
-from django.shortcuts import render_to_response
 from django.contrib.auth import authenticate
-from patchwork.models import Patch, Project, Person, Bundle, State
+from patchwork.models import Patch, Project, Person, State
 from django.views.decorators.csrf import csrf_exempt
 
 import sys