diff options
author | Jason Rosenzweig <mail4jasonr@gmail.com> | 2021-06-04 10:04:34 +0800 |
---|---|---|
committer | Jason Rosenzweig <mail4jasonr@gmail.com> | 2021-06-04 10:04:34 +0800 |
commit | df28469d441266b45708cf065d6c0432f90c1819 (patch) | |
tree | 4490c261eae69ec2850d56fc33a7fab201b62f32 | |
parent | 4fc17293b02ee8e27f31143364545e1b23991257 (diff) | |
download | qutebrowser-df28469d441266b45708cf065d6c0432f90c1819.tar.gz qutebrowser-df28469d441266b45708cf065d6c0432f90c1819.zip |
Fixed indentation, typing
-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()) |