Slide 20
Slide 20 text
Rules are coroutines
Rules declare inputs they know about in advance. But as a rule runs, if it decides it
needs some other input, it yields back to the engine.
pytest_binary = await Get[PyTest](
PytestConfig(version="pytest>=5.3.5,<5.4",
plugins=["pytest-timeout>=1.3.4,<1.4",
"pytest-cov>=2.8.1,<2.9"])
)
Again, this is standard Python 3 async and type annotation syntax.
Note, however, that the event loop is run by the Pants engine, in Rust code, and
not by asyncio.run().