From 9f6ddf43928c6deb033f18fcec5aed21772192ff Mon Sep 17 00:00:00 2001 From: Elliot Hall <38925749+elliot-hall@users.noreply.github.com> Date: Tue, 28 Nov 2023 20:26:45 -0500 Subject: [PATCH] fix(docs): Updating SQLAlchemy tutorial line emphasis (#2796) --- docs/tutorials/sqlalchemy/0-introduction.rst | 2 +- docs/tutorials/sqlalchemy/1-provide-session-with-di.rst | 2 +- docs/tutorials/sqlalchemy/2-serialization-plugin.rst | 2 +- docs/tutorials/sqlalchemy/3-init-plugin.rst | 2 +- docs/tutorials/sqlalchemy/4-final-touches-and-recap.rst | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/tutorials/sqlalchemy/0-introduction.rst b/docs/tutorials/sqlalchemy/0-introduction.rst index fb49c45425..d7ba5aea2b 100644 --- a/docs/tutorials/sqlalchemy/0-introduction.rst +++ b/docs/tutorials/sqlalchemy/0-introduction.rst @@ -104,7 +104,7 @@ serializable by Litestar. :language: python :linenos: :lines: 2-3,14-16,45-48,94-101 - :emphasize-lines: 3,4,6,7,11,16 + :emphasize-lines: 3,4,6,11 Behavior ++++++++ diff --git a/docs/tutorials/sqlalchemy/1-provide-session-with-di.rst b/docs/tutorials/sqlalchemy/1-provide-session-with-di.rst index 0408bed26d..b17b417be4 100644 --- a/docs/tutorials/sqlalchemy/1-provide-session-with-di.rst +++ b/docs/tutorials/sqlalchemy/1-provide-session-with-di.rst @@ -11,7 +11,7 @@ handlers. .. literalinclude:: /examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_session_di.py :language: python :linenos: - :emphasize-lines: 49-58,84-86,89-91,96-97,105 + :emphasize-lines: 49-58,84-85,89-91,96-97,105 In the previous example, the database session is created within each HTTP route handler function. In this script we use dependency injection to decouple creation of the session from the route handlers. diff --git a/docs/tutorials/sqlalchemy/2-serialization-plugin.rst b/docs/tutorials/sqlalchemy/2-serialization-plugin.rst index 6096b9dbf8..0eea369259 100644 --- a/docs/tutorials/sqlalchemy/2-serialization-plugin.rst +++ b/docs/tutorials/sqlalchemy/2-serialization-plugin.rst @@ -10,7 +10,7 @@ Here's the code: .. literalinclude:: /examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_serialization_plugin.py :language: python :linenos: - :emphasize-lines: 10,77-78,82,84,88,92,99 + :emphasize-lines: 11,78-79,83-84,89,91-92,100 We've simply imported the plugin and added it to our app's plugins list, and now we can receive and return our SQLAlchemy data models directly to and from our handler. diff --git a/docs/tutorials/sqlalchemy/3-init-plugin.rst b/docs/tutorials/sqlalchemy/3-init-plugin.rst index a178ece1a8..0990c1cf96 100644 --- a/docs/tutorials/sqlalchemy/3-init-plugin.rst +++ b/docs/tutorials/sqlalchemy/3-init-plugin.rst @@ -19,7 +19,7 @@ Here's the updated code: .. literalinclude:: /examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_init_plugin.py :language: python :linenos: - :emphasize-lines: 10-11,29,77-79,86 + :emphasize-lines: 12,30,78-79,87 The most notable difference is that we no longer need the ``db_connection()`` lifespan context manager - the plugin handles this for us. It also handles the creation of the tables in our database if we supply our metadata and diff --git a/docs/tutorials/sqlalchemy/4-final-touches-and-recap.rst b/docs/tutorials/sqlalchemy/4-final-touches-and-recap.rst index 8451634565..382ee79dc1 100644 --- a/docs/tutorials/sqlalchemy/4-final-touches-and-recap.rst +++ b/docs/tutorials/sqlalchemy/4-final-touches-and-recap.rst @@ -13,7 +13,7 @@ Here is our final application: .. literalinclude:: /examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_plugin.py :language: python :linenos: - :emphasize-lines: 9,80 + :emphasize-lines: 11,79 Recap =====