Azure / azure-functions-python-library

Azure Functions Python SDK
MIT License
151 stars 63 forks source link

fix: allow union typing for supported bindings #239

Open hallvictoria opened 3 weeks ago

hallvictoria commented 3 weeks ago

todo: support built-in collection types (list) after Bill's PR is merged

Python 3.10 and above allow for ABCMeta | _GenericAlias type hinting syntax. (For example: event: func.EventHubEvent | List[func.EventHubEvent])

For bindings that allow List[<type>] type hints, this allows for the new syntax.

This is accomplished by:

Bindings that can now support this syntax:

Fixes: https://github.com/Azure/azure-functions-python-worker/issues/1524