File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 47
47
# TODO: Raise errors from list methods in the future.
48
48
# Later, remove this class entirely and use a regular set.
49
49
class _BlockLevelElements :
50
+ # This hybrid list/set container exists for backwards compatibility reasons,
51
+ # to support using both the `BLOCK_LEVEL_ELEMENTS` global variable (soft-deprecated)
52
+ # and the `Markdown.block_level_elements` instance attribute (preferred) as a list or a set.
53
+ # When we stop supporting list methods on these objects, we can remove the container
54
+ # as well as the `test_block_level_elements` test module.
55
+
50
56
def __init__ (self , elements : list [str ], / ) -> None :
51
57
self ._list = elements .copy ()
52
58
self ._set = set (self ._list )
Original file line number Diff line number Diff line change 22
22
===============================
23
23
24
24
Tests specific to the hybrid list/set container for block level elements.
25
+
26
+ The hybrid list/set container exists for backwards compatibility reasons,
27
+ to support using both the `BLOCK_LEVEL_ELEMENTS` global variable (soft-deprecated)
28
+ and the `Markdown.block_level_elements` instance attribute (preferred) as a list or a set.
29
+ When we stop supporting list methods on these objects, we can remove the container
30
+ as well as this test module.
25
31
"""
26
32
27
33
import unittest
You can’t perform that action at this time.
0 commit comments