feat: mypy for all type check (#10921)
This commit is contained in:
parent
c91e8b1737
commit
56e15d09a9
584 changed files with 3975 additions and 2826 deletions
|
|
@ -11,7 +11,7 @@ from dify_app import DifyApp
|
|||
|
||||
|
||||
def init_app(app: DifyApp):
|
||||
log_handlers = []
|
||||
log_handlers: list[logging.Handler] = []
|
||||
log_file = dify_config.LOG_FILE
|
||||
if log_file:
|
||||
log_dir = os.path.dirname(log_file)
|
||||
|
|
@ -49,7 +49,8 @@ def init_app(app: DifyApp):
|
|||
return datetime.utcfromtimestamp(seconds).astimezone(timezone).timetuple()
|
||||
|
||||
for handler in logging.root.handlers:
|
||||
handler.formatter.converter = time_converter
|
||||
if handler.formatter:
|
||||
handler.formatter.converter = time_converter
|
||||
|
||||
|
||||
def get_request_id():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue