Skip to content

Commit 1baa379

Browse files
committed
misc docs cleanup
1 parent 3f082fc commit 1baa379

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/src/features/components.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ Convert any Django view into a IDOM component by using this decorator. Compatibl
196196

197197
In these scenarios, you may want to rely on best-fit parsing by setting the `strict_parsing` parameter to `False`.
198198

199-
Note that best-fit parsing is designed to be similar to how web browsers would handle non-standard or broken HTML.
200-
201199
=== "components.py"
202200

203201
```python
@@ -216,7 +214,7 @@ Convert any Django view into a IDOM component by using this decorator. Compatibl
216214
)
217215
```
218216

219-
217+
_Note: Best-fit parsing is designed to be similar to how web browsers would handle non-standard or broken HTML._
220218

221219
---
222220

@@ -226,7 +224,7 @@ Convert any Django view into a IDOM component by using this decorator. Compatibl
226224

227225
Any view can be rendered within compatibility mode. However, the `transforms`, `strict_parsing`, `request`, `args`, and `kwargs` arguments do not apply to compatibility mode.
228226

229-
Please note that by default the iframe is unstyled, and thus won't look pretty until you add some CSS.
227+
230228

231229
=== "components.py"
232230

@@ -246,6 +244,8 @@ Convert any Django view into a IDOM component by using this decorator. Compatibl
246244
)
247245
```
248246

247+
_Note: By default the `compatibility` iframe is unstyled, and thus won't look pretty until you add some CSS._
248+
249249
---
250250

251251
<font size="4">**`transforms`**</font>

docs/src/features/hooks.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The function you provide into this hook must return either a `Model` or `QuerySe
7474
from idom import component
7575
from django_idom.hooks import use_query
7676

77-
def example_query(value:int, other_value:bool = False):
77+
def example_query(value: int, other_value: bool = False):
7878
...
7979

8080
@component
@@ -103,7 +103,7 @@ The function you provide into this hook must return either a `Model` or `QuerySe
103103
1. Want to use this hook to defer IO intensive tasks to be computed in the background
104104
2. Want to to utilize `use_query` with a different ORM
105105

106-
... then you can disable all postprocessing behavior by modifying the `QueryOptions.postprocessor` parameter. In the example below, we will set the `postprocessor` to a function that takes one argument and returns nothing.
106+
... then you can disable all postprocessing behavior by modifying the `QueryOptions.postprocessor` parameter. In the example below, we will set the `postprocessor` to a function that takes one argument and returns `None`.
107107

108108
=== "components.py"
109109

@@ -135,7 +135,7 @@ The function you provide into this hook must return either a `Model` or `QuerySe
135135

136136
{% include-markdown "../../includes/orm.md" start="<!--orm-fetch-start-->" end="<!--orm-fetch-end-->" %}
137137

138-
However, if you have deep nested trees of relational data, this may not be a desirable behavior. You may prefer to manually fetch these relational fields using a second `use_query` hook.
138+
However, if you have deep nested trees of relational data, this may not be a desirable behavior. In these scenarios, you may prefer to manually fetch these relational fields using a second `use_query` hook.
139139

140140
You can disable the prefetching behavior of the default `postprocessor` (located at `django_idom.utils.django_query_postprocessor`) via the `QueryOptions.postprocessor_kwargs` parameter.
141141

@@ -243,7 +243,7 @@ The function you provide into this hook will have no return value.
243243
from idom import component
244244
from django_idom.hooks import use_mutation
245245

246-
def example_mutation(value:int, other_value:bool = False):
246+
def example_mutation(value: int, other_value: bool = False):
247247
...
248248

249249
@component

0 commit comments

Comments
 (0)