From 05ca797ee67b835df61e0f8d2bd41e8e6b0c020a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 6 May 2020 09:25:23 +1000 Subject: [PATCH] add pep8 name for findReplace --- pylib/anki/collection.py | 3 ++- qt/aqt/browser.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pylib/anki/collection.py b/pylib/anki/collection.py index 4ade3e6fb..b6c73234a 100644 --- a/pylib/anki/collection.py +++ b/pylib/anki/collection.py @@ -586,7 +586,7 @@ select id from notes where id in %s and id not in (select nid from cards)""" self.flush_all_changes() return self.backend.search_notes(query) - def findReplace( + def find_and_replace( self, nids: List[int], src: str, @@ -602,6 +602,7 @@ select id from notes where id in %s and id not in (select nid from cards)""" findCards = find_cards findNotes = find_notes + findReplace = find_and_replace # Config ########################################################################## diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index cc72bd8e9..c40aa5135 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -1967,7 +1967,9 @@ update cards set usn=?, mod=?, did=? where id in """ self.model.beginReset() def do_search(): - return self.col.findReplace(nids, search, replace, regex, field, nocase) + return self.col.find_and_replace( + nids, search, replace, regex, field, nocase + ) def on_done(fut): self.search()