kube-tarian / git-bridge

Consider using f-strings PYL-C0209
Performance
Minor
2 years ago2 years old
Formatting a regular string which could be a f-string
 85        def Echo123(self, msg1, msg2, msg3):
 86            return ("1:%s 2:%s 3:%s" % (msg1.decode("utf-8"), msg2.decode("utf-8"), msg3.decode("utf-8")))
 87        def EchoStruct(self, msg):
 88            return ("%s" % msg) 89    
 90    addr = msgpackrpc.Address(mylocaladdr, port)
 91    server = msgpackrpc.Server(EchoHandler())
Formatting a regular string which could be a f-string
 83def doRpcServer(port, stopTimeSec):
 84    class EchoHandler(object):
 85        def Echo123(self, msg1, msg2, msg3):
 86            return ("1:%s 2:%s 3:%s" % (msg1.decode("utf-8"), msg2.decode("utf-8"), msg3.decode("utf-8"))) 87        def EchoStruct(self, msg):
 88            return ("%s" % msg)
 89