From 8b14145a4d63699ce10a80154642102d6d531d6a Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 3 Jun 2015 19:31:31 -0400 Subject: [PATCH] Fixed style. --- qutebrowser/completion/models/urlmodel.py | 3 +-- qutebrowser/mainwindow/statusbar/command.py | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qutebrowser/completion/models/urlmodel.py b/qutebrowser/completion/models/urlmodel.py index 80cae22e9..d0d603c19 100644 --- a/qutebrowser/completion/models/urlmodel.py +++ b/qutebrowser/completion/models/urlmodel.py @@ -99,8 +99,7 @@ class UrlCompletionModel(base.BaseCompletionModel): self.new_item(self._bookmark_cat, url, title) def custom_filter(self, pattern, row, parent): - """Filter by url and title. - """ + """Filter by url and title.""" index0 = self.index(row, 0, parent) index1 = self.index(row, 1, parent) url = self.data(index0) or '' diff --git a/qutebrowser/mainwindow/statusbar/command.py b/qutebrowser/mainwindow/statusbar/command.py index 93035d36f..86b761fdc 100644 --- a/qutebrowser/mainwindow/statusbar/command.py +++ b/qutebrowser/mainwindow/statusbar/command.py @@ -211,16 +211,16 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit): e.ignore() return else: - if e.key() == Qt.Key_D and e.modifiers() & Qt.ControlModifier == Qt.ControlModifier: + if e.key() == Qt.Key_D and (e.modifiers() & Qt.ControlModifier == + Qt.ControlModifier): self.delete_current_item() else: super().keyPressEvent(e) def delete_current_item(self): - completer_obj = objreg.get('completer', scope='window', - window=self._win_id) + """Delete the selected bookmark/quickmark.""" completion = objreg.get('completion', scope='window', - window=self._win_id) + window=self._win_id) index = completion.currentIndex() model = completion.model() url = model.data(index) @@ -232,7 +232,8 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit): message.info(self._win_id, "Bookmarks deleted") elif category.data() == 'Quickmarks': quickmark_manager = objreg.get('quickmark-manager') - name = model.data(index.sibling(index.row(), index.column() + 1)) + name = model.data(index.sibling(index.row(), + index.column() + 1)) quickmark_manager.quickmark_del(name) message.info(self._win_id, "Quickmarks deleted")