🎨 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

@ -71,23 +71,23 @@ def update_heroes():
def delete_heroes():
with Session(engine) as session:
statement = select(Hero).where(Hero.name == "Spider-Youngster") # (1)
results = session.exec(statement) # (2)
hero = results.one() # (3)
print("Hero: ", hero) # (4)
statement = select(Hero).where(Hero.name == "Spider-Youngster") # (1)!
results = session.exec(statement) # (2)!
hero = results.one() # (3)!
print("Hero: ", hero) # (4)!
session.delete(hero) # (5)
session.commit() # (6)
session.delete(hero) # (5)!
session.commit() # (6)!
print("Deleted hero:", hero) # (7)
print("Deleted hero:", hero) # (7)!
statement = select(Hero).where(Hero.name == "Spider-Youngster") # (8)
results = session.exec(statement) # (9)
hero = results.first() # (10)
statement = select(Hero).where(Hero.name == "Spider-Youngster") # (8)!
results = session.exec(statement) # (9)!
hero = results.first() # (10)!
if hero is None: # (11)
print("There's no hero named Spider-Youngster") # (12)
# (13)
if hero is None: # (11)!
print("There's no hero named Spider-Youngster") # (12)!
# (13)!
def main():