diff options
-rw-r--r-- | qutebrowser/mainwindow/prompt.py | 4 | ||||
-rw-r--r-- | tests/unit/mainwindow/test_prompt.py | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index 2581831f6..962698dc0 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -24,7 +24,7 @@ import html import collections import functools import dataclasses -from typing import Deque, MutableSequence, Optional, cast +from typing import Deque, Dict, List, MutableSequence, Optional, cast from PyQt5.QtCore import (pyqtSlot, pyqtSignal, Qt, QTimer, QDir, QModelIndex, QItemSelectionModel, QObject, QEventLoop) @@ -731,7 +731,7 @@ class FilenamePrompt(_BasePrompt): lambda: self._file_model.sort(0)) def _get_dirs(self): - dirs = {"valid": [], "invalid": []} # type: dict[list[str]] + dirs = {"valid": [], "invalid": []} # type: Dict[str, List[str]] try: num_rows = self._file_model.rowCount(self._root_index) for row in range(num_rows): diff --git a/tests/unit/mainwindow/test_prompt.py b/tests/unit/mainwindow/test_prompt.py index 48bc703a7..09c8ef6f6 100644 --- a/tests/unit/mainwindow/test_prompt.py +++ b/tests/unit/mainwindow/test_prompt.py @@ -116,10 +116,7 @@ class TestFileCompletion: visible = [] for row in range(num_rows): parent = prompt._file_model.index( - os.path.basename( - prompt._lineedit.text() - ) - ) + os.path.basename(prompt._lineedit.text())) index = prompt._file_model.index(row, 0, parent) if prompt._file_view.isRowHidden(index.row(), index.parent()): visible.append(index.data()) |