You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
698 B
Python
29 lines
698 B
Python
2 years ago
|
"""Generate a new reference file."""
|
||
|
from __future__ import annotations
|
||
|
|
||
|
import os
|
||
|
|
||
|
from capnp_stub_generator.cli import main as stub_generator_main
|
||
|
|
||
|
here = os.path.dirname(__file__)
|
||
|
|
||
|
|
||
|
def main():
|
||
|
"""Generate a new reference from the dummy schema."""
|
||
|
stub_generator_main(
|
||
|
[
|
||
|
"-p",
|
||
|
os.path.join(here, "dummy.capnp"),
|
||
|
"-c",
|
||
|
os.path.join(here, "dummy_capnp.py"),
|
||
|
os.path.join(here, "dummy_capnp.pyi"),
|
||
|
os.path.join(here, "ref_dummy_capnp.pyi_nocheck"),
|
||
|
]
|
||
|
)
|
||
|
|
||
|
os.rename(os.path.join(here, "dummy_capnp.pyi"), os.path.join(here, "ref_dummy_capnp.pyi_nocheck"))
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|