Add HTTP exception helpers and update models
Introduced utils/http/http_exceptions.py with common HTTP exception helpers for FastAPI. Updated main.py to use a global exception handler that logs and hides internal errors. Refined models/README.md to document new models and relationships, including PhysicalFile and UploadSession, and updated DTO and enum documentation. Simplified ThemeResponse in models/color.py. Improved models/download.py with type annotations, index changes, and import optimizations. Fixed a parameter type in clean.py. Co-Authored-By: 砂糖橘 <54745033+Foxerine@users.noreply.github.com>
This commit is contained in:
2
clean.py
2
clean.py
@@ -34,7 +34,7 @@ def parse_args() -> argparse.Namespace:
|
||||
help='仅列出将要删除的文件,不实际删除')
|
||||
return parser.parse_args()
|
||||
|
||||
def confirm_action(message: str, auto_yes: str = False) -> bool:
|
||||
def confirm_action(message: str, auto_yes: bool = False) -> bool:
|
||||
if auto_yes:
|
||||
return True
|
||||
return input(f"{message} (y/N): ").lower() == 'y'
|
||||
|
||||
Reference in New Issue
Block a user