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>
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.contrib.sites.models import Site
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
from patchwork.parser import hash_patch
import re
import datetime, time
return self.patches.all().count()
def ordered_patches(self):
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
def append_patch(self, patch):
# todo: use the aggregate queries in django 1.1
from patchwork.forms import MultiplePatchForm
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 = []
def get_patch_ids(d, prefix = 'patch_id'):
ids = []
from patchwork.models import Patch, Project, Person
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.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
from patchwork.requestcontext import PatchworkRequestContext
from django.core import serializers, urlresolvers
from django.template.loader import render_to_string
from patchwork.forms import BundleForm, DeleteBundleForm
from patchwork.views import generic_list
from patchwork.filters import DelegateFilter
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):
@login_required
def setbundle(request):
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 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 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):
from patchwork.views import generic_list
def patch(request, patch_id):
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 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.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):
from patchwork.requestcontext import PatchworkRequestContext
def project(request, project_id):
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.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.filters import DelegateFilter
-from patchwork.paginator import Paginator
from patchwork.views import generic_list
from django.template.loader import render_to_string
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
from django.conf import settings
from django.core.mail import send_mail
import django.core.urlresolvers
# Patchwork XMLRPC interface
#
# Patchwork XMLRPC interface
#
-from django.core.exceptions import ImproperlyConfigured
from SimpleXMLRPCServer import SimpleXMLRPCDispatcher
from django.http import HttpResponse, HttpResponseRedirect, \
HttpResponseServerError
from SimpleXMLRPCServer import SimpleXMLRPCDispatcher
from django.http import HttpResponse, HttpResponseRedirect, \
HttpResponseServerError
-from django.conf import settings
from django.core import urlresolvers
from django.core import urlresolvers
-from django.shortcuts import render_to_response
from django.contrib.auth import authenticate
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
from django.views.decorators.csrf import csrf_exempt
import sys