Skip to content

Commit

Permalink
fix(checker): Change word[pos] initialization
Browse files Browse the repository at this point in the history
None breaks type checking in several places as those values must be
checked for still not being None.
  • Loading branch information
pmhahn committed Jun 1, 2023
1 parent 17910aa commit dcb2c5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions enchant/checker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ def __init__(
tokenize = get_tokenizer(None, chunkers, filters)
self._tokenize = tokenize

self.word: Optional[str] = None
self.wordpos: Optional[int] = None
self.word = ""
self.wordpos = 0
self._ignore_words: PythonDict[str, bool] = {}
self._replace_words: PythonDict[str, str] = {}
# Default to the empty string as the text to be checked
Expand Down

0 comments on commit dcb2c5e

Please sign in to comment.