diff options
-rw-r--r-- | .pylintrc | 3 | ||||
-rw-r--r-- | qutebrowser/utils/urlmatch.py | 2 | ||||
-rw-r--r-- | qutebrowser/utils/urlutils.py | 2 | ||||
-rw-r--r-- | scripts/dev/run_pylint_on_tests.py | 1 |
4 files changed, 5 insertions, 3 deletions
@@ -7,7 +7,8 @@ load-plugins=qute_pylint.config, qute_pylint.modeline, qute_pylint.openencoding, qute_pylint.settrace, - pylint.extensions.docstyle + pylint.extensions.docstyle, + pylint.extensions.emptystring, persistent=n [MESSAGES CONTROL] diff --git a/qutebrowser/utils/urlmatch.py b/qutebrowser/utils/urlmatch.py index cad844fc3..db7adf139 100644 --- a/qutebrowser/utils/urlmatch.py +++ b/qutebrowser/utils/urlmatch.py @@ -161,7 +161,7 @@ class UrlPattern: if parsed.path == '/*': self._path = None - elif parsed.path == '': + elif not parsed.path: # When the user doesn't add a trailing slash, we assume the pattern # matches any path. self._path = None diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index 12afb2e8e..c6f4cb858 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -490,7 +490,7 @@ def same_domain(url1, url2): suffix1 = url1.topLevelDomain() suffix2 = url2.topLevelDomain() - if suffix1 == '': + if not suffix1: return url1.host() == url2.host() if suffix1 != suffix2: diff --git a/scripts/dev/run_pylint_on_tests.py b/scripts/dev/run_pylint_on_tests.py index c041d9f70..814b235a2 100644 --- a/scripts/dev/run_pylint_on_tests.py +++ b/scripts/dev/run_pylint_on_tests.py @@ -57,6 +57,7 @@ def main(): 'missing-docstring', 'protected-access', 'len-as-condition', + 'compare-to-empty-string', # directories without __init__.py... 'import-error', ] |