type hint

This commit is contained in:
flandre 2025-06-09 12:53:23 +08:00
parent 464925a621
commit 4a24879206

View File

@ -12,7 +12,7 @@ from flandre.utils.Msg import Msg, KillMsg, NodeOnlineMsg, Msg1, Msg2
class Node:
fp = BusClient.fp
bp = BusClient.bp
topics = []
topics: list[type[Msg]] = []
def __init__(self, enable_init=True, level=logging.INFO, conflare=False, broker=False, req=None):
self.enable_init = enable_init
@ -45,7 +45,8 @@ class Node:
def base_setup(self):
FORMAT = '[%(asctime)s] p%(process)s {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s'
FORMAT = '"%(pathname)s:%(lineno)d" [%(asctime)s.%(msecs)03d] %(levelname)s - %(message)s'
logging.basicConfig(level=self.level, format=FORMAT, datefmt='%Y-%m-%d %H:%M:%S', )
logging.basicConfig(level=self.level, format=FORMAT,
datefmt='%Y-%m-%d %H:%M:%S', )
rootLogger = logging.getLogger()
logFormatter = logging.Formatter(FORMAT, datefmt='%Y-%m-%d %H:%M:%S', )