Skip to content

docs: add type hints to examples (things.py, things_asgi.py, things_advanced_asgi.py)#2639

Open
Midhun1618 wants to merge 2 commits intofalconry:masterfrom
Midhun1618:master
Open

docs: add type hints to examples (things.py, things_asgi.py, things_advanced_asgi.py)#2639
Midhun1618 wants to merge 2 commits intofalconry:masterfrom
Midhun1618:master

Conversation

@Midhun1618
Copy link
Copy Markdown

Summary of Changes

Added type annotations to three example files as part of #1820:

  • examples/things.py — added from falcon import Request, Response and typed the on_get responder
  • examples/things_asgi.py — added from falcon.asgi import Request, Response and typed the on_get responder
  • examples/things_advanced_asgi.py — added from falcon.asgi import Request, Response and from typing import Any, typed all responder methods, middleware process methods, hook functions, and helper methods throughout

Related Issues

#1820

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. Reading our contribution guide at least once will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

  • Applied changes to both WSGI and ASGI code paths and interfaces (where applicable).
  • Added tests for changed code.
  • Performed automated tests and code quality checks by running tox.
  • Prefixed code comments with GitHub nick and an appropriate prefix.
  • Coding style is consistent with the rest of the framework.
  • Updated documentation for changed code.
    • Added docstrings for any new classes, functions, or modules.
    • Updated docstrings for any modifications to existing code.
    • Updated both WSGI and ASGI docs (where applicable).
    • Added references to new classes, functions, or modules to the relevant RST file under docs/.
    • Updated all relevant supporting documentation files under docs/.
    • A copyright notice is included at the top of any new modules (using your own name or the name of your organization).
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.
  • Changes (and possible deprecations) have towncrier news fragments under docs/_newsfragments/.
  • LLM output, if any, has been carefully reviewed and tested by a human developer.

@vytas7 vytas7 changed the title Add type hints to examples (things.py, things_asgi.py, things_advanced_asgi.py) docs: add type hints to examples (things.py, things_asgi.py, things_advanced_asgi.py) May 1, 2026
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