@@ -96,7 +96,6 @@ def find_fragments(
9696 orphan_fragment_counter : DefaultDict [str | None , int ] = defaultdict (int )
9797
9898 for key , val in sections .items ():
99-
10099 if fragment_directory is not None :
101100 section_dir = os .path .join (base_directory , val , fragment_directory )
102101 else :
@@ -113,7 +112,6 @@ def find_fragments(
113112 file_content = {}
114113
115114 for basename in files :
116-
117115 ticket , category , counter = parse_newfragment_basename (
118116 basename , frag_type_names
119117 )
@@ -149,6 +147,7 @@ def indent(text: str, prefix: str) -> str:
149147 """
150148 Adds `prefix` to the beginning of non-empty lines in `text`.
151149 """
150+
152151 # Based on Python 3's textwrap.indent
153152 def prefixed_lines () -> Iterator [str ]:
154153 for line in text .splitlines (True ):
@@ -165,14 +164,12 @@ def split_fragments(
165164 definitions : Mapping [str , Mapping [str , Any ]],
166165 all_bullets : bool = True ,
167166) -> Mapping [str , Mapping [str , Mapping [str , Sequence [str ]]]]:
168-
169167 output = OrderedDict ()
170168
171169 for section_name , section_fragments in fragments .items ():
172170 section : dict [str , dict [str , list [str ]]] = {}
173171
174172 for (ticket , category , counter ), content in section_fragments .items ():
175-
176173 if all_bullets :
177174 # By default all fragmetns are append by "-" automatically,
178175 # and need to be indented because of that.
@@ -261,7 +258,6 @@ def render_fragments(
261258 data : dict [str , dict [str , dict [str , list [str ]]]] = OrderedDict ()
262259
263260 for section_name , section_value in fragments .items ():
264-
265261 data [section_name ] = OrderedDict ()
266262
267263 for category_name , category_value in section_value .items ():
0 commit comments