From 7d04f155c8a15b588a265af63d96445cd949c992 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Thu, 23 Mar 2017 08:29:22 -0400 Subject: [PATCH] Add missing docstring. --- qutebrowser/completion/models/sqlcategory.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qutebrowser/completion/models/sqlcategory.py b/qutebrowser/completion/models/sqlcategory.py index 4f767abbf..693aaa841 100644 --- a/qutebrowser/completion/models/sqlcategory.py +++ b/qutebrowser/completion/models/sqlcategory.py @@ -49,6 +49,12 @@ class SqlCategory(QSqlQueryModel): self.set_pattern('', [0]) def set_pattern(self, pattern, columns_to_filter): + """Set the pattern used to filter results. + + Args: + pattern: string pattern to filter by. + columns_to_filter: indices of columns to apply pattern to. + """ query = sql.run_query('select * from {} limit 1'.format(self.name)) fields = [query.record().fieldName(i) for i in columns_to_filter]