From 288bf1524e84e829863384f4f67e94d3cbf93d3d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 30 Nov 2015 07:10:21 +0100 Subject: [PATCH] Fix some unidiomatic comparisons. --- qutebrowser/utils/urlutils.py | 2 +- tests/unit/config/test_configtypes.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index 948d2b5c7..4c189ac3b 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -424,7 +424,7 @@ def same_domain(url1, url2): if suffix1 == '': return url1.host() == url2.host() - if not suffix1 == suffix2: + if suffix1 != suffix2: return False domain1 = url1.host()[:-len(suffix1)].split('.')[-1] diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index 43190c3cf..77b37296f 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -1984,10 +1984,10 @@ class TestConfirmQuit: assert 'never' in completions assert 'multiple-tabs,downloads' in completions for val in completions: - assert not 'always,' in val - assert not ',always' in val - assert not 'never,' in val - assert not ',never' in val + assert 'always,' not in val + assert ',always' not in val + assert 'never,' not in val + assert ',never' not in val class TestFormatString: