Strict linting rules require an override for the "example code".
Perhaps a better example should be provided?
@app.post("/notification")
def post_event(event: MyRequest = XmlBody()) -> EventResult: # noqa: B008
logger.info(f"{event} received")
return EventResult(message="success")