Skip to content

Fix Sphinx error in core #32417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions sdk/core/azure-core/azure/core/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,25 +172,29 @@ class ODataV4Format:

Example of JSON:

error: {
"code": "ValidationError",
"message": "One or more fields contain incorrect values: ",
"details": [
{
"code": "ValidationError",
"target": "representation",
"message": "Parsing error(s): String '' does not match regex pattern '^[^{}/ :]+(?: :\\\\d+)?$'.
Path 'host', line 1, position 297."
},
{
.. code-block:: json

{
"error": {
"code": "ValidationError",
"target": "representation",
"message": "Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specificate
https: //github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
(schema https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json)."
"message": "One or more fields contain incorrect values: ",
"details": [
{
"code": "ValidationError",
"target": "representation",
"message": "Parsing error(s): String '' does not match regex pattern '^[^{}/ :]+(?: :\\\\d+)?$'.
Path 'host', line 1, position 297."
},
{
"code": "ValidationError",
"target": "representation",
"message": "Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specificate
https: //github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
(schema https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json)."
}
]
}
]
}
}

:param dict json_object: A Python dict representing a ODataV4 JSON
:ivar str ~.code: Its value is a service-defined error code.
Expand Down
4 changes: 2 additions & 2 deletions sdk/core/azure-core/azure/core/messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ def from_dict(cls, event: Dict[str, Any]) -> CloudEvent[DataType]:

@classmethod
def from_json(cls, event: Any) -> CloudEvent[DataType]:
"""
Returns the deserialized CloudEvent object when a json payload is provided.
"""Returns the deserialized CloudEvent object when a json payload is provided.

:param event: The json string that should be converted into a CloudEvent. This can also be
a storage QueueMessage, eventhub's EventData or ServiceBusMessage
:type event: object
Expand Down
8 changes: 0 additions & 8 deletions sdk/core/azure-core/azure/core/pipeline/policies/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,6 @@ def on_exception(

:param request: The Pipeline request object
:type request: ~azure.core.pipeline.PipelineRequest

.. admonition:: Example:

.. literalinclude:: ../samples/test_example_sansio.py
:start-after: [START on_exception]
:end-before: [END on_exception]
:language: python
:dedent: 4
"""
return

Expand Down