diff --git a/autorest/codegen/serializers/builder_serializer.py b/autorest/codegen/serializers/builder_serializer.py index 24ac32e2537..3e90a7234a9 100644 --- a/autorest/codegen/serializers/builder_serializer.py +++ b/autorest/codegen/serializers/builder_serializer.py @@ -620,7 +620,7 @@ def _response_docstring_type_template(self, builder: BuilderType) -> str: def _response_type_annotation(self, builder: BuilderType, modify_if_head_as_boolean: bool = True) -> str: if ( modify_if_head_as_boolean - and builder.request_builder.method == "head" + and builder.request_builder.method.lower() == "head" and self.code_model.options["head_as_boolean"] ): return "bool" @@ -643,7 +643,7 @@ def _response_docstring_text_template(self, builder: BuilderType) -> str: # pyl def response_docstring(self, builder: BuilderType) -> List[str]: responses_with_body = [r for r in builder.responses if r.has_body] - if builder.request_builder.method == "head" and self.code_model.options["head_as_boolean"]: + if builder.request_builder.method.lower() == "head" and self.code_model.options["head_as_boolean"]: response_docstring_text = "bool" rtype = "bool" elif responses_with_body: diff --git a/docs/samples/specification/management/generated/azure/mgmt/sample/aio/operations/_http_success_operations.py b/docs/samples/specification/management/generated/azure/mgmt/sample/aio/operations/_http_success_operations.py index 3e0618edaa0..a5900a4af3e 100644 --- a/docs/samples/specification/management/generated/azure/mgmt/sample/aio/operations/_http_success_operations.py +++ b/docs/samples/specification/management/generated/azure/mgmt/sample/aio/operations/_http_success_operations.py @@ -44,12 +44,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def head200( self, **kwargs: Any - ) -> None: + ) -> bool: """Return 200 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -83,12 +83,12 @@ async def head200( async def head204( self, **kwargs: Any - ) -> None: + ) -> bool: """Return 204 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -122,12 +122,12 @@ async def head204( async def head404( self, **kwargs: Any - ) -> None: + ) -> bool: """Return 404 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] diff --git a/docs/samples/specification/management/generated/azure/mgmt/sample/operations/_http_success_operations.py b/docs/samples/specification/management/generated/azure/mgmt/sample/operations/_http_success_operations.py index 44cdafd663c..dc2f0964fb1 100644 --- a/docs/samples/specification/management/generated/azure/mgmt/sample/operations/_http_success_operations.py +++ b/docs/samples/specification/management/generated/azure/mgmt/sample/operations/_http_success_operations.py @@ -94,12 +94,12 @@ def head200( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 200 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -134,12 +134,12 @@ def head204( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 204 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -174,12 +174,12 @@ def head404( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 404 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] diff --git a/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py b/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py index 9406c19a746..620766d309c 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py +++ b/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py @@ -143,14 +143,14 @@ async def custom_named_request_id_param_grouping( custom_named_request_id_param_grouping.metadata = {"url": "/azurespecials/customNamedRequestIdParamGrouping"} # type: ignore @distributed_trace_async - async def custom_named_request_id_head(self, foo_client_request_id: str, **kwargs: Any) -> None: + async def custom_named_request_id_head(self, foo_client_request_id: str, **kwargs: Any) -> bool: """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. :param foo_client_request_id: The fooRequestId. :type foo_client_request_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py b/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py index e947764075e..650ac5b5ebc 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py +++ b/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py @@ -225,14 +225,14 @@ def custom_named_request_id_head( foo_client_request_id, # type: str **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. :param foo_client_request_id: The fooRequestId. :type foo_client_request_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/operations/_http_success_operations.py b/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/operations/_http_success_operations.py index 27ead7e5918..26624cdc979 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/operations/_http_success_operations.py +++ b/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/operations/_http_success_operations.py @@ -48,12 +48,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def head200(self, **kwargs: Any) -> None: + async def head200(self, **kwargs: Any) -> bool: """Return 200 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -80,12 +80,12 @@ async def head200(self, **kwargs: Any) -> None: head200.metadata = {"url": "/http/success/200"} # type: ignore @distributed_trace_async - async def head204(self, **kwargs: Any) -> None: + async def head204(self, **kwargs: Any) -> bool: """Return 204 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -112,12 +112,12 @@ async def head204(self, **kwargs: Any) -> None: head204.metadata = {"url": "/http/success/204"} # type: ignore @distributed_trace_async - async def head404(self, **kwargs: Any) -> None: + async def head404(self, **kwargs: Any) -> bool: """Return 404 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/legacy/Expected/AcceptanceTests/Head/head/operations/_http_success_operations.py b/test/azure/legacy/Expected/AcceptanceTests/Head/head/operations/_http_success_operations.py index 44cfa29ff5a..8770afc5bb1 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/Head/head/operations/_http_success_operations.py +++ b/test/azure/legacy/Expected/AcceptanceTests/Head/head/operations/_http_success_operations.py @@ -99,12 +99,12 @@ def __init__(self, client, config, serializer, deserializer): def head200( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 200 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -134,12 +134,12 @@ def head200( def head204( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 204 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -169,12 +169,12 @@ def head204( def head404( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 404 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/operations/_head_exception_operations.py b/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/operations/_head_exception_operations.py index ae1521b65f7..3e53419d50a 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/operations/_head_exception_operations.py +++ b/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/operations/_head_exception_operations.py @@ -48,12 +48,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def head200(self, **kwargs: Any) -> None: + async def head200(self, **kwargs: Any) -> bool: """Return 200 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -80,12 +80,12 @@ async def head200(self, **kwargs: Any) -> None: head200.metadata = {"url": "/http/success/200"} # type: ignore @distributed_trace_async - async def head204(self, **kwargs: Any) -> None: + async def head204(self, **kwargs: Any) -> bool: """Return 204 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -112,12 +112,12 @@ async def head204(self, **kwargs: Any) -> None: head204.metadata = {"url": "/http/success/204"} # type: ignore @distributed_trace_async - async def head404(self, **kwargs: Any) -> None: + async def head404(self, **kwargs: Any) -> bool: """Return 404 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/operations/_head_exception_operations.py b/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/operations/_head_exception_operations.py index 556cd330451..f6864084ac7 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/operations/_head_exception_operations.py +++ b/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/operations/_head_exception_operations.py @@ -99,12 +99,12 @@ def __init__(self, client, config, serializer, deserializer): def head200( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 200 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -134,12 +134,12 @@ def head200( def head204( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 204 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -169,12 +169,12 @@ def head204( def head404( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 404 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/operations/_http_success_operations.py b/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/operations/_http_success_operations.py index 27ead7e5918..26624cdc979 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/operations/_http_success_operations.py +++ b/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/operations/_http_success_operations.py @@ -48,12 +48,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def head200(self, **kwargs: Any) -> None: + async def head200(self, **kwargs: Any) -> bool: """Return 200 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -80,12 +80,12 @@ async def head200(self, **kwargs: Any) -> None: head200.metadata = {"url": "/http/success/200"} # type: ignore @distributed_trace_async - async def head204(self, **kwargs: Any) -> None: + async def head204(self, **kwargs: Any) -> bool: """Return 204 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -112,12 +112,12 @@ async def head204(self, **kwargs: Any) -> None: head204.metadata = {"url": "/http/success/204"} # type: ignore @distributed_trace_async - async def head404(self, **kwargs: Any) -> None: + async def head404(self, **kwargs: Any) -> bool: """Return 404 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/operations/_http_success_operations.py b/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/operations/_http_success_operations.py index 44cfa29ff5a..8770afc5bb1 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/operations/_http_success_operations.py +++ b/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/operations/_http_success_operations.py @@ -99,12 +99,12 @@ def __init__(self, client, config, serializer, deserializer): def head200( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 200 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -134,12 +134,12 @@ def head200( def head204( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 204 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -169,12 +169,12 @@ def head204( def head404( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 404 status code if successful. :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None + :return: bool, or the result of cls(response) + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/operations/_operations.py b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/operations/_operations.py index 15eec0ef9c8..48cf11dd591 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/operations/_operations.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/operations/_operations.py @@ -1193,13 +1193,13 @@ async def custom_named_request_id_param_grouping(self, *, foo_client_request_id: custom_named_request_id_param_grouping.metadata = {"url": "/azurespecials/customNamedRequestIdParamGrouping"} # type: ignore @distributed_trace_async - async def custom_named_request_id_head(self, *, foo_client_request_id: str, **kwargs: Any) -> None: + async def custom_named_request_id_head(self, *, foo_client_request_id: str, **kwargs: Any) -> bool: """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. :keyword foo_client_request_id: The fooRequestId. :paramtype foo_client_request_id: str - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/operations/_operations.py b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/operations/_operations.py index 9172c9e29c5..0135b45a62b 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/operations/_operations.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/operations/_operations.py @@ -2073,13 +2073,13 @@ def custom_named_request_id_param_grouping( def custom_named_request_id_head( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. :keyword foo_client_request_id: The fooRequestId. :paramtype foo_client_request_id: str - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/operations/_operations.py b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/operations/_operations.py index 64159275c5c..04a326ab061 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/operations/_operations.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/operations/_operations.py @@ -51,11 +51,11 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def head200(self, **kwargs: Any) -> None: + async def head200(self, **kwargs: Any) -> bool: """Return 200 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -81,11 +81,11 @@ async def head200(self, **kwargs: Any) -> None: head200.metadata = {"url": "/http/success/200"} # type: ignore @distributed_trace_async - async def head204(self, **kwargs: Any) -> None: + async def head204(self, **kwargs: Any) -> bool: """Return 204 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -111,11 +111,11 @@ async def head204(self, **kwargs: Any) -> None: head204.metadata = {"url": "/http/success/204"} # type: ignore @distributed_trace_async - async def head404(self, **kwargs: Any) -> None: + async def head404(self, **kwargs: Any) -> bool: """Return 404 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/operations/_operations.py b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/operations/_operations.py index 549ddb43ece..bd9c13d4d3e 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/operations/_operations.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/operations/_operations.py @@ -97,11 +97,11 @@ def __init__(self, client, config, serializer, deserializer): def head200( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 200 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -130,11 +130,11 @@ def head200( def head204( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 204 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -163,11 +163,11 @@ def head204( def head404( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 404 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/operations/_operations.py b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/operations/_operations.py index a8bf5c8e5c1..42a139fdfd9 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/operations/_operations.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/operations/_operations.py @@ -51,11 +51,11 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def head200(self, **kwargs: Any) -> None: + async def head200(self, **kwargs: Any) -> bool: """Return 200 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -81,11 +81,11 @@ async def head200(self, **kwargs: Any) -> None: head200.metadata = {"url": "/http/success/200"} # type: ignore @distributed_trace_async - async def head204(self, **kwargs: Any) -> None: + async def head204(self, **kwargs: Any) -> bool: """Return 204 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -111,11 +111,11 @@ async def head204(self, **kwargs: Any) -> None: head204.metadata = {"url": "/http/success/204"} # type: ignore @distributed_trace_async - async def head404(self, **kwargs: Any) -> None: + async def head404(self, **kwargs: Any) -> bool: """Return 404 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/operations/_operations.py b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/operations/_operations.py index 2c5707cd49c..786cb045f1e 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/operations/_operations.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/operations/_operations.py @@ -97,11 +97,11 @@ def __init__(self, client, config, serializer, deserializer): def head200( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 200 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -130,11 +130,11 @@ def head200( def head204( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 204 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None] @@ -163,11 +163,11 @@ def head204( def head404( self, **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> bool """Return 404 status code if successful. - :return: None - :rtype: None + :return: bool + :rtype: bool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop("cls", None) # type: ClsType[None]