GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc(checker): PEP-484 get_text -> Any · pmhahn/pyenchant@9e46d00

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • enchant/checker
    • GtkSpellCheckerDialog.py
    • __init__.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎enchant/checker/GtkSpellCheckerDialog.py‎

Copy file name to clipboardExpand all lines: enchant/checker/GtkSpellCheckerDialog.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# do so, delete this exception statement from your version.
2929
#
3030

31-
from typing import Any, Iterable, List, Optional
31+
from typing import Any, Iterable, List, cast
3232

3333
import gi
3434

@@ -215,7 +215,7 @@ def _getRepl(self) -> str:
215215
"""Get the chosen replacement string."""
216216
repl = self.replace_text.get_text()
217217
repl = self._checker.coerce_string(repl)
218-
return repl
218+
return cast(str, repl)
219219

220220
def _fillSuggestionList(self, suggestions: Iterable[str]) -> None:
221221
model = self.suggestion_list_view.get_model()
Collapse file

‎enchant/checker/__init__.py‎

Copy file name to clipboardExpand all lines: enchant/checker/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
import array
4949
import warnings
50+
from typing import Any
5051
from typing import Dict as PythonDict
5152
from typing import List, Optional, Type, Union
5253

@@ -202,7 +203,7 @@ def set_text(self, text: Union[bytes, str, array.array]) -> None:
202203
raise TypeError(text)
203204
self._tokens = self._tokenize(self._text)
204205

205-
def get_text(self) -> str:
206+
def get_text(self) -> Any:
206207
"""Return the spell-checked text."""
207208
if self._use_tostring:
208209
return self._array_to_string(self._text)

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.