🎨 Update inline source examples, hide # in annotations (from MkDocs Material) (#677)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
Matthieu LAURENT
2023-10-29 08:24:32 +01:00
committed by GitHub
parent 6457775a0f
commit 9632980664
13 changed files with 158 additions and 158 deletions

View File

@ -43,16 +43,16 @@ def create_heroes():
def update_heroes():
with Session(engine) as session:
statement = select(Hero).where(Hero.name == "Spider-Boy") # (1)
results = session.exec(statement) # (2)
hero = results.one() # (3)
print("Hero:", hero) # (4)
statement = select(Hero).where(Hero.name == "Spider-Boy") # (1)!
results = session.exec(statement) # (2)!
hero = results.one() # (3)!
print("Hero:", hero) # (4)!
hero.age = 16 # (5)
session.add(hero) # (6)
session.commit() # (7)
session.refresh(hero) # (8)
print("Updated hero:", hero) # (9)
hero.age = 16 # (5)!
session.add(hero) # (6)!
session.commit() # (7)!
session.refresh(hero) # (8)!
print("Updated hero:", hero) # (9)!
def main():