mypy: Update ignore comments
This commit is contained in:
parent
4a9dea0aef
commit
2d6d9e108e
|
|
@ -122,7 +122,7 @@ def _walk_pyinstaller() -> Iterator[ExtensionInfo]:
|
|||
toc: Set[str] = set()
|
||||
for importer in pkgutil.iter_importers('qutebrowser'):
|
||||
if hasattr(importer, 'toc'):
|
||||
toc |= importer.toc
|
||||
toc |= importer.toc # type: ignore[union-attr]
|
||||
for name in toc:
|
||||
if name.startswith(components.__name__ + '.'):
|
||||
yield ExtensionInfo(name=name)
|
||||
|
|
|
|||
|
|
@ -49,8 +49,7 @@ def check_python_version():
|
|||
version_str = '.'.join(map(str, sys.version_info[:3]))
|
||||
text = ("At least Python 3.6.1 is required to run qutebrowser, but " +
|
||||
"it's running with " + version_str + ".\n")
|
||||
if (Tk and # type: ignore[unreachable]
|
||||
'--no-err-windows' not in sys.argv): # pragma: no cover
|
||||
if Tk and '--no-err-windows' not in sys.argv: # pragma: no cover
|
||||
root = Tk()
|
||||
root.withdraw()
|
||||
messagebox.showerror("qutebrowser: Fatal error!", text)
|
||||
|
|
|
|||
|
|
@ -491,8 +491,7 @@ def qt_message_handler(msg_type: QtCore.QtMsgType,
|
|||
else:
|
||||
func = context.function
|
||||
|
||||
if (context.category is None or # type: ignore[unreachable]
|
||||
context.category == 'default'):
|
||||
if context.category is None or context.category == 'default':
|
||||
name = 'qt'
|
||||
else:
|
||||
name = 'qt-' + context.category
|
||||
|
|
|
|||
Loading…
Reference in New Issue