diff --git a/pylib/anki/collection.py b/pylib/anki/collection.py index 076c40186..379f50e1e 100644 --- a/pylib/anki/collection.py +++ b/pylib/anki/collection.py @@ -484,11 +484,6 @@ class Collection: # Search Strings ########################################################################## - # Helper function for the backend's search string operations. - # Pass search strings as 'searches' to normalize. - # Pass multiple to concatenate (defaults to 'and'). - # Pass 'negate=True' to negate the end result. - # May raise InvalidInput. def search_string( self, *, @@ -507,7 +502,13 @@ class Collection: nids: Optional[List[int]] = None, field_name: Optional[str] = None, ) -> str: - filters = searches or [] + """Helper function for the backend's search string operations. + + Pass search strings as 'search_strings' to normalize. + Pass multiple to concatenate (defaults to 'and'). + Pass 'negate=True' to negate the end result. + May raise InvalidInput. + """ def append_filter(filter_in): filters.append(self.backend.filter_to_search(filter_in)) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index 1f1dc79aa..b0e46f6c3 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -1621,8 +1621,9 @@ title="%s" %s>%s""" % ( # Helpers for all windows ########################################################################## - # Wrapper for col.search_string() to look up the result in the browser. def browser_search(self, **kwargs) -> None: + """Wrapper for col.search_string() to look up the result in the browser.""" + search = self.col.search_string(**kwargs) browser = aqt.dialogs.open("Browser", self) browser.form.searchEdit.lineEdit().setText(search)