Skip to content

Commit 753e363

Browse files
Abel Milashclaude
andcommitted
Fix Sphinx cross-references in docstrings
Cleans up ~17 doc-build warnings caused by short-form, wrong-path, or unresolvable references in docstrings: - operations/records.py: qualify :class:`QueryResult` and :class:`FilterExpression` - operations/batch.py: qualify :attr:`BatchResult.responses` and :class:`FilterExpression`; replace unresolvable :attr: refs to instance attributes with plain backticks - operations/tables.py: fully qualify :attr:`AlternateKeyInfo.status` - models/fetchxml_query.py: correct wrong path (models.fetchxml_query.QueryResult → models.record.QueryResult) - core/log_config.py: qualify :class:`LogConfig` self-reference - client.py: replace reference to private _ODataClient with plain text Combined with the empty __all__ change, expected to reduce Microsoft Learn doc-build warnings from 38 to ~4 (the remaining 4 are auto-generated :mod: references to models.record in toc.yml that need a doc-repo-side fix). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 23cf7ae commit 753e363

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

src/PowerPlatform/Dataverse/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DataverseClient:
2727
2828
This client provides a simple, stable interface for interacting with Dataverse environments
2929
through the Web API. It handles authentication via Azure Identity and delegates HTTP operations
30-
to an internal :class:`~PowerPlatform.Dataverse.data._odata._ODataClient`.
30+
to an internal OData client.
3131
3232
Key capabilities:
3333
- OData CRUD operations: create, read, update, delete records

src/PowerPlatform/Dataverse/core/log_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
Local file logging configuration for Dataverse SDK HTTP diagnostics.
66
7-
Provides :class:`LogConfig`, an opt-in configuration for writing request/response
7+
Provides :class:`~PowerPlatform.Dataverse.core.log_config.LogConfig`, an opt-in configuration for writing request/response
88
traces to ``.log`` files with automatic header redaction and timestamped filenames.
99
"""
1010

src/PowerPlatform/Dataverse/models/fetchxml_query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(self, xml: str, entity_name: str, client: "DataverseClient") -> Non
5252
self._client = client
5353

5454
def execute(self) -> QueryResult:
55-
"""Execute the FetchXML query and return all results as a :class:`QueryResult`.
55+
"""Execute the FetchXML query and return all results as a :class:`~PowerPlatform.Dataverse.models.record.QueryResult`.
5656
5757
Blocking — fetches all pages upfront and holds every record in memory before
5858
returning. Simple for small-to-medium result sets; use :meth:`execute_pages`
@@ -72,7 +72,7 @@ def execute(self) -> QueryResult:
7272
return QueryResult(all_records)
7373

7474
def execute_pages(self) -> Iterator[QueryResult]:
75-
"""Lazily yield one :class:`QueryResult` per HTTP page.
75+
"""Lazily yield one :class:`~PowerPlatform.Dataverse.models.record.QueryResult` per HTTP page.
7676
7777
Streaming — each iteration fires one HTTP request and yields one page.
7878
Prefer over :meth:`execute` when:
@@ -84,7 +84,7 @@ def execute_pages(self) -> Iterator[QueryResult]:
8484
8585
One-shot — do not iterate more than once.
8686
87-
:return: Iterator of per-page :class:`QueryResult` objects.
87+
:return: Iterator of per-page :class:`~PowerPlatform.Dataverse.models.record.QueryResult` objects.
8888
:rtype: Iterator[:class:`~PowerPlatform.Dataverse.models.record.QueryResult`]
8989
9090
Example::

src/PowerPlatform/Dataverse/operations/batch.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ChangeSetRecordOperations:
7272
create/update/delete). Only write operations are allowed — GET is not
7373
permitted inside a changeset.
7474
75-
Do not instantiate directly; use :attr:`ChangeSet.records`.
75+
Do not instantiate directly; use ``ChangeSet.records``.
7676
"""
7777

