Skip to content

Commit d7e061b

Browse files
committed
chore: fix ruff
1 parent 85c59dd commit d7e061b

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/promnesia/sources/signal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def connect_db(
376376

377377

378378
def _handle_row(row: tuple, db_path: PathIsh, locator_schema: str) -> Results:
379-
mid, tstamp, sender, cid, chatname, text = row
379+
mid, tstamp, sender, _cid, chatname, text = row
380380
urls = extract_urls(text)
381381
if not urls:
382382
return

src/promnesia/tests/sources/test_auto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_json() -> None:
2828
assert mm.keys() == _JSON_URLS
2929

3030
# TODO not sure if they deserve separate visits..
31-
[v1, v2] = mm[sa2464]
31+
[v1, _v2] = mm[sa2464]
3232
assert v1.context == 'list::yyy::given_url'
3333
# todo not sure if editor:// work on Windows
3434
assert v1.locator.href.startswith('editor://')

src/promnesia/tests/sources/test_filetypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
def handled(p: PathIsh) -> bool:
9-
idx, m = by_path(Path(p))
9+
idx, _m = by_path(Path(p))
1010
return idx is not None
1111
# ideally these won't hit libmagic path (would try to open the file and cause FileNotFoundError)
1212

src/promnesia/tests/test_indexer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ def HOOK(visit: Res[DbVisit]) -> Iterator[Res[DbVisit]]:
228228
write_config(cfg_path, cfg)
229229
do_index(cfg_path)
230230

231-
[p0, p1, e2, p41, p42, p5, p6] = get_all_db_visits(tmp_path / 'promnesia.sqlite')
231+
[p0, p1, e2, p41, p42, _p5, p6] = get_all_db_visits(tmp_path / 'promnesia.sqlite')
232+
# todo what is p5? test it?
232233
assert p0.norm_url == 'demo.com/page0.html'
233234
assert p1.norm_url == 'patched.com'
234235
assert e2.norm_url == '<error>'

0 commit comments

Comments
 (0)