Skip to content

Commit 75b4773

Browse files
committed
update doc
1 parent 99a3af6 commit 75b4773

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

README-zh.md

-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
<img src="https://img.shields.io/badge/python->%3D%203.5.2-brightgreen" alt="Python Version">
2323
</a>
2424
<br/>
25-
<a href="https://lgtm.com/projects/g/wang0618/PyWebIO/context:python">
26-
<img src="https://img.shields.io/lgtm/grade/python/github/wang0618/PyWebIO.svg?colorB=brightgreen" alt="Python code quality">
27-
</a>
28-
<a href="https://lgtm.com/projects/g/wang0618/PyWebIO/context:javascript">
29-
<img src="https://img.shields.io/lgtm/grade/javascript/github/wang0618/PyWebIO.svg?colorB=brightgreen" alt="Javascript code quality">
30-
</a>
3125
<a href="https://github.com/wang0618/PyWebIO/blob/master/LICENSE">
3226
<img src="https://img.shields.io/github/license/wang0618/PyWebIO.svg" alt="License">
3327
</a>

README.md

-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
<img src="https://img.shields.io/badge/python->%3D%203.5.2-brightgreen" alt="Python Version">
2323
</a>
2424
<br/>
25-
<a href="https://lgtm.com/projects/g/wang0618/PyWebIO/context:python">
26-
<img src="https://img.shields.io/lgtm/grade/python/github/wang0618/PyWebIO.svg?colorB=brightgreen" alt="Python code quality">
27-
</a>
28-
<a href="https://lgtm.com/projects/g/wang0618/PyWebIO/context:javascript">
29-
<img src="https://img.shields.io/lgtm/grade/javascript/github/wang0618/PyWebIO.svg?colorB=brightgreen" alt="Javascript code quality">
30-
</a>
3125
<a href="https://github.com/wang0618/PyWebIO/blob/master/LICENSE">
3226
<img src="https://img.shields.io/github/license/wang0618/PyWebIO.svg" alt="License">
3327
</a>

pywebio/input.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _parse_args(kwargs, excludes=()):
135135

136136

137137
def input(label: str = '', type: str = TEXT, *, validate: Callable[[Any], Optional[str]] = None, name: str = None,
138-
value: str = None,
138+
value: Union[str, int] = None,
139139
action: Tuple[str, Callable[[Callable], None]] = None, onchange: Callable[[Any], None] = None,
140140
placeholder: str = None, required: bool = None,
141141
readonly: bool = None, datalist: List[str] = None, help_text: str = None, **other_html_attrs):
@@ -150,7 +150,9 @@ def input(label: str = '', type: str = TEXT, *, validate: Callable[[Any], Option
150150
user completes the input field or submits the form.
151151
152152
``validate`` receives the input value as a parameter. When the input value is valid, it returns ``None``.
153-
When the input value is invalid, it returns an error message string. For example:
153+
When the input value is invalid, it returns an error message string.
154+
155+
For example:
154156
155157
.. exportable-codeblock::
156158
:name: input-valid-func

pywebio/platform/flask.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .adaptor.http import HttpContext, HttpHandler, run_event_loop
1414
from .page import make_applications
1515
from .remote_access import start_remote_access_service
16-
from .utils import cdn_validation
16+
from .utils import cdn_validation, print_listen_address
1717
from ..session import Session
1818
from ..utils import STATIC_PATH, iscoroutinefunction, isgeneratorfunction
1919
from ..utils import get_free_port, parse_file_size
@@ -163,6 +163,8 @@ def start_server(applications, port=8080, host='', cdn=True,
163163
check_origin=check_origin, session_expire_seconds=session_expire_seconds,
164164
session_cleanup_interval=session_cleanup_interval, max_payload_size=max_payload_size)
165165

166+
print_listen_address(host, port)
167+
166168
debug = Session.debug = os.environ.get('PYWEBIO_DEBUG', debug)
167169
if not debug:
168170
logging.getLogger('werkzeug').setLevel(logging.WARNING)

0 commit comments

Comments
 (0)