-
Notifications
You must be signed in to change notification settings - Fork 2
/
wipy_.py
26 lines (22 loc) · 642 Bytes
/
wipy_.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
Generate `pyi` from corresponding `rst` docs.
"""
import rst
from rst2pyi import RST2PyI
__author__ = rst.__author__
__copyright__ = rst.__copyright__
__license__ = rst.__license__
__version__ = "7.5.3" # Version set by https://github.com/hlovatt/tag2ver
def wipy(shed: RST2PyI) -> None:
shed.module(
name="wipy",
old="WiPy specific features",
post_doc="from typing import overload",
end="Functions",
)
shed.def_(
old=r".. function:: heartbeat([enable])",
new=["def heartbeat(enable: bool, /) -> None", "def heartbeat() -> bool",],
indent=0,
)
shed.write()