Skip to content

Commit

Permalink
mypy: Remvoe some more type ignores
Browse files Browse the repository at this point in the history
Fixed in latest PyQt snapshots
  • Loading branch information
The-Compiler committed Jul 13, 2023
1 parent 9646f53 commit 3b04cb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions qutebrowser/completion/completiondelegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,7 @@ def sizeHint(self, option, index):
size = self._style.sizeFromContents(QStyle.ContentsType.CT_ItemViewItem, self._opt,
docsize, self._opt.widget)
qtutils.ensure_valid(size)
# FIXME:mypy https://www.riverbankcomputing.com/pipermail/pyqt/2023-July/045400.html
return size + QSize(10, 3) # type: ignore[call-arg,unused-ignore]
return size + QSize(10, 3)

def paint(self, painter, option, index):
"""Override the QStyledItemDelegate paint function.
Expand Down
3 changes: 1 addition & 2 deletions qutebrowser/misc/crashdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,7 @@ def __init__(self, exc_text, text, parent=None):
hbox = QHBoxLayout()
hbox.addStretch()
btn = QPushButton("Close")
# FIXME:mypy PyQt6-stubs issue
btn.clicked.connect(self.close) # type: ignore[arg-type,unused-ignore]
btn.clicked.connect(self.close)
hbox.addWidget(btn)
vbox.addLayout(hbox)

Expand Down

0 comments on commit 3b04cb1

Please sign in to comment.