pylint: Enable emptystring extension

This commit is contained in:
Florian Bruhin 2019-10-01 12:35:55 +02:00
parent 5dd784fcfc
commit 8cd65dcc1b
4 changed files with 5 additions and 3 deletions

View File

@ -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]

View File

@ -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

View File

@ -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:

View File

@ -57,6 +57,7 @@ def main():
'missing-docstring',
'protected-access',
'len-as-condition',
'compare-to-empty-string',
# directories without __init__.py...
'import-error',
]