Skip to content

Commit 8c42989

Browse files
committed
Pyflakes cleanup compliant with pyflakes 0.8.1, which seems to find things 0.8.0 didn't fin.
- Legacy-Id: 7558
1 parent f20a5d0 commit 8c42989

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

ietf/doc/views_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,8 @@ def index_all_drafts(request):
589589

590590
names.sort(key=lambda t: t[1])
591591

592-
names = ['<a href="/doc/' + name + '/">' + name +'</a>'
593-
for name, _ in names if name not in names_to_skip]
592+
names = ['<a href="/doc/' + n + '/">' + n +'</a>'
593+
for n, __ in names if n not in names_to_skip]
594594

595595
categories.append((state,
596596
heading,

ietf/idindex/index.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ def active_drafts_index_by_group(extra_values=()):
243243

244244
# put docs into groups
245245
for d in docs_dict.itervalues():
246-
g = groups_dict.get(d["group_id"])
247-
if not g:
246+
group = groups_dict.get(d["group_id"])
247+
if not group:
248248
continue
249249

250-
if not hasattr(g, "active_drafts"):
251-
g.active_drafts = []
250+
if not hasattr(group, "active_drafts"):
251+
group.active_drafts = []
252252

253-
g.active_drafts.append(d)
253+
group.active_drafts.append(d)
254254

255255
groups = [g for g in groups_dict.itervalues() if hasattr(g, "active_drafts")]
256256
groups.sort(key=lambda g: g.acronym)

ietf/iesg/agenda.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ def fill_in_agenda_docs(date, sections, matches=None):
182182

183183
doc.group.txt_link = settings.CHARTER_TXT_URL + "%s-%s.txt" % (doc.canonical_name(), doc.rev)
184184

185-
num = get_doc_section(doc)
186-
if num: # and num in sections
187-
sections[num]["docs"].append(doc)
185+
number = get_doc_section(doc)
186+
if number: # and num in sections
187+
sections[number]["docs"].append(doc)
188188

189189
# prune empty "For action" sections
190-
empty_for_action = [num for num, section in sections.iteritems()
190+
empty_for_action = [n for n, section in sections.iteritems()
191191
if section["title"] == "For Action" and not section["docs"]]
192192
for num in empty_for_action:
193193
del sections[num]

ietf/utils/draft.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ def _parse_draftname(self):
169169
filename = ""
170170
revision = ""
171171
try:
172-
path, base = self.source.rsplit("/", 1)
172+
__, base = self.source.rsplit("/", 1)
173173
except ValueError:
174-
path, base = "", self.source
174+
base = self.source
175175
if base.startswith("draft-"):
176176
if '.' in base:
177-
name, ext = base.split(".", 1)
177+
name, __ = base.split(".", 1)
178178
else:
179-
name, ext = base, ""
179+
name = base
180180
revmatch = re.search("\d\d$", name)
181181
if revmatch:
182182
filename = name[:-3]
@@ -877,7 +877,7 @@ def dotexp(s):
877877
_debug(" * Final company list: %s" % (companies,))
878878
_debug(" * Final companies_seen: %s" % (companies_seen,))
879879
self._author_info = authors
880-
self._authors_with_firm = [ "%s <%s> (%s)"%(full,email,company) for full,first,middle,last,suffix,email,company in authors ]
880+
self._authors_with_firm = [ "%s <%s> (%s)"%(full,email,company) for full,first,middle,last,suffix,email,company in authors ] # pyflakes:ignore
881881
self._authors = [ "%s <%s>"%(full,email) if email else full for full,first,middle,last,suffix,email,company in authors ]
882882
self._authors.sort()
883883
_debug(" * Final author list: " + ", ".join(self._authors))

0 commit comments

Comments
 (0)