From a7f4e3d2badb02da1ea26e556714c555aff87bbf Mon Sep 17 00:00:00 2001 From: Jason Rosenzweig Date: Mon, 19 Jul 2021 21:42:22 +0800 Subject: [PATCH] Changed variable name --- qutebrowser/mainwindow/prompt.py | 6 +++--- tests/unit/mainwindow/test_prompt.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index 59e4a2cda..607682b37 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -616,7 +616,7 @@ class FilenamePrompt(_BasePrompt): self._init_texts(question) self._init_key_label() - self._expands_user = False + self._user_expanded = False self._lineedit = LineEdit(self) if question.default: @@ -654,7 +654,7 @@ class FilenamePrompt(_BasePrompt): # If the path is not the same as the path with expanduser set a boolean if os.path.expanduser(path) != path: path = os.path.expanduser(path) - self._expands_user = True + self._user_expanded = True dirname = os.path.dirname(path) basename = os.path.basename(path) @@ -704,7 +704,7 @@ class FilenamePrompt(_BasePrompt): # On Windows, when we have C:\foo and tab over .., we get C:\ path = path.rstrip(os.sep) - if self._expands_user: + if self._user_expanded: path = path.replace(os.path.expanduser('~'), '~', 1) log.prompt.debug('Inserting path {}'.format(path)) diff --git a/tests/unit/mainwindow/test_prompt.py b/tests/unit/mainwindow/test_prompt.py index f3cd743e7..86bb02271 100644 --- a/tests/unit/mainwindow/test_prompt.py +++ b/tests/unit/mainwindow/test_prompt.py @@ -178,4 +178,4 @@ class TestFileCompletion: prompt.item_focus('next') # If $HOME is contracted to `~` this test will fail as that is unexpected assert (prompt._lineedit.text() != - prompt._lineedit.text().replace(os.path.expanduser('~'), '~', 1)) \ No newline at end of file + prompt._lineedit.text().replace(os.path.expanduser('~'), '~', 1))