ruff: Fix G004 Logging statement uses f-string.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-02-03 16:42:19 -08:00 committed by Tim Abbott
parent 61f672c652
commit 59eca10a43
3 changed files with 6 additions and 6 deletions

View File

@ -656,8 +656,8 @@ def do_change_remote_server_plan_type(remote_server: RemoteZulipServer, plan_typ
def do_deactivate_remote_server(remote_server: RemoteZulipServer) -> None: def do_deactivate_remote_server(remote_server: RemoteZulipServer) -> None:
if remote_server.deactivated: if remote_server.deactivated:
billing_logger.warning( billing_logger.warning(
f"Cannot deactivate remote server with ID {remote_server.id}, " "Cannot deactivate remote server with ID %d, server has already been deactivated.",
"server has already been deactivated." remote_server.id,
) )
return return

View File

@ -88,7 +88,7 @@ class QueueClient(Generic[ChannelT], metaclass=ABCMeta):
return f"{queue_name}_{str(random.getrandbits(16))}" return f"{queue_name}_{str(random.getrandbits(16))}"
def _reconnect_consumer_callback(self, queue: str, consumer: Consumer[ChannelT]) -> None: def _reconnect_consumer_callback(self, queue: str, consumer: Consumer[ChannelT]) -> None:
self.log.info(f"Queue reconnecting saved consumer {consumer} to queue {queue}") self.log.info("Queue reconnecting saved consumer %r to queue %s", consumer, queue)
self.ensure_queue( self.ensure_queue(
queue, queue,
lambda channel: channel.basic_consume( lambda channel: channel.basic_consume(
@ -142,7 +142,7 @@ class SimpleQueueClient(QueueClient[BlockingChannel]):
start = time.time() start = time.time()
self.connection = pika.BlockingConnection(self._get_parameters()) self.connection = pika.BlockingConnection(self._get_parameters())
self.channel = self.connection.channel() self.channel = self.connection.channel()
self.log.info(f"SimpleQueueClient connected (connecting took {time.time() - start:.3f}s)") self.log.info("SimpleQueueClient connected (connecting took %.3fs)", time.time() - start)
def _reconnect(self) -> None: def _reconnect(self) -> None:
self.connection = None self.connection = None

View File

@ -2299,8 +2299,8 @@ class SAMLAuthBackend(SocialAuthMixin, SAMLAuth):
if idps_without_limit_to_subdomains: if idps_without_limit_to_subdomains:
self.logger.error( self.logger.error(
"SAML_REQUIRE_LIMIT_TO_SUBDOMAINS is enabled and the following IdPs don't have" "SAML_REQUIRE_LIMIT_TO_SUBDOMAINS is enabled and the following IdPs don't have"
" limit_to_subdomains specified and will be ignored:" " limit_to_subdomains specified and will be ignored: %r",
f" {idps_without_limit_to_subdomains}" idps_without_limit_to_subdomains,
) )
for idp_name in idps_without_limit_to_subdomains: for idp_name in idps_without_limit_to_subdomains:
del settings.SOCIAL_AUTH_SAML_ENABLED_IDPS[idp_name] del settings.SOCIAL_AUTH_SAML_ENABLED_IDPS[idp_name]