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.
|
||||
Contexts of deeper components take precedence over shallower ones.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
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.
|
||||
Otherwise, the context of the component where the slot fill is located is used.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
Given this template
|
||||
|
@ -76,7 +76,7 @@ class SlotContextBehavior(str, Enum):
|
|||
This setting makes the slots behave similar to Vue or React, where
|
||||
the slot uses EXCLUSIVELY the root context, and nested components CANNOT
|
||||
override context variables inside the slots.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
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):
|
||||
from typing_extensions import TypeAlias
|
||||
else:
|
||||
from typing import TypeAlias
|
||||
from typing import TypeAlias # noqa # TODO: Is this required?
|
||||
|
||||
from django.template import Context, Template
|
||||
from django.template.base import FilterExpression, Node, NodeList, Parser, TextNode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue