mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Use proper docstrings
This commit is contained in:
parent
1fb6024454
commit
349bd9d681
2 changed files with 9 additions and 7 deletions
|
@ -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))
|
||||
|
|
|
@ -1621,8 +1621,9 @@ title="%s" %s>%s</button>""" % (
|
|||
# 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)
|
||||
|
|
Loading…
Reference in a new issue