django / asgiref

ASGI specification and utilities
https://asgi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
1.46k stars 207 forks source link

Add Type Annotations to `asgiref` Module Functions #428

Open davitacols opened 8 months ago

davitacols commented 8 months ago

I suggest adding type annotations to the following functions in the asgiref module:

  1. is_double_callable
  2. double_to_single_callable
  3. guarantee_single_callable

Proposed Changes:

Benefits:

Additional Context: This change aims to enhance the maintainability and clarity of the asgiref codebase by incorporating type annotations into key functions.

andrewgodwin commented 8 months ago

Sounds reasonable - I'll happily take a pull request for this.

davitacols commented 8 months ago

I am happy you found this useful. Best.