Skip to content

fix: runtime type checking for AirResponse.render()#1108

Open
francisdbillones wants to merge 4 commits into
feldroy:mainfrom
francisdbillones:1075-airresponse-type-annotation
Open

fix: runtime type checking for AirResponse.render()#1108
francisdbillones wants to merge 4 commits into
feldroy:mainfrom
francisdbillones:1075-airresponse-type-annotation

Conversation

@francisdbillones
Copy link
Copy Markdown
Contributor

@francisdbillones francisdbillones commented Mar 23, 2026

What

This PR implements runtime type checking for AirResponse.render(), which accepts a tag annotated as BaseTag | str | None.

Fixes issue #1075

Pattern

I followed similar patterns in test_templating.py for the unit tests.

Reviewer Focus

Since tag's type annotation wasn't being checked at runtime, there are code paths where None could possibly be passed, which seems to be handled in Response.render but doesn't seem to be acknowledged in AirResponse.render. Was wondering if this was intentional or a silent bug.

Checklist

  • Diff contains only changes for this task — no unrelated refactoring or cleanup
  • Addresses exactly one issue or feature
  • New or changed behavior has test coverage
  • This is the simplest viable approach
  • AI provenance section removed or accurate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant