From dd275c9459ef7e48a217af41b148fb74762274b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E4=B8=BA=E4=B9=8B?= <560397@gree.com.cn> Date: Tue, 21 Nov 2023 11:35:08 +0800 Subject: [PATCH] Update project --- application/schemas/__init__.py | 2 +- application/schemas/request/__init__.py | 2 +- application/schemas/request/log.py | 8 ++++++-- application/script/__init__.py | 15 +++++++++++++-- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/application/schemas/__init__.py b/application/schemas/__init__.py index 30de9fa..eb616de 100644 --- a/application/schemas/__init__.py +++ b/application/schemas/__init__.py @@ -6,7 +6,7 @@ # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/28 22:31 -# @File : __init__.py.py +# @File : __init__.py # @Description : """ diff --git a/application/schemas/request/__init__.py b/application/schemas/request/__init__.py index e3ee23e..1a1da55 100644 --- a/application/schemas/request/__init__.py +++ b/application/schemas/request/__init__.py @@ -6,7 +6,7 @@ # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/19 16:12 -# @File : __init__.py.py +# @File : __init__.py # @Description : """ diff --git a/application/schemas/request/log.py b/application/schemas/request/log.py index b42b60c..db76cc9 100644 --- a/application/schemas/request/log.py +++ b/application/schemas/request/log.py @@ -7,13 +7,17 @@ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/19 16:12 # @File : log.py -# @Description : +# @Description : Defines a Pydantic model for parsing log request items. """ +# Import custom modules from pydantic import BaseModel -from datetime import datetime class ParseLogRequestItem(BaseModel): + """ + A Pydantic model that represents a parse log request item. + Each instance of this class includes a start and end attribute. + """ start: str end: str diff --git a/application/script/__init__.py b/application/script/__init__.py index fad2e9a..1f75a12 100644 --- a/application/script/__init__.py +++ b/application/script/__init__.py @@ -6,15 +6,26 @@ # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/29 11:21 -# @File : __init__.py.py -# @Description : +# @File : __init__.py +# @Description : Initializes the script for the Flask application. """ +# Import built-in modules from flask import Flask +# Import custom modules from .cmdline import init def init_script(app: Flask) -> None: + """ + Initialize the script for the Flask application. + + Args: + app (Flask): A Flask application instance. + + Returns: + None + """ app.cli.add_command(init) -- GitLab