From 325cc917d5ad14b130b156d23b7adca46499dc24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= <6774676+eumiro@users.noreply.github.com> Date: Fri, 2 Dec 2022 22:04:23 +0100 Subject: refactor: use f-strings --- mastodon/streaming_endpoints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mastodon/streaming_endpoints.py') diff --git a/mastodon/streaming_endpoints.py b/mastodon/streaming_endpoints.py index 9ff72f5..fc705e6 100644 --- a/mastodon/streaming_endpoints.py +++ b/mastodon/streaming_endpoints.py @@ -46,7 +46,7 @@ class Mastodon(Internals): base = '/api/v1/streaming/hashtag' if local: base += '/local' - return self.__stream("{}?tag={}".format(base, tag), listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec) + return self.__stream(f"{base}?tag={tag}", listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec) @api_version("2.1.0", "2.1.0", _DICT_VERSION_STATUS) def stream_list(self, id, listener, run_async=False, timeout=_DEFAULT_STREAM_TIMEOUT, reconnect_async=False, reconnect_async_wait_sec=_DEFAULT_STREAM_RECONNECT_WAIT_SEC): @@ -55,7 +55,7 @@ class Mastodon(Internals): list. """ id = self.__unpack_id(id) - return self.__stream("/api/v1/streaming/list?list={}".format(id), listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec) + return self.__stream(f"/api/v1/streaming/list?list={id}", listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec) @api_version("2.6.0", "2.6.0", _DICT_VERSION_STATUS) def stream_direct(self, listener, run_async=False, timeout=_DEFAULT_STREAM_TIMEOUT, reconnect_async=False, reconnect_async_wait_sec=_DEFAULT_STREAM_RECONNECT_WAIT_SEC): -- cgit v1.2.3