Skip to content

Commit a221bee

Browse files
authored
Merge branch 'main' into dev
2 parents c03f1a9 + 3fd2355 commit a221bee

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
author_email="[email protected]",
1313
description=__doc__,
1414
long_description=open("README.md", encoding="utf-8").read(),
15+
long_description_content_type="text/markdown",
1516
install_requires=["windows-curses; platform_system=='Windows'"],
1617
extras_require={"doc": ["sphinx", "sphinx-rtd-theme"]},
1718
include_package_data=True,

visualdialog/box.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,16 @@ def __init__(
143143
self.downtime_chars = downtime_chars
144144
self.downtime_chars_delay = downtime_chars_delay
145145

146-
self.key_detection: Literal["getkey", "getch", "get_wch"] = "getkey"
146+
#: Keystroke acquisition curses method for BaseTextBox.get_input.
147+
self.key_detection: Literal["getkey",
148+
"getch",
149+
"get_wch"] = "getkey"
150+
151+
#: List of accepted key to skip dialog.
152+
#: This defaults to a list contains ``" "``.
147153
self.confirm_keys: List[CursesKey] = [" "]
154+
#: List of accepted key to raise PanicError.
155+
#: This defaults to an empty list.
148156
self.panic_keys: List[CursesKey] = []
149157

150158
@property

visualdialog/dialog.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,13 @@ def __lt__(self, text: str) -> str:
8787
"""A shortcut to call :meth:`char_by_char` by passing only
8888
`text` argument.
8989
90-
>>> DialogBox(x, y,
91-
... height, width,
92-
... global_win=win) < "Foo bar"
90+
>>> db = DialogBox(x, y, height, width, global_win=win)
91+
>>> db < "Foo bar"
9392
9493
This code roughly equivalent to:
9594
96-
>>> DialogBox(x, y,
97-
... height, width).char_by_char("Foo bar", win)
98-
95+
>>> db = DialogBox(x, y, height, width)
96+
>>> db.char_by_char("Foo bar", win)
9997
"""
10098
return self.char_by_char(text)
10199

0 commit comments

Comments
 (0)