Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Fix some linting warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonyte committed Sep 26, 2023
1 parent 5a35910 commit 7bf275a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
from models import Command, Result

app = FastAPI()
app.mount("/static", StaticFiles(directory="static"), name="static")
app.mount("/static", StaticFiles(directory="./static"), name="static")
actions = Actions()
app.add_middleware(ActionsMiddleware, actions=actions)
CommandView = custom_view("/static/view.html")


@app.get("/", response_class=HTMLResponse)
async def root():
with open("static/index.html") as file:
async def index() -> HTMLResponse:
with open("./static/index.html", encoding="utf-8") as file:
return HTMLResponse(file.read())


@app.post("/api/command", response_model=Result)
async def command(cmd: Command):
async def command(cmd: Command) -> Result:
original_cwd = os.getcwd()
try:
os.chdir(cmd.cwd)
Expand Down

0 comments on commit 7bf275a

Please sign in to comment.