From 4435ef928796fa744be5452924a103bb2e58ee8e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 3 Dec 2021 11:58:41 +0100 Subject: pylint: Enable else-if-used --- qutebrowser/utils/utils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'qutebrowser/utils/utils.py') diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index f42515c5c..75da5028b 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -391,11 +391,10 @@ def get_repr(obj: Any, constructor: bool = False, **attrs: Any) -> str: parts.append('{}={!r}'.format(name, val)) if constructor: return '{}({})'.format(cls, ', '.join(parts)) + elif parts: + return '<{} {}>'.format(cls, ' '.join(parts)) else: - if parts: - return '<{} {}>'.format(cls, ' '.join(parts)) - else: - return '<{}>'.format(cls) + return '<{}>'.format(cls) def qualname(obj: Any) -> str: -- cgit v1.2.3-54-g00ecf