Skip to content

Commit

Permalink
[en] No need to use .strip() chaining
Browse files Browse the repository at this point in the history
I forgot Python strip() takes a string of characters,
which are all stripped from both ends.
  • Loading branch information
kristian-clausal committed Nov 26, 2024
1 parent 459e051 commit f8ba806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wiktextract/extractor/en/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ def process_gloss_header(
# tags, you can add them to WORD_LEVEL_HEAD_TEMPLATES
for templ_data in term_label_templates:
print(templ_data)
expan = templ_data.get("expansion", "").strip("(").strip(")")
expan = templ_data.get("expansion", "").strip("().,; ")
if not expan:
continue
tlb_tagsets, tlb_topics = decode_tags(expan)
Expand Down

0 comments on commit f8ba806

Please sign in to comment.