A decorator to mark a function as main. This calls run() on the result of the function, and logs an error that occurs.
(async_func)
| 49 | |
| 50 | |
| 51 | def main(async_func): |
| 52 | """ |
| 53 | A decorator to mark a function as main. This calls run() on the |
| 54 | result of the function, and logs an error that occurs. |
| 55 | """ |
| 56 | run(_main_wrapper(async_func())) |
| 57 | return async_func |
| 58 | |
| 59 | |
| 60 | async def _main_wrapper(coro): |
nothing calls this directly
no test coverage detected