align datastar_response behavior with docs (tests, fixes, examples) by mmacpherson · Pull Request #27 · starfederation/datastar-python

gazpachoking

@mmacpherson

@mmacpherson

@mmacpherson

@mmacpherson

- remove unnecessary partial function check
- exchange deco-time async generator vs coroutine check for runtime
- make analogous changes for each supported framework
- update test docstring to reflect implementation

@mmacpherson @claude

…rs, trim tests

- quart: restore copy_current_request_context in the coroutine branch
  (dropped in 90d9d41 without justification; reviewer flagged regression risk)
- django: drop NotImplementedError for async generators; unify coroutine +
  async-gen into a single async wrapper. Django's StreamingHttpResponse
  supports async iteration under ASGI, so this restores prior permissive
  behavior
- matrix test: unskip the Django async_generator case (now passes)
- tests: remove per-framework live-server integration tests (fastapi,
  fasthtml, litestar, starlette); keep test_decorator_matrix.py for
  cross-framework contract coverage and test_sync_handler_runs_off_event_loop
  as the regression guard for the original bug

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@mmacpherson @claude

- add tests/** to ruff per-file-ignores for ANN, PLC0415, PLR2004
  (mirrors existing examples/ treatment; these rules are noisy for
  test fixtures, conditional framework imports, and threshold values)
- remove leftover unused Union import in sanic.py (rebase artifact)
- apply ruff --fix and ruff format to test files
- add `lint` target to Makefile

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>