Skip to content

Commit

Permalink
Enable ruff G002 and fix 6 occurences (#1341)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau authored Feb 18, 2025
1 parent fa3e23f commit d9998d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 5 additions & 5 deletions ipykernel/kernelapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,12 @@ def init_sockets(self):
self.shell_socket = context.socket(zmq.ROUTER)
self.shell_socket.linger = 1000
self.shell_port = self._bind_socket(self.shell_socket, self.shell_port)
self.log.debug("shell ROUTER Channel on port: %i" % self.shell_port)
self.log.debug("shell ROUTER Channel on port: %i", self.shell_port)

self.stdin_socket = zmq.Context(context).socket(zmq.ROUTER)
self.stdin_socket.linger = 1000
self.stdin_port = self._bind_socket(self.stdin_socket, self.stdin_port)
self.log.debug("stdin ROUTER Channel on port: %i" % self.stdin_port)
self.log.debug("stdin ROUTER Channel on port: %i", self.stdin_port)

if hasattr(zmq, "ROUTER_HANDOVER"):
# set router-handover to workaround zeromq reconnect problems
Expand All @@ -360,7 +360,7 @@ def init_control(self, context):
self.control_socket = context.socket(zmq.ROUTER)
self.control_socket.linger = 1000
self.control_port = self._bind_socket(self.control_socket, self.control_port)
self.log.debug("control ROUTER Channel on port: %i" % self.control_port)
self.log.debug("control ROUTER Channel on port: %i", self.control_port)

self.debugpy_socket = context.socket(zmq.STREAM)
self.debugpy_socket.linger = 1000
Expand All @@ -384,7 +384,7 @@ def init_iopub(self, context):
self.iopub_socket = context.socket(zmq.PUB)
self.iopub_socket.linger = 1000
self.iopub_port = self._bind_socket(self.iopub_socket, self.iopub_port)
self.log.debug("iopub PUB Channel on port: %i" % self.iopub_port)
self.log.debug("iopub PUB Channel on port: %i", self.iopub_port)
self.configure_tornado_logger()
self.iopub_thread = IOPubThread(self.iopub_socket, pipe=True)
self.iopub_thread.start()
Expand All @@ -398,7 +398,7 @@ def init_heartbeat(self):
hb_ctx = zmq.Context()
self.heartbeat = Heartbeat(hb_ctx, (self.transport, self.ip, self.hb_port))
self.hb_port = self.heartbeat.port
self.log.debug("Heartbeat REP Channel on port: %i" % self.hb_port)
self.log.debug("Heartbeat REP Channel on port: %i", self.hb_port)
self.heartbeat.start()

def close(self):
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ ignore = [
"ARG001",
# Unused method argument:
"ARG002",
# Logging statement uses `%`
"G002",
# `open()` should be replaced by `Path.open()`
"PTH123",
# use `X | Y` for type annotations, this does not works for dynamic getting type hints on older python
Expand Down

0 comments on commit d9998d2

Please sign in to comment.