diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9633bb1c..364a9285 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -14,6 +14,7 @@ repos:
rev: 6.0.0
hooks:
- id: flake8
+ exclude: ^(.tox|env|build|dist|help|qt/dg_rc.py|pkg).*
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.3.0
hooks:
diff --git a/core/fs.py b/core/fs.py
index 647a5cfd..6b3c2864 100644
--- a/core/fs.py
+++ b/core/fs.py
@@ -97,12 +97,14 @@ class FilesDB:
schema_version = 1
schema_version_description = "Changed from md5 to xxhash if available."
- create_table_query = "CREATE TABLE IF NOT EXISTS files (path TEXT PRIMARY KEY, size INTEGER, mtime_ns INTEGER, entry_dt DATETIME, digest BLOB, digest_partial BLOB, digest_samples BLOB)"
+ create_table_query = """CREATE TABLE IF NOT EXISTS files (path TEXT PRIMARY KEY, size INTEGER, mtime_ns INTEGER,
+ entry_dt DATETIME, digest BLOB, digest_partial BLOB, digest_samples BLOB)"""
drop_table_query = "DROP TABLE IF EXISTS files;"
select_query = "SELECT {key} FROM files WHERE path=:path AND size=:size and mtime_ns=:mtime_ns"
select_query_ignore_mtime = "SELECT {key} FROM files WHERE path=:path AND size=:size"
insert_query = """
- INSERT INTO files (path, size, mtime_ns, entry_dt, {key}) VALUES (:path, :size, :mtime_ns, datetime('now'), :value)
+ INSERT INTO files (path, size, mtime_ns, entry_dt, {key})
+ VALUES (:path, :size, :mtime_ns, datetime('now'), :value)
ON CONFLICT(path) DO UPDATE SET size=:size, mtime_ns=:mtime_ns, entry_dt=datetime('now'), {key}=:value;
"""
@@ -153,7 +155,8 @@ class FilesDB:
self.cur.execute(self.select_query_ignore_mtime.format(key=key), {"path": str(path), "size": size})
else:
self.cur.execute(
- self.select_query.format(key=key), {"path": str(path), "size": size, "mtime_ns": mtime_ns}
+ self.select_query.format(key=key),
+ {"path": str(path), "size": size, "mtime_ns": mtime_ns},
)
result = self.cur.fetchone()
diff --git a/qt/exclude_list_dialog.py b/qt/exclude_list_dialog.py
index 7b5c9c64..43747b5d 100644
--- a/qt/exclude_list_dialog.py
+++ b/qt/exclude_list_dialog.py
@@ -165,8 +165,8 @@ Directores will also have their default state set to Excluded \
in the Directories tab if their name happens to match one of the selected regular expressions.
\
For each file collected, two tests are performed to determine whether or not to completely ignore it:
\
.*My\\sPictures\\\\.*\\.png
C:\\\\User\\My Pictures\\test.png