python formatting. Run autopep8 and replace tabs with spaces.
autopep8 -i --max-line-length=160 *.py sed -i 's/\t/ /' *.py [ci skip]
This commit is contained in:
parent
f624905534
commit
fe1ae7240a
|
@ -3,6 +3,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
def readdate(data):
|
def readdate(data):
|
||||||
if data[:5] == 'DATE ':
|
if data[:5] == 'DATE ':
|
||||||
datepos = 0
|
datepos = 0
|
||||||
|
@ -30,11 +31,12 @@ def readdate(data):
|
||||||
return None
|
return None
|
||||||
datepos += 1
|
datepos += 1
|
||||||
|
|
||||||
|
|
||||||
def summaryHtml(style, font, text1, text2, text3):
|
def summaryHtml(style, font, text1, text2, text3):
|
||||||
font1 = ''
|
font1 = ''
|
||||||
font2 = ''
|
font2 = ''
|
||||||
if font:
|
if font:
|
||||||
font1 = font
|
font1 = font
|
||||||
font2 = '</font>'
|
font2 = '</font>'
|
||||||
return '<tr> ' +
|
return '<tr> ' +
|
||||||
'<td ' + style + '>' + font1 + text1 + font2 + '</td> ' +
|
'<td ' + style + '>' + font1 + text1 + font2 + '</td> ' +
|
||||||
|
|
|
@ -215,7 +215,7 @@ try:
|
||||||
for archive in archives:
|
for archive in archives:
|
||||||
if len(args.skip) > 0:
|
if len(args.skip) > 0:
|
||||||
a = archive[:archive.rfind('/')]
|
a = archive[:archive.rfind('/')]
|
||||||
a = a[a.rfind('/')+1:]
|
a = a[a.rfind('/') + 1:]
|
||||||
if a in args.skip:
|
if a in args.skip:
|
||||||
continue
|
continue
|
||||||
scanarchive(archive, args.jobs, args.cpulimit)
|
scanarchive(archive, args.jobs, args.cpulimit)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import sys
|
||||||
|
|
||||||
TRACDB = 'trac.db'
|
TRACDB = 'trac.db'
|
||||||
|
|
||||||
|
|
||||||
def readdb():
|
def readdb():
|
||||||
global TRACDB
|
global TRACDB
|
||||||
cmds = ['sqlite3', TRACDB, 'SELECT id,keywords FROM ticket WHERE status<>"closed";']
|
cmds = ['sqlite3', TRACDB, 'SELECT id,keywords FROM ticket WHERE status<>"closed";']
|
||||||
|
@ -16,12 +17,12 @@ def readdb():
|
||||||
if pos1 <= 0:
|
if pos1 <= 0:
|
||||||
continue
|
continue
|
||||||
nr = line[:pos1]
|
nr = line[:pos1]
|
||||||
for kw in line[pos1+1:].split(' '):
|
for kw in line[pos1 + 1:].split(' '):
|
||||||
if kw == '':
|
if kw == '':
|
||||||
continue
|
continue
|
||||||
if kw not in ret:
|
if kw not in ret:
|
||||||
ret[kw] = []
|
ret[kw] = []
|
||||||
ret[kw].append(nr);
|
ret[kw].append(nr)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
for arg in sys.argv[1:]:
|
for arg in sys.argv[1:]:
|
||||||
|
@ -35,5 +36,3 @@ for kw in sorted(data.keys()):
|
||||||
for ticket in data[kw]:
|
for ticket in data[kw]:
|
||||||
out = out + ' ' + ticket
|
out = out + ' ' + ticket
|
||||||
print(out)
|
print(out)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue