From 7608b56ea693c6c1a8db2b003cd1f994d60e09c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Sun, 17 May 2020 21:17:19 +0200 Subject: [PATCH] Remove trailing whitespace --- .editorconfig | 13 +++++++++++++ src/bitrot.py | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..69692d3 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/src/bitrot.py b/src/bitrot.py index 8b9e65d..9a37745 100755 --- a/src/bitrot.py +++ b/src/bitrot.py @@ -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 (?, ?, ?, ?)',