Remove trailing whitespace

This commit is contained in:
Łukasz Langa 2020-05-17 21:17:19 +02:00
parent 8e9e37094d
commit 7608b56ea6
No known key found for this signature in database
GPG Key ID: B26995E310250568
2 changed files with 17 additions and 4 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
root = true
[*]
trim_trailing_whitespace = true
insert_final_newline = true
[*.{py,pyx,pxd,pxi,yml,h}]
indent_size = 4
indent_style = space
[ext/*.{c,cpp,h}]
indent_size = 4
indent_style = tab

View File

@ -271,7 +271,7 @@ class Bitrot(object):
cur.execute('DELETE FROM bitrot WHERE path=?', (normalize_path(path),)) # it is expected that content of missing_paths is already normalized, but just to be sure
conn.commit()
if not self.test:
cur.execute('vacuum')
@ -308,7 +308,7 @@ class Bitrot(object):
result = {}
cur.execute('SELECT hash, path FROM bitrot')
row = cur.fetchone()
while row:
while row:
rhash, rpath = row
result.setdefault(rhash, set()).add(rpath)
row = cur.fetchone()
@ -386,8 +386,8 @@ class Bitrot(object):
)
return renamed
# From hashes[new_sha1] or found.pop()
# From hashes[new_sha1] or found.pop()
except (KeyError,IndexError):
cur.execute(
'INSERT INTO bitrot VALUES (?, ?, ?, ?)',