7878
def __init__(self, cs_internal: _ChangeSet) -> None:
@@ -136,7 +136,7 @@ class ChangeSet:
136136
A transactional group of single-record write operations.
137137
138138
All operations succeed or are rolled back together. Use as a context
139-
manager or call :attr:`records` to add operations directly.
139+
manager or call ``records`` to add operations directly.
140140
141141
Do not instantiate directly; use :meth:`BatchRequest.changeset`.
142142
@@ -412,7 +412,7 @@ def list(
412412
413413
:param table: Table schema name (e.g. ``"account"``).
414414
:type table: :class:`str`
415-
:param filter: Optional OData ``$filter`` expression or :class:`FilterExpression`.
415+
:param filter: Optional OData ``$filter`` expression or :class:`~PowerPlatform.Dataverse.models.filters.FilterExpression`.
416416
:type filter: str or FilterExpression or None
417417
:param select: Optional list of column logical names to include.
418418
:type select: list[str] or None
@@ -574,7 +574,7 @@ def add_columns(self, table: str, columns: Dict[str, Any]) -> None:
574574
Add column-create operations to the batch (one per column).
575575
576576
The table's ``MetadataId`` is resolved at execute time. Each column
577-
produces one entry in :attr:`BatchResult.responses`.
577+
produces one entry in :attr:`~PowerPlatform.Dataverse.models.batch.BatchResult.responses`.
578578
579579
:param table: Schema name of the target table.
580580
:type table: :class:`str`
@@ -589,7 +589,7 @@ def remove_columns(self, table: str, columns: Union[str, List[str]]) -> None:
589589
590590
The table's ``MetadataId`` and each column's ``MetadataId`` are resolved
591591
at execute time. Each column produces one entry in
592-
:attr:`BatchResult.responses`.
592+
:attr:`~PowerPlatform.Dataverse.models.batch.BatchResult.responses`.
593593
594594
:param table: Schema name of the target table.
595595
:type table: :class:`str`
@@ -926,7 +926,7 @@ class BatchRequest:
926926
Builder for constructing and executing a Dataverse OData ``$batch`` request.
927927
928928
Obtain via :meth:`BatchOperations.new` (``client.batch.new()``). Add operations
929-
through :attr:`records`, :attr:`tables`, :attr:`query`, and :attr:`dataframe`,
929+
through ``records``, ``tables``, ``query``, and ``dataframe``,
930930
optionally group writes
931931
into a :meth:`changeset`, then call :meth:`execute`.
932932

src/PowerPlatform/Dataverse/operations/records.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,14 +548,14 @@ def list(
548548
count: bool = False,
549549
include_annotations: Optional[str] = None,
550550
) -> QueryResult:
551-
"""Fetch multiple records and return them as a :class:`QueryResult`.
551+
"""Fetch multiple records and return them as a :class:`~PowerPlatform.Dataverse.models.record.QueryResult`.
552552
553553
GA replacement for ``records.get(table, filter=...)``. All pages are
554-
collected eagerly and returned as a single :class:`QueryResult`.
554+
collected eagerly and returned as a single :class:`~PowerPlatform.Dataverse.models.record.QueryResult`.
555555
556556
:param table: Schema name of the table (e.g. ``"account"``).
557557
:type table: :class:`str`
558-
:param filter: Optional OData filter string or :class:`FilterExpression`.
558+
:param filter: Optional OData filter string or :class:`~PowerPlatform.Dataverse.models.filters.FilterExpression`.
559559
:type filter: str or FilterExpression or None
560560
:param select: Optional list of column logical names to include.
561561
:type select: list[str] or None
@@ -572,7 +572,7 @@ def list(
572572
:param include_annotations: OData annotation pattern for the
573573
``Prefer: odata.include-annotations`` header, or ``None``.
574574
:type include_annotations: :class:`str` or None
575-
:return: All matching records collected into a :class:`QueryResult`.
575+
:return: All matching records collected into a :class:`~PowerPlatform.Dataverse.models.record.QueryResult`.
576576
:rtype: :class:`~PowerPlatform.Dataverse.models.record.QueryResult`
577577
578578
Example::
@@ -622,15 +622,15 @@ def list_pages(
622622
count: bool = False,
623623
include_annotations: Optional[str] = None,
624624
) -> Iterator[QueryResult]:
625-
"""Lazily yield one :class:`QueryResult` per HTTP page.
625+
"""Lazily yield one :class:`~PowerPlatform.Dataverse.models.record.QueryResult` per HTTP page.
626626
627627
Streaming counterpart to :meth:`list`. Each iteration triggers one
628628
network request via ``@odata.nextLink``. One-shot — do not iterate
629629
more than once.
630630
631631
:param table: Schema name of the table (e.g. ``"account"``).
632632
:type table: :class:`str`
633-
:param filter: Optional OData filter string or :class:`FilterExpression`.
633+
:param filter: Optional OData filter string or :class:`~PowerPlatform.Dataverse.models.filters.FilterExpression`.
634634
:type filter: str or FilterExpression or None
635635
:param select: Optional list of column logical names to include.
636636
:type select: list[str] or None
@@ -647,7 +647,7 @@ def list_pages(
647647
:param include_annotations: OData annotation pattern for the
648648
``Prefer: odata.include-annotations`` header, or ``None``.
649649
:type include_annotations: :class:`str` or None
650-
:return: Iterator of per-page :class:`QueryResult` objects.
650+
:return: Iterator of per-page :class:`~PowerPlatform.Dataverse.models.record.QueryResult` objects.
651651
:rtype: Iterator[:class:`~PowerPlatform.Dataverse.models.record.QueryResult`]
652652
653653
Example::

src/PowerPlatform/Dataverse/operations/tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def create_alternate_key(
593593
594594
Alternate keys allow upsert operations to identify records by one or
595595
more columns instead of the primary GUID. After creation the key is
596-
queued for index building; its :attr:`~AlternateKeyInfo.status` will
596+
queued for index building; its :attr:`~PowerPlatform.Dataverse.models.table_info.AlternateKeyInfo.status` will
597597
transition from ``"Pending"`` to ``"Active"`` once the index is ready.
598598
599599
:param table: Schema name of the table (e.g. ``"new_Product"``).

0 commit comments

Comments
 (0)