Skip to content

Commit

Permalink
style: adds typing ignore to fix mypy check
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickfBraz committed Jul 16, 2024
1 parent b348834 commit 69ee938
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ def unquote_and_decode_unicode_escape_seq(
# Decode Unicode escape sequences. This avoid issues with encoding
# This process does not handle unicode from "\U00010000" to "\U0010FFFF"
while unicode_seq_pattern.search(string):
# Get the first Unicode escape sequence
unicode_seq = unicode_seq_pattern.search(string).group(0)
# Get the first Unicode escape sequence.
# mypy: unicode_seq_pattern.search(string) is not None because of the while loop
unicode_seq = unicode_seq_pattern.search(string).group(0) # type: ignore
# Replace the Unicode escape sequence with the decoded character
try:
string = string.replace(
Expand Down

0 comments on commit 69ee938

Please sign in to comment.