Skip to content

Commit 9b2eaa6

Browse files
committed
doc[checker]: PEP-484 get_text -> Any
get_text() -> Union[str, array] depending on what was used when set_text() was used. Because of <python/mypy#1693> use Any.
1 parent c9972bc commit 9b2eaa6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎enchant/checker/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
import array
4949
import warnings
5050
from typing import Dict as PythonDict
51-
from typing import List, MutableSequence, Optional, Type, Union
51+
from typing import Any, List, MutableSequence, Optional, Type, Union
5252

5353
import enchant
5454
from enchant import Dict
@@ -201,7 +201,7 @@ def set_text(self, text: str) -> None:
201201
self._use_tostring = False
202202
self._tokens = self._tokenize(self._text)
203203

204-
def get_text(self) -> str:
204+
def get_text(self) -> Any:
205205
"""Return the spell-checked text."""
206206
if self._use_tostring:
207207
return self._array_to_string(self._text)

0 commit comments

Comments
 (0)