Skip to content

Commit 430fa0a

Browse files
♻️ refactor(librecoll): Remove unused imports and variables, format.
1 parent 594e9f9 commit 430fa0a

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.bin/librecoll.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
import os
21
import arrow
32
import human
43
humanbytes = human.bytes
54

65
def formatdoc(doc):
76

87
path = doc.url[7:]
9-
dirname = os.path.dirname(path)
108
hint = '/'.join(map(lambda x : x[:2], path.split('/')[3:-1]))
119

1210
try:
13-
timestamp = arrow.get(doc.mtime)
14-
htime = timestamp.humanize()
15-
hdate = timestamp.format('YYYY-MM-DDTHH:mm:ssZZ')
11+
timestamp = arrow.get(doc.mtime)
12+
htime = timestamp.humanize()
13+
hdate = timestamp.format('YYYY-MM-DDTHH:mm:ssZZ')
1614
except Exception as e:
17-
htime = 'unknown'
18-
hdate = 'unknown'
15+
htime = 'unknown'
16+
hdate = 'unknown'
1917

2018
try:
21-
hbytes = humanbytes(int(doc.fbytes))
19+
hbytes = humanbytes(int(doc.fbytes))
2220
except Exception as e:
23-
hbytes = 'unknown'
21+
hbytes = 'unknown'
2422

2523
formatarray = ['{htime}', '>']
2624

0 commit comments

Comments
 (0)