Skip to content

Commit

Permalink
✏ Fix line numbers in Python code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-berg committed Sep 2, 2022
1 parent 1e81c88 commit 51d7d80
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/advanced/self-referential.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 👇
```
Expand Down Expand Up @@ -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 👇
```
Expand All @@ -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 👇
```
Expand All @@ -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 👇
```
Expand Down

0 comments on commit 51d7d80

Please sign in to comment.