diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-12-03 11:58:41 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-12-03 12:04:59 +0100 |
commit | 4435ef928796fa744be5452924a103bb2e58ee8e (patch) | |
tree | 73f99cf693fa492ce22e228d16fc1a7eff540e81 /qutebrowser/utils/utils.py | |
parent | b84d68e8ee22cb1679799c9ca73397e81110ea34 (diff) | |
download | qutebrowser-pylint-2-12.tar.gz qutebrowser-pylint-2-12.zip |
pylint: Enable else-if-usedpylint-2-12
Diffstat (limited to 'qutebrowser/utils/utils.py')
-rw-r--r-- | qutebrowser/utils/utils.py | 7 |
1 files changed, 3 insertions, 4 deletions
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: |