Skip to content

Fix hardcoded :dedent: values in azure-search-documents docstrings#46422

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-api-view-feedback-azure-search-documents
Draft

Fix hardcoded :dedent: values in azure-search-documents docstrings#46422
Copilot wants to merge 2 commits intomainfrom
copilot/fix-api-view-feedback-azure-search-documents

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

APIView flagged 64 comments on hardcoded numerical :dedent: 4 values in Sphinx literalinclude directives across docstring examples — these should use empty :dedent: to allow auto-detection instead of locking to a specific indentation level.

Changes

Replaced :dedent: 4:dedent: in 19 locations across three _patch.py files:

  • azure/search/documents/_operations/_patch.py (9): upload_documents, delete_documents, merge_documents, merge_or_upload_documents, search (×3), autocomplete, suggest
  • azure/search/documents/aio/_operations/_patch.py (9): async equivalents of the above
  • azure/search/documents/indexes/_operations/_patch.py (1): get_indexer_names

Before:

.. literalinclude:: ../samples/sample_documents_crud.py
    :start-after: [START upload_document]
    :end-before: [END upload_document]
    :language: python
    :dedent: 4
    :caption: Upload new documents to an index

After:

.. literalinclude:: ../samples/sample_documents_crud.py
    :start-after: [START upload_document]
    :end-before: [END upload_document]
    :language: python
    :dedent:
    :caption: Upload new documents to an index

APIView URL: https://spa.apiview.dev/review/e8d301b10edf4b29b346a87fa4905ea6?activeApiRevisionId=7234ecb987b64bc689d16969085cc7d1

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • scanning-api.github.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Remove hardcoded numerical dedent values (`:dedent: 4`) from docstring
examples in _patch.py files, replacing them with empty `:dedent:` directives
as requested by APIView feedback.

Files changed:
- azure/search/documents/_operations/_patch.py (9 occurrences)
- azure/search/documents/aio/_operations/_patch.py (9 occurrences)
- azure/search/documents/indexes/_operations/_patch.py (1 occurrence)

Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/b079fd65-e2ae-447f-ac85-fafd0f3ae94c

Co-authored-by: xiangyan99 <14350651+xiangyan99@users.noreply.github.com>
Copilot AI changed the title [WIP] Apply TypeSpec client customizations for APIView feedback Fix hardcoded :dedent: values in azure-search-documents docstrings Apr 20, 2026
Copilot AI requested a review from xiangyan99 April 20, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address APIView feedback for azure-search-documents (Python)

2 participants