]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
🎨 Update docs format and references with pre-commit and Ruff (#667)
authorSebastián Ramírez <tiangolo@gmail.com>
Mon, 23 Oct 2023 08:11:36 +0000 (12:11 +0400)
committerGitHub <noreply@github.com>
Mon, 23 Oct 2023 08:11:36 +0000 (08:11 +0000)
docs/tutorial/fastapi/relationships.md
docs/tutorial/fastapi/session-with-dependency.md
docs/tutorial/fastapi/teams.md
docs_src/tutorial/fastapi/app_testing/tutorial001/main.py
docs_src/tutorial/fastapi/relationships/tutorial001.py
docs_src/tutorial/fastapi/session_with_dependency/tutorial001.py
docs_src/tutorial/fastapi/teams/tutorial001.py

index 6921b5ac8524cd43d4c5b3cb355ab5eb94a75776..f152b231c70333d5b8509231d7811531ddd9dc39 100644 (file)
@@ -84,7 +84,7 @@ In this case, we used `response_model=TeamRead` and `response_model=HeroRead`, s
 
 # Code here omitted ðŸ‘ˆ
 
-{!./docs_src/tutorial/fastapi/teams/tutorial001.py[ln:159-164]!}
+{!./docs_src/tutorial/fastapi/teams/tutorial001.py[ln:158-163]!}
 
 # Code below omitted ðŸ‘‡
 ```
@@ -234,7 +234,7 @@ In the case of the hero, this tells FastAPI to extract the `team` too. And in th
 
 # Code here omitted ðŸ‘ˆ
 
-{!./docs_src/tutorial/fastapi/relationships/tutorial001.py[ln:168-173]!}
+{!./docs_src/tutorial/fastapi/relationships/tutorial001.py[ln:167-172]!}
 
 # Code below omitted ðŸ‘‡
 ```
index 52a800b9eac8c8a5d6214818219ceb3c1b0bda66..195c2e1729561da50f6f79dfe5f6ff67dd6cb915 100644 (file)
@@ -177,7 +177,7 @@ And then we remove the previous `with` block with the old **session**.
 
 # Code here omitted ðŸ‘ˆ
 
-{!./docs_src/tutorial/fastapi/session_with_dependency/tutorial001.py[ln:55-107]!}
+{!./docs_src/tutorial/fastapi/session_with_dependency/tutorial001.py[ln:55-106]!}
 ```
 
 <details>
index 0b19a95cb373b720aae78621acc6f453ff99aafb..52554cf4b684a575dce828709b03e3d971344e54 100644 (file)
@@ -92,7 +92,7 @@ These are equivalent and very similar to the **path operations** for the **heroe
 ```Python hl_lines="3-9  12-20  23-28  31-47  50-57"
 # Code above omitted ðŸ‘†
 
-{!./docs_src/tutorial/fastapi/teams/tutorial001.py[ln:139-193]!}
+{!./docs_src/tutorial/fastapi/teams/tutorial001.py[ln:138-192]!}
 
 # Code below omitted ðŸ‘‡
 ```
index 88b8fbbcea42faa591bd7cb5cadce7c68349543f..d106c4ebab63e2ce65f89ab4f4657096eb36f110 100644 (file)
@@ -98,7 +98,6 @@ def update_hero(
 
 @app.delete("/heroes/{hero_id}")
 def delete_hero(*, session: Session = Depends(get_session), hero_id: int):
-
     hero = session.get(Hero, hero_id)
     if not hero:
         raise HTTPException(status_code=404, detail="Hero not found")
index 97220b95e5051df28bdb866a715c6c3613a5a84c..6a0384668683941c62325d585dfb64a7b9c27857 100644 (file)
@@ -136,7 +136,6 @@ def update_hero(
 
 @app.delete("/heroes/{hero_id}")
 def delete_hero(*, session: Session = Depends(get_session), hero_id: int):
-
     hero = session.get(Hero, hero_id)
     if not hero:
         raise HTTPException(status_code=404, detail="Hero not found")
index 88b8fbbcea42faa591bd7cb5cadce7c68349543f..d106c4ebab63e2ce65f89ab4f4657096eb36f110 100644 (file)
@@ -98,7 +98,6 @@ def update_hero(
 
 @app.delete("/heroes/{hero_id}")
 def delete_hero(*, session: Session = Depends(get_session), hero_id: int):
-
     hero = session.get(Hero, hero_id)
     if not hero:
         raise HTTPException(status_code=404, detail="Hero not found")
index 2a0bd600fc94631a45c0ba326a7c05eececc3294..6f84182bc999e9835d21e52d1c495791abff84d3 100644 (file)
@@ -127,7 +127,6 @@ def update_hero(
 
 @app.delete("/heroes/{hero_id}")
 def delete_hero(*, session: Session = Depends(get_session), hero_id: int):
-
     hero = session.get(Hero, hero_id)
     if not hero:
         raise HTTPException(status_code=404, detail="Hero not found")