From 7113fae53e30d4615bc1273758cadc69b6dd2700 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 12:20:39 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs_src/sql_databases/tutorial001_an_py310.py | 8 ++++++-- docs_src/sql_databases/tutorial001_an_py39.py | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs_src/sql_databases/tutorial001_an_py310.py b/docs_src/sql_databases/tutorial001_an_py310.py index 5b69cf367..890819a45 100644 --- a/docs_src/sql_databases/tutorial001_an_py310.py +++ b/docs_src/sql_databases/tutorial001_an_py310.py @@ -14,7 +14,9 @@ class Hero(SQLModel, table=True): sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}" -connect_args = {"check_same_thread": False} # needed for SQLite when using the session across threads +connect_args = { + "check_same_thread": False +} # needed for SQLite when using the session across threads engine = create_engine(sqlite_url, connect_args=connect_args) @@ -49,7 +51,9 @@ def create_hero(hero: Hero, session: SessionDep) -> Hero: def read_heroes( session: SessionDep, offset: int = 0, - limit: Annotated[int, Query(le=100)] = 100, # safety cap to avoid returning too many rows + limit: Annotated[ + int, Query(le=100) + ] = 100, # safety cap to avoid returning too many rows ) -> list[Hero]: heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() return heroes diff --git a/docs_src/sql_databases/tutorial001_an_py39.py b/docs_src/sql_databases/tutorial001_an_py39.py index 8afe2d047..2152f9c47 100644 --- a/docs_src/sql_databases/tutorial001_an_py39.py +++ b/docs_src/sql_databases/tutorial001_an_py39.py @@ -12,9 +12,11 @@ class Hero(SQLModel, table=True): sqlite_file_name = "database.db" -sqlite_url = f"sqlite:///{sqlite_file_name}" +sqlite_url = f"sqlite:///{sqlite_file_name}" -connect_args = {"check_same_thread": False} # needed for SQLite when using the session across threads +connect_args = { + "check_same_thread": False +} # needed for SQLite when using the session across threads engine = create_engine(sqlite_url, connect_args=connect_args) @@ -49,7 +51,9 @@ def create_hero(hero: Hero, session: SessionDep) -> Hero: def read_heroes( session: SessionDep, offset: int = 0, - limit: Annotated[int, Query(le=100)] = 100, # safety cap to avoid returning too many rows + limit: Annotated[ + int, Query(le=100) + ] = 100, # safety cap to avoid returning too many rows ) -> list[Hero]: heroes = session.exec(select(Hero).offset(offset).limit(limit)).all() return heroes