From 2025516f2cb5f3ac8f6e5b3c1c85174649e9dbd1 Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Sun, 4 Feb 2024 17:38:49 +0100 Subject: [PATCH] f-string conversion --- musicpd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/musicpd.py b/musicpd.py index e61188d..8b5d789 100644 --- a/musicpd.py +++ b/musicpd.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: 2012-2023 kaliko +# SPDX-FileCopyrightText: 2012-2024 kaliko # SPDX-FileCopyrightText: 2021 Wonko der Verständige # SPDX-FileCopyrightText: 2019 Naglis Jonaitis # SPDX-FileCopyrightText: 2019 Bart Van Loon @@ -436,9 +436,9 @@ class MPDClient: parts = [command] for arg in args: if isinstance(arg, tuple): - parts.append('{0!s}'.format(Range(arg))) + parts.append(f'{Range(arg)!s}') else: - parts.append('"%s"' % escape(str(arg))) + parts.append(f'"{escape(str(arg))}"') if '\n' in ' '.join(parts): raise CommandError('new line found in the command!') self._write_line(" ".join(parts)) -- 2.39.5