mirror of
https://github.com/django-components/django-components.git
synced 2025-09-26 15:39:08 +00:00
refactor: fix linter errors
This commit is contained in:
parent
ab7f3e0cdb
commit
bb114b4002
2 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ class SlotContextBehavior(str, Enum):
|
||||||
"""
|
"""
|
||||||
Components CAN override the slot context variables passed from the outer scopes.
|
Components CAN override the slot context variables passed from the outer scopes.
|
||||||
Contexts of deeper components take precedence over shallower ones.
|
Contexts of deeper components take precedence over shallower ones.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
Given this template
|
Given this template
|
||||||
|
@ -45,7 +45,7 @@ class SlotContextBehavior(str, Enum):
|
||||||
|
|
||||||
So if a variable is found in the root context, then root context is used.
|
So if a variable is found in the root context, then root context is used.
|
||||||
Otherwise, the context of the component where the slot fill is located is used.
|
Otherwise, the context of the component where the slot fill is located is used.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
Given this template
|
Given this template
|
||||||
|
@ -76,7 +76,7 @@ class SlotContextBehavior(str, Enum):
|
||||||
This setting makes the slots behave similar to Vue or React, where
|
This setting makes the slots behave similar to Vue or React, where
|
||||||
the slot uses EXCLUSIVELY the root context, and nested components CANNOT
|
the slot uses EXCLUSIVELY the root context, and nested components CANNOT
|
||||||
override context variables inside the slots.
|
override context variables inside the slots.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
Given this template
|
Given this template
|
||||||
|
|
|
@ -6,7 +6,7 @@ from typing import Dict, List, NamedTuple, Optional, Sequence, Set, Type, Union
|
||||||
if sys.version_info[:2] < (3, 10):
|
if sys.version_info[:2] < (3, 10):
|
||||||
from typing_extensions import TypeAlias
|
from typing_extensions import TypeAlias
|
||||||
else:
|
else:
|
||||||
from typing import TypeAlias
|
from typing import TypeAlias # noqa # TODO: Is this required?
|
||||||
|
|
||||||
from django.template import Context, Template
|
from django.template import Context, Template
|
||||||
from django.template.base import FilterExpression, Node, NodeList, Parser, TextNode
|
from django.template.base import FilterExpression, Node, NodeList, Parser, TextNode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue