Skip to content

Commit 760c479

Browse files
committed
move no cover to dynamic key default
also update IDOM_FEATURE_INDEX_AS_DEFAULT_KEY docstring
1 parent 2c26b51 commit 760c479

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/idom/config.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@
6363
)
6464
"""Use the index of elements/components amongst their siblings as the default key.
6565
66-
In a future release this flag's default value will be set to true, and after that, this
67-
flag will be removed entirely and the indices will always be the default key.
66+
The flag's default value is set to true. To return to legacy behavior set
67+
``IDOM_FEATURE_INDEX_AS_DEFAULT_KEY=0``. In a future release, this flag will be removed
68+
entirely and the indices will always be the default key.
6869
69-
For more information on changes to this feature flag see: https://github.com/idom-team/idom/issues/351
70+
For more information on changes to this feature flag see:
71+
https://github.com/idom-team/idom/issues/351
7072
"""

src/idom/core/layout.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -698,10 +698,10 @@ def _process_child_type_and_key(
698698

699699
if IDOM_FEATURE_INDEX_AS_DEFAULT_KEY.current:
700700

701-
def _default_key(index: int) -> Any: # pragma: no cover
701+
def _default_key(index: int) -> Any:
702702
return index
703703

704704
else:
705705

706-
def _default_key(index: int) -> Any:
706+
def _default_key(index: int) -> Any: # pragma: no cover
707707
return object()

0 commit comments

Comments
 (0)