From 89c7b0e7f830f6b756d2084024b8c772f1193326 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 8 May 2016 22:18:14 +0200 Subject: [PATCH] Simplify if-statement --- qutebrowser/browser/hints.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 8ba1bc45c..de137eb9e 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -490,11 +490,8 @@ class HintManager(QObject): url: The URL to open as a QUrl. context: The HintContext to use. """ - if (context.target == Target.yank_primary and - utils.supports_selection()): - sel = True - else: - sel = False + sel = (context.target == Target.yank_primary and + utils.supports_selection()) urlstr = url.toString(QUrl.FullyEncoded | QUrl.RemovePassword) utils.set_clipboard(urlstr, selection=sel)