File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ def process_chapter_soup(
232232
233233 else :
234234 chapter ['xmlns' ] = 'http://www.w3.org/1999/xhtml' # type: ignore
235- del chapter ['class' ]
235+ del chapter ['class' ] # type: ignore
236236
237237 # promote subheadings within "base" chapter
238238 chapter = promote_headings (chapter )
@@ -242,10 +242,12 @@ def process_chapter_soup(
242242 subsections , sub_bib = process_chapter_subparts (subfile )
243243 if subsections :
244244 for subsection in subsections :
245- chapter .append (subsection )
245+ chapter .append (subsection ) # type: ignore
246246 if bib and sub_bib :
247247 entries = sub_bib .find_all ("dd" ) # type: ignore
248248 bib .dl .extend (entries ) # type: ignore
249+ # throw away the sub-bib section
250+ _ = sub_bib .extract ()
249251 elif sub_bib :
250252 bib = sub_bib
251253
@@ -328,7 +330,7 @@ def process_chapter(toc_element,
328330 chapter , ids = process_ids (chapter , book_ids )
329331
330332 # write the file, preserving any directory structure(s) from source
331- if type (toc_element ) == list :
333+ if type (toc_element ) is list :
332334 dir_structure = [p for p in toc_element [0 ].parts
333335 if p not in source_dir .parts ]
334336 else :
You can’t perform that action at this time.
0 commit comments