Skip to content

Commit

Permalink
fix: Only set extension "is_hit" if not yet existing
Browse files Browse the repository at this point in the history
  • Loading branch information
Natalie-T-E committed Feb 24, 2025
1 parent dfe6422 commit 9e5a182
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gdex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
_DEFAULT_RARE_CHARS = "0123456789')(-"

Span.set_extension("gdex", default=0.0)
Token.set_extension("is_hit", default=False)
if not Token.has_extension("is_hit"):
Token.set_extension("is_hit", default=False)


@dataclass
Expand Down

0 comments on commit 9e5a182

Please sign in to comment.