Conversation
|
@tonybaloney - I think this change will need a corresponding change in =================================== FAILURES ===================================
__________________________ TestCodeQuality.test_mypy ___________________________
Traceback (most recent call last):
File "/home/runner/work/azure-functions-python-library/azure-functions-python-library/tests/test_code_quality.py", line 32, in test_mypy
f'mypy validation failed:\n{output}') from None
AssertionError: mypy validation failed:
azure/functions/_http_asgi.py:73: error: Argument "headers" to "HttpResponse" has incompatible type "Union[Headers, Dict[Any, Any]]"; expected "Optional[Mapping[str, str]]"
Found 1 error in 1 file (checked 45 source files) |
|
@vrdmr @tonybaloney I have ignored the error for the moment following similar code in A proper solution would be to make a consistent usage of the |
|
@vrdmr @gavin-aguiar Any updates here? Since the |
|
@AnatoliB @anirudhgarg @gavin-aguiar Could you have a look on this PR as required reviewers? Ps.: @vrdmr It seems tests are failing/cancelling across all builds and are not related to this PR only. |
|
Thanks a lot, @michelole for the contribution, and apologies for the delay. I'll fix the CI issues with our workflow caused due to a PR coming from a fork. Thanks again. |
It seems
HttpResponseis the only class in this file that does not contain type hints.This generates errors when client code is checked using
mypyin strict mode:Add type hints following the docstring.