INNER CODE UNIT · Python
wrapper
rio-labs/rio · rio/app.py:81
def wrapper(*args, **kwargs):
if rio.global_state.launched_via_rio_run:
raise RuntimeError(
f"`App.{func.__name__}` conflicts with `rio run`. Either delete"
f' that line, or move it behind a `if __name__ == "__main__":`'
f" guard."
)
return func(*args, **kwargs)
return wrapper
@t.final
class App:
"""
Contains all the information needed to run a Rio app.