Add missing docstrings.
This commit is contained in:
parent
5479627d86
commit
fd8949b8b7
7 changed files with 12 additions and 0 deletions
1
Makefile
1
Makefile
|
@ -103,6 +103,7 @@ doccheck:
|
||||||
py-check-docstrings --force \
|
py-check-docstrings --force \
|
||||||
dosagelib/*.py \
|
dosagelib/*.py \
|
||||||
dosage \
|
dosage \
|
||||||
|
scripts \
|
||||||
*.py
|
*.py
|
||||||
|
|
||||||
pyflakes:
|
pyflakes:
|
||||||
|
|
|
@ -74,6 +74,7 @@ def get_results():
|
||||||
|
|
||||||
|
|
||||||
def has_creators_comic(name):
|
def has_creators_comic(name):
|
||||||
|
"""Test if comic name already exists."""
|
||||||
cname = "Creators/%s" % name
|
cname = "Creators/%s" % name
|
||||||
for scraperclass in get_scrapers():
|
for scraperclass in get_scrapers():
|
||||||
lname = scraperclass.get_name().lower()
|
lname = scraperclass.get_name().lower()
|
||||||
|
|
|
@ -401,6 +401,7 @@ def get_results():
|
||||||
|
|
||||||
|
|
||||||
def has_comic(name):
|
def has_comic(name):
|
||||||
|
"""Check if comic name already exists."""
|
||||||
cname = ("Creators/%s" % name).lower()
|
cname = ("Creators/%s" % name).lower()
|
||||||
gname = ("GoComics/%s" % name).lower()
|
gname = ("GoComics/%s" % name).lower()
|
||||||
for scraperclass in get_scrapers():
|
for scraperclass in get_scrapers():
|
||||||
|
|
|
@ -45,10 +45,12 @@ def get_mtime (filename):
|
||||||
|
|
||||||
|
|
||||||
def strdate(t):
|
def strdate(t):
|
||||||
|
"""Get formatted date string."""
|
||||||
return time.strftime("%d.%m.%Y", time.localtime(t))
|
return time.strftime("%d.%m.%Y", time.localtime(t))
|
||||||
|
|
||||||
|
|
||||||
def get_test_name(line):
|
def get_test_name(line):
|
||||||
|
"""Get scraper name from test output line."""
|
||||||
classname = line.split('::')[1][4:]
|
classname = line.split('::')[1][4:]
|
||||||
for scraper in get_scrapers():
|
for scraper in get_scrapers():
|
||||||
if scraper.__name__ == classname:
|
if scraper.__name__ == classname:
|
||||||
|
@ -61,12 +63,14 @@ def get_test_name(line):
|
||||||
|
|
||||||
|
|
||||||
def get_test(line):
|
def get_test(line):
|
||||||
|
"""Get test name from test output line."""
|
||||||
name, url = get_test_name(line)
|
name, url = get_test_name(line)
|
||||||
result = "OK" if line.startswith(". ") else "FAILED"
|
result = "OK" if line.startswith(". ") else "FAILED"
|
||||||
return [name, url, result, ""]
|
return [name, url, result, ""]
|
||||||
|
|
||||||
|
|
||||||
def get_content(filename):
|
def get_content(filename):
|
||||||
|
"""Get HTML content for test output."""
|
||||||
tests = []
|
tests = []
|
||||||
with open(filename, "r") as f:
|
with open(filename, "r") as f:
|
||||||
print("Tests parsed: 0", end=" ", file=sys.stderr)
|
print("Tests parsed: 0", end=" ", file=sys.stderr)
|
||||||
|
@ -103,10 +107,12 @@ def get_content(filename):
|
||||||
|
|
||||||
|
|
||||||
def quote_all(*args):
|
def quote_all(*args):
|
||||||
|
"""CGI-escape all arguments for."""
|
||||||
return tuple(cgi.escape(x, quote=True) for x in args)
|
return tuple(cgi.escape(x, quote=True) for x in args)
|
||||||
|
|
||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
|
"""Generate HTML output for test result."""
|
||||||
filename = args[0]
|
filename = args[0]
|
||||||
modified = get_mtime(filename)
|
modified = get_mtime(filename)
|
||||||
content = get_content(filename)
|
content = get_content(filename)
|
||||||
|
|
|
@ -7,6 +7,7 @@ import fileinput
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
|
"""Remove lines after marker."""
|
||||||
filename = args[0]
|
filename = args[0]
|
||||||
marker = args[1]
|
marker = args[1]
|
||||||
for line in fileinput.input(filename, inplace=1):
|
for line in fileinput.input(filename, inplace=1):
|
||||||
|
|
|
@ -284,6 +284,7 @@ def get_results():
|
||||||
|
|
||||||
|
|
||||||
def has_comic(name):
|
def has_comic(name):
|
||||||
|
"""Check if comic name already exists."""
|
||||||
cname = name.lower()
|
cname = name.lower()
|
||||||
for scraperclass in get_scrapers():
|
for scraperclass in get_scrapers():
|
||||||
lname = scraperclass.get_name().lower()
|
lname = scraperclass.get_name().lower()
|
||||||
|
|
|
@ -68,6 +68,7 @@ def get_results():
|
||||||
|
|
||||||
|
|
||||||
def has_comic(name):
|
def has_comic(name):
|
||||||
|
"""Check if comic name already exists."""
|
||||||
cname = ("Creators/%s" % name).lower()
|
cname = ("Creators/%s" % name).lower()
|
||||||
gname = ("GoComics/%s" % name).lower()
|
gname = ("GoComics/%s" % name).lower()
|
||||||
for scraperclass in get_scrapers():
|
for scraperclass in get_scrapers():
|
||||||
|
|
Loading…
Reference in a new issue