From b4077a8543cc41ce2553f29c6c028e7c00411b6e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 9 Sep 2018 17:59:18 +0200 Subject: [PATCH] Fix lint --- qutebrowser/browser/downloads.py | 2 +- qutebrowser/browser/pdfjs.py | 1 - tests/unit/browser/test_qutescheme.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index fddaa37ed..594bdf8bb 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -778,7 +778,7 @@ class AbstractDownloadItem(QObject): elif isinstance(target, PDFJSDownloadTarget): self.finished.connect(self._pdfjs_if_successful) else: - assert False, target + raise utils.Unreachable self._set_tempfile(fobj) else: # pragma: no cover diff --git a/qutebrowser/browser/pdfjs.py b/qutebrowser/browser/pdfjs.py index a0bad1cac..db849cb04 100644 --- a/qutebrowser/browser/pdfjs.py +++ b/qutebrowser/browser/pdfjs.py @@ -27,7 +27,6 @@ from PyQt5.QtCore import QUrl, QUrlQuery from qutebrowser.utils import utils, javascript, jinja, qtutils, usertypes from qutebrowser.misc import objects from qutebrowser.config import config -from qutebrowser.browser import downloads class PDFJSNotFound(Exception): diff --git a/tests/unit/browser/test_qutescheme.py b/tests/unit/browser/test_qutescheme.py index 322939db0..761769e16 100644 --- a/tests/unit/browser/test_qutescheme.py +++ b/tests/unit/browser/test_qutescheme.py @@ -22,7 +22,7 @@ import os import time import logging -import py.path +import py.path # pylint: disable=no-name-in-module from PyQt5.QtCore import QUrl import pytest @@ -189,7 +189,7 @@ class TestPDFJSHandler: @pytest.fixture def download_tmpdir(self): tdir = downloads.temp_download_manager.get_tmpdir() - yield py.path.local(tdir.name) + yield py.path.local(tdir.name) # pylint: disable=no-member tdir.cleanup() def test_existing_resource(self):