Skip to content

Commit 804d123

Browse files
committed
format code
1 parent 7569c6b commit 804d123

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

DEVELOP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ poetry run black .
7575

7676
2. isort: Python import 语句排序
7777
```bash
78-
poetry run isort .
78+
poetry run python -m isort .
7979
```

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Web File Server
1+
# ServeFS
22

33
[English](README_EN.md)
44

README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Web File Server
1+
# ServeFS
22

33
A simple file server based on FastAPI and Vue.js, supporting file/folder upload, preview, and management.
44

servefs/main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
from fastapi import FastAPI
2-
from pathlib import Path
31
import os
2+
from pathlib import Path
3+
4+
from fastapi import FastAPI
5+
46
from .routes.api import router as api_router
5-
from .routes.page import router as page_router, init_static_files
7+
from .routes.page import init_static_files
8+
from .routes.page import router as page_router
69

710
# Get debug mode from environment variable
811
DEBUG = os.getenv("SERVEFS_DEBUG", "false").lower() == "true"

servefs/routes/api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from fastapi import APIRouter, Request, HTTPException, UploadFile, File, Form
2-
from fastapi.responses import JSONResponse, FileResponse
3-
import shutil
4-
from pathlib import Path
51
import mimetypes
2+
import shutil
3+
4+
from fastapi import APIRouter, File, Form, HTTPException, Request, UploadFile
65

76
router = APIRouter(prefix="/api", tags=["api"])
87

servefs/routes/page.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import mimetypes
2+
from pathlib import Path
3+
14
from fastapi import APIRouter, HTTPException, Request
2-
from fastapi.responses import HTMLResponse, FileResponse
5+
from fastapi.responses import FileResponse, HTMLResponse
36
from fastapi.staticfiles import StaticFiles
4-
from pathlib import Path
5-
import mimetypes
67

78
# Get current module path
89
PACKAGE_DIR = Path(__file__).parent.parent

0 commit comments

Comments
 (0)