mypy: Remove ignores which are now unneeded

This commit is contained in:
Florian Bruhin 2020-05-13 22:01:01 +02:00
parent c8766b3b02
commit 1e35f7ca51
4 changed files with 4 additions and 6 deletions

View File

@ -50,8 +50,7 @@ class DownloadItem(downloads.AbstractDownloadItem):
# Ensure wrapped qt_item is deleted manually when the wrapper object
# is deleted. See https://github.com/qutebrowser/qutebrowser/issues/3373
self.destroyed.connect( # type: ignore[attr-defined]
self._qt_item.deleteLater)
self.destroyed.connect(self._qt_item.deleteLater)
def _is_page_download(self):
"""Check if this item is a page (i.e. mhtml) download."""

View File

@ -386,7 +386,7 @@ class MainWindow(QWidget):
scope='window', window=self.win_id)
widget = self.tabbed_browser.widget
widget.destroyed.connect( # type: ignore[attr-defined]
widget.destroyed.connect(
functools.partial(objreg.delete, 'command-dispatcher',
scope='window', window=self.win_id))

View File

@ -192,8 +192,7 @@ class PromptQueue(QObject):
if blocking:
loop = qtutils.EventLoop()
self._loops.append(loop)
loop.destroyed.connect( # type: ignore[attr-defined]
lambda: self._loops.remove(loop))
loop.destroyed.connect(lambda: self._loops.remove(loop))
question.completed.connect(loop.quit)
question.completed.connect(loop.deleteLater)
log.prompt.debug("Starting loop.exec_() for {}".format(question))

View File

@ -86,7 +86,7 @@ class ObjectRegistry(collections.UserDict):
if isinstance(obj, QObject):
func = functools.partial(self.on_destroyed, name)
obj.destroyed.connect(func) # type: ignore[attr-defined]
obj.destroyed.connect(func)
self._partial_objs[name] = func
super().__setitem__(name, obj)