INNER CODE UNIT · Python

receive_buffered

MakazhanAlpamys/Soup · src/soup_cli/ui/app.py:100

        async def receive_buffered():
            nonlocal message_index
            if message_index < len(buffered_messages):
                message = buffered_messages[message_index]
                message_index += 1
                return message
            return await receive()

        await self._app(scope, receive_buffered, send)


_CHART_JS_URL = "https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"

CONTENT_SECURITY_POLICY = "; ".join((
    "default-src 'self'",
    f"script-src 'self' {_CHART_JS_URL}",
    # Rendered markup and Chart.js set inline style attributes.
    "style-src 'self' 'unsafe-inline'",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…