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.sort(key=lambda t: t[1])
|
||||||
|
|
||||||
names = ['<a href="/doc/' + name + '/">' + name +'</a>'
|
names = ['<a href="/doc/' + n + '/">' + n +'</a>'
|
||||||
for name, _ in names if name not in names_to_skip]
|
for n, __ in names if n not in names_to_skip]
|
||||||
|
|
||||||
categories.append((state,
|
categories.append((state,
|
||||||
heading,
|
heading,
|
||||||
|
|
|
@ -243,14 +243,14 @@ def active_drafts_index_by_group(extra_values=()):
|
||||||
|
|
||||||
# put docs into groups
|
# put docs into groups
|
||||||
for d in docs_dict.itervalues():
|
for d in docs_dict.itervalues():
|
||||||
g = groups_dict.get(d["group_id"])
|
group = groups_dict.get(d["group_id"])
|
||||||
if not g:
|
if not group:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not hasattr(g, "active_drafts"):
|
if not hasattr(group, "active_drafts"):
|
||||||
g.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 = [g for g in groups_dict.itervalues() if hasattr(g, "active_drafts")]
|
||||||
groups.sort(key=lambda g: g.acronym)
|
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)
|
doc.group.txt_link = settings.CHARTER_TXT_URL + "%s-%s.txt" % (doc.canonical_name(), doc.rev)
|
||||||
|
|
||||||
num = get_doc_section(doc)
|
number = get_doc_section(doc)
|
||||||
if num: # and num in sections
|
if number: # and num in sections
|
||||||
sections[num]["docs"].append(doc)
|
sections[number]["docs"].append(doc)
|
||||||
|
|
||||||
# prune empty "For action" sections
|
# 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"]]
|
if section["title"] == "For Action" and not section["docs"]]
|
||||||
for num in empty_for_action:
|
for num in empty_for_action:
|
||||||
del sections[num]
|
del sections[num]
|
||||||
|
|
|
@ -169,14 +169,14 @@ class Draft():
|
||||||
filename = ""
|
filename = ""
|
||||||
revision = ""
|
revision = ""
|
||||||
try:
|
try:
|
||||||
path, base = self.source.rsplit("/", 1)
|
__, base = self.source.rsplit("/", 1)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
path, base = "", self.source
|
base = self.source
|
||||||
if base.startswith("draft-"):
|
if base.startswith("draft-"):
|
||||||
if '.' in base:
|
if '.' in base:
|
||||||
name, ext = base.split(".", 1)
|
name, __ = base.split(".", 1)
|
||||||
else:
|
else:
|
||||||
name, ext = base, ""
|
name = base
|
||||||
revmatch = re.search("\d\d$", name)
|
revmatch = re.search("\d\d$", name)
|
||||||
if revmatch:
|
if revmatch:
|
||||||
filename = name[:-3]
|
filename = name[:-3]
|
||||||
|
@ -877,7 +877,7 @@ class Draft():
|
||||||
_debug(" * Final company list: %s" % (companies,))
|
_debug(" * Final company list: %s" % (companies,))
|
||||||
_debug(" * Final companies_seen: %s" % (companies_seen,))
|
_debug(" * Final companies_seen: %s" % (companies_seen,))
|
||||||
self._author_info = authors
|
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 = [ "%s <%s>"%(full,email) if email else full for full,first,middle,last,suffix,email,company in authors ]
|
||||||
self._authors.sort()
|
self._authors.sort()
|
||||||
_debug(" * Final author list: " + ", ".join(self._authors))
|
_debug(" * Final author list: " + ", ".join(self._authors))
|
||||||
|
|
Loading…
Reference in a new issue