Pyflakes cleanup compliant with pyflakes 0.8.1, which seems to find things 0.8.0 didn't fin.
- Legacy-Id: 7558
This commit is contained in:
parent
f20a5d0cfb
commit
8c42989d5d
|
@ -589,8 +589,8 @@ def index_all_drafts(request):
|
|||
|
||||
names.sort(key=lambda t: t[1])
|
||||
|
||||
names = ['<a href="/doc/' + name + '/">' + name +'</a>'
|
||||
for name, _ in names if name not in names_to_skip]
|
||||
names = ['<a href="/doc/' + n + '/">' + n +'</a>'
|
||||
for n, __ in names if n not in names_to_skip]
|
||||
|
||||
categories.append((state,
|
||||
heading,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue