summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-12-11 19:52:27 -0600
committerDan McGee <dan@archlinux.org>2011-12-11 19:52:27 -0600
commita60801bb7dbc18080e7f6106bcf9c707d2801c9d (patch)
tree12ba0f77316bbb87c1d15dc7d7d91a08fd85ed87 /packages
parente65d2bc6db279240a03fece91e5332f8602859dc (diff)
PyLint suggested cleanups
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/management/commands/populate_signoffs.py1
-rw-r--r--packages/models.py5
-rw-r--r--packages/templatetags/package_extras.py5
-rw-r--r--packages/utils.py2
4 files changed, 8 insertions, 5 deletions
diff --git a/packages/management/commands/populate_signoffs.py b/packages/management/commands/populate_signoffs.py
index 42496e9d..97ba4146 100644
--- a/packages/management/commands/populate_signoffs.py
+++ b/packages/management/commands/populate_signoffs.py
@@ -15,7 +15,6 @@ import sys
from xml.etree.ElementTree import XML
from django.conf import settings
-from django.contrib.auth.models import User
from django.core.management.base import NoArgsCommand
from ...models import SignoffSpecification
diff --git a/packages/models.py b/packages/models.py
index 77cade68..17843891 100644
--- a/packages/models.py
+++ b/packages/models.py
@@ -1,7 +1,7 @@
from collections import namedtuple
from django.db import models
-from django.db.models.signals import pre_save, post_save
+from django.db.models.signals import pre_save
from django.contrib.auth.models import User
from main.models import Arch, Repo
@@ -167,6 +167,9 @@ class Signoff(models.Model):
class FlagRequest(models.Model):
+ '''
+ A notification the package is out-of-date submitted through the web site.
+ '''
user = models.ForeignKey(User, blank=True, null=True)
user_email = models.EmailField('email address')
created = models.DateTimeField(editable=False)
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py
index 3eb7578d..47b2fecf 100644
--- a/packages/templatetags/package_extras.py
+++ b/packages/templatetags/package_extras.py
@@ -27,6 +27,7 @@ def url_unquote(original_url):
class BuildQueryStringNode(template.Node):
def __init__(self, sortfield):
self.sortfield = sortfield
+ super(BuildQueryStringNode, self).__init__()
def render(self, context):
qs = parse_qs(context['current_query'])
@@ -53,8 +54,8 @@ def do_buildsortqs(parser, token):
@register.simple_tag
def pkg_details_link(pkg):
- template = '<a href="%s" title="View package details for %s">%s</a>'
- return template % (pkg.get_absolute_url(), pkg.pkgname, pkg.pkgname)
+ link = '<a href="%s" title="View package details for %s">%s</a>'
+ return link % (pkg.get_absolute_url(), pkg.pkgname, pkg.pkgname)
@register.simple_tag
def multi_pkg_details(pkgs):
diff --git a/packages/utils.py b/packages/utils.py
index 5703db3b..d4a9d8f6 100644
--- a/packages/utils.py
+++ b/packages/utils.py
@@ -377,7 +377,7 @@ SELECT DISTINCT p1.pkgbase, r.name
AND r.testing = %s
AND p2.repo_id IN (
"""
- sql += ','.join(['%s' for r in repos])
+ sql += ','.join(['%s' for _ in repos])
sql += ")"
params = [False, False]