diff --git a/ietf/doc/views_search.py b/ietf/doc/views_search.py
index 9355c3317..d4f1d443b 100644
--- a/ietf/doc/views_search.py
+++ b/ietf/doc/views_search.py
@@ -589,8 +589,8 @@ def index_all_drafts(request):
names.sort(key=lambda t: t[1])
- names = ['' + name +''
- for name, _ in names if name not in names_to_skip]
+ names = ['' + n +''
+ for n, __ in names if n not in names_to_skip]
categories.append((state,
heading,
diff --git a/ietf/idindex/index.py b/ietf/idindex/index.py
index d7c49d99d..bfb5b9d58 100644
--- a/ietf/idindex/index.py
+++ b/ietf/idindex/index.py
@@ -243,14 +243,14 @@ def active_drafts_index_by_group(extra_values=()):
# put docs into groups
for d in docs_dict.itervalues():
- g = groups_dict.get(d["group_id"])
- if not g:
+ group = groups_dict.get(d["group_id"])
+ if not group:
continue
- if not hasattr(g, "active_drafts"):
- g.active_drafts = []
+ if not hasattr(group, "active_drafts"):
+ group.active_drafts = []
- g.active_drafts.append(d)
+ group.active_drafts.append(d)
groups = [g for g in groups_dict.itervalues() if hasattr(g, "active_drafts")]
groups.sort(key=lambda g: g.acronym)
diff --git a/ietf/iesg/agenda.py b/ietf/iesg/agenda.py
index 4398f31cc..0c4734964 100644
--- a/ietf/iesg/agenda.py
+++ b/ietf/iesg/agenda.py
@@ -182,12 +182,12 @@ def fill_in_agenda_docs(date, sections, matches=None):
doc.group.txt_link = settings.CHARTER_TXT_URL + "%s-%s.txt" % (doc.canonical_name(), doc.rev)
- num = get_doc_section(doc)
- if num: # and num in sections
- sections[num]["docs"].append(doc)
+ number = get_doc_section(doc)
+ if number: # and num in sections
+ sections[number]["docs"].append(doc)
# prune empty "For action" sections
- empty_for_action = [num for num, section in sections.iteritems()
+ empty_for_action = [n for n, section in sections.iteritems()
if section["title"] == "For Action" and not section["docs"]]
for num in empty_for_action:
del sections[num]
diff --git a/ietf/utils/draft.py b/ietf/utils/draft.py
index 1e72a6ea9..6701b7b51 100755
--- a/ietf/utils/draft.py
+++ b/ietf/utils/draft.py
@@ -169,14 +169,14 @@ class Draft():
filename = ""
revision = ""
try:
- path, base = self.source.rsplit("/", 1)
+ __, base = self.source.rsplit("/", 1)
except ValueError:
- path, base = "", self.source
+ base = self.source
if base.startswith("draft-"):
if '.' in base:
- name, ext = base.split(".", 1)
+ name, __ = base.split(".", 1)
else:
- name, ext = base, ""
+ name = base
revmatch = re.search("\d\d$", name)
if revmatch:
filename = name[:-3]
@@ -877,7 +877,7 @@ class Draft():
_debug(" * Final company list: %s" % (companies,))
_debug(" * Final companies_seen: %s" % (companies_seen,))
self._author_info = authors
- self._authors_with_firm = [ "%s <%s> (%s)"%(full,email,company) for full,first,middle,last,suffix,email,company in authors ]
+ self._authors_with_firm = [ "%s <%s> (%s)"%(full,email,company) for full,first,middle,last,suffix,email,company in authors ] # pyflakes:ignore
self._authors = [ "%s <%s>"%(full,email) if email else full for full,first,middle,last,suffix,email,company in authors ]
self._authors.sort()
_debug(" * Final author list: " + ", ".join(self._authors))