continue-custom/core/diff/test-examples/fastapi-tabs-vs-spaces.diff
2024-09-05 16:53:50 -07:00

46 lines
No EOL
880 B
Diff

from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
\treturn {"Hello": "World"}
@app.get("/landing")
def read_landing_page():
\treturn {"message": "Welcome to the landing page"}
---
from fastapi import FastAPI, HTTPException
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/landing")
def read_landing_page():
raise HTTPException(status_code=404, detail="Page not found")
---
- from fastapi import FastAPI
+ from fastapi import FastAPI, HTTPException
app = FastAPI()
@app.get("/")
def read_root():
- \treturn {"Hello": "World"}
+ return {"Hello": "World"}
@app.get("/landing")
def read_landing_page():
+ raise HTTPException(status_code=404, detail="Page not found")
- \treturn {"message": "Welcome to the landing page"}
---
Make sure we correctly ignore tabs-vs-spaces changes