Open hallvictoria opened 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])
ABCMeta | _GenericAlias
event: func.EventHubEvent | List[func.EventHubEvent]
For bindings that allow List[<type>] type hints, this allows for the new syntax.
List[<type>]
This is accomplished by:
Union
or
Bindings that can now support this syntax:
Fixes: https://github.com/Azure/azure-functions-python-worker/issues/1524
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:
Union
and determine if all of the types are supportedUnion
aren't supported, indexing will failor
statement in type checking, it won't affect any currently supported type hintsBindings that can now support this syntax:
Fixes: https://github.com/Azure/azure-functions-python-worker/issues/1524