mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
loguru mypy error (#118)
This commit is contained in:
@@ -6,10 +6,12 @@ from functools import partial
|
||||
from multiprocessing import Pipe
|
||||
from multiprocessing.connection import Connection
|
||||
from pathlib import Path
|
||||
from typing import Union, Generator, Dict, Any
|
||||
from typing import TYPE_CHECKING, Union, Generator, Dict, Any
|
||||
from logging import LogRecord
|
||||
|
||||
from loguru import Record, logger
|
||||
from loguru import logger
|
||||
if TYPE_CHECKING:
|
||||
from loguru import Record
|
||||
from psutil import Process
|
||||
|
||||
from rdagent.core.conf import RD_AGENT_SETTINGS
|
||||
@@ -97,7 +99,7 @@ class RDAgentLog(SingletonBaseClass):
|
||||
process = parent_process
|
||||
return pid_chain
|
||||
|
||||
def file_format(self, record: Record, raw: bool = False) -> str:
|
||||
def file_format(self, record: "Record", raw: bool = False) -> str:
|
||||
# FIXME: the formmat is tightly coupled with the message reading in storage.
|
||||
record["message"] = LogColors.remove_ansi_codes(record["message"])
|
||||
if raw:
|
||||
|
||||
Reference in New Issue
Block a user