1- """Default classes for Comm and CommManager, for usage in IPython.
2- """
1+ """Default classes for Comm and CommManager, for usage in IPython."""
32
43# Copyright (c) IPython Development Team.
54# Distributed under the terms of the Modified BSD License.
@@ -53,7 +52,7 @@ def __init__(
5352 self .primary = primary
5453 self .target_name = target_name
5554 self .target_module = target_module
56- self .topic = topic if topic else ("comm-%s" % self .comm_id ).encode ("ascii" )
55+ self .topic = topic if topic else (f "comm-{ self .comm_id } " ).encode ("ascii" )
5756
5857 self ._open_data = _open_data if _open_data else {}
5958 self ._close_data = _close_data if _close_data else {}
@@ -71,11 +70,11 @@ def __init__(
7170
7271 def publish_msg (
7372 self ,
74- msg_type : str , # noqa: ARG002
75- data : MaybeDict = None , # noqa: ARG002
76- metadata : MaybeDict = None , # noqa: ARG002
77- buffers : BuffersType = None , # noqa: ARG002
78- ** keys : t .Any , # noqa: ARG002
73+ msg_type : str ,
74+ data : MaybeDict = None ,
75+ metadata : MaybeDict = None ,
76+ buffers : BuffersType = None ,
77+ ** keys : t .Any ,
7978 ) -> None :
8079 msg = "publish_msg Comm method is not implemented"
8180 raise NotImplementedError (msg )
@@ -314,4 +313,4 @@ def comm_close(self, stream: ZMQStream, ident: str, msg: MessageType) -> None:
314313 logger .error ("Exception in comm_close for %s" , comm_id , exc_info = True )
315314
316315
317- __all__ = ["CommManager " , "BaseComm " ]
316+ __all__ = ["BaseComm " , "CommManager " ]
0 commit comments