Skip to content

Commit

Permalink
fix(docs): Updating SQLAlchemy tutorial line emphasis (#2796)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliot-hall authored Nov 29, 2023
1 parent 176af9c commit 9f6ddf4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/sqlalchemy/0-introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
++++++++
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/sqlalchemy/1-provide-session-with-di.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/sqlalchemy/2-serialization-plugin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/sqlalchemy/3-init-plugin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/sqlalchemy/4-final-touches-and-recap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=====
Expand Down

0 comments on commit 9f6ddf4

Please sign in to comment.