From 51d7d809271b187a9f04419106ba9fcff104c94d Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Fri, 26 Aug 2022 09:41:33 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=20=20Fix=20line=20numbers=20in=20Pyth?= =?UTF-8?q?on=20code=20snippets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/advanced/self-referential.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/advanced/self-referential.md b/docs/advanced/self-referential.md index 86705eb29f..e44409e4a1 100644 --- a/docs/advanced/self-referential.md +++ b/docs/advanced/self-referential.md @@ -16,10 +16,10 @@ To allow more fine-grained control over it, the `Relationship` constructor allow Since SQLAlchemy relationships provide the [`remote_side`](https://docs.sqlalchemy.org/en/14/orm/relationship_api.html#sqlalchemy.orm.relationship.params.remote_side){.external-link target=_blank} parameter for just such an occasion, we can leverage that directly to construct the self-referential pattern with minimal code. -```Python hl_lines="15-17" +```Python hl_lines="12" # Code above omitted 👆 -{!./docs_src/advanced/self_referential/tutorial001.py[ln:5-21]!} +{!./docs_src/advanced/self_referential/tutorial001.py[ln:6-17]!} # Code below omitted 👇 ``` @@ -57,7 +57,7 @@ Now let us see how we can create villains with a boss: ```Python hl_lines="6-7" # Code above omitted 👆 -{!./docs_src/advanced/self_referential/tutorial001.py[ln:34-51]!} +{!./docs_src/advanced/self_referential/tutorial001.py[ln:30-47]!} # Code below omitted 👇 ``` @@ -78,11 +78,11 @@ If we only learn that a villain actually had a secret boss after we have already ```Python hl_lines="8" # Code above omitted 👆 -{!./docs_src/advanced/self_referential/tutorial001.py[ln:34-35]!} +{!./docs_src/advanced/self_referential/tutorial001.py[ln:30-31]!} # Previous code here omitted 👈 -{!./docs_src/advanced/self_referential/tutorial001.py[ln:53-57]!} +{!./docs_src/advanced/self_referential/tutorial001.py[ln:49-53]!} # Code below omitted 👇 ``` @@ -98,14 +98,14 @@ If we only learn that a villain actually had a secret boss after we have already And if we want to add minions to a boss after the fact, this is as easy as adding items to a Python list (because that's all it is 🤓): -```Python hl_lines="11-15" +```Python hl_lines="11" # Code above omitted 👆 -{!./docs_src/advanced/self_referential/tutorial001.py[ln:34-35]!} +{!./docs_src/advanced/self_referential/tutorial001.py[ln:30-31]!} # Previous code here omitted 👈 -{!./docs_src/advanced/self_referential/tutorial001.py[ln:59-74]!} +{!./docs_src/advanced/self_referential/tutorial001.py[ln:55-66]!} # Code below omitted 👇 ```