Skip to content

Commit 2042ad4

Browse files
jtcurlinjacob-curlinzhaodongwang-msft
authored
fix: client.list_tables return type inconsistent with type hint & doc… (#85)
* fix: client.list_tables return type inconsistent with type hint & docstring * Update example code indentation in client.py * Fix formatting in docstring example for list_tables --------- Co-authored-by: jacob curlin <jacob.curlin@titans.nfl.com> Co-authored-by: zhaodongwang-msft <zhaodongwang_msft@outlook.com>
1 parent bec919c commit 2042ad4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/PowerPlatform/Dataverse/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,19 +518,19 @@ def delete_table(self, table_schema_name: str) -> None:
518518
with self._scoped_odata() as od:
519519
od._delete_table(table_schema_name)
520520

521-
def list_tables(self) -> list[str]:
521+
def list_tables(self) -> list[dict[str, Any]]:
522522
"""
523-
List all custom tables in the Dataverse environment.
523+
List all non-private tables in the Dataverse environment.
524524
525-
:return: List of custom table names.
526-
:rtype: :class:`list` of :class:`str`
525+
:return: List of EntityDefinition metadata dictionaries.
526+
:rtype: :class:`list` of :class:`dict`
527527
528528
Example:
529-
List all custom tables::
529+
List all non-private tables and print their logical names::
530530
531531
tables = client.list_tables()
532532
for table in tables:
533-
print(table)
533+
print(table["LogicalName"])
534534
"""
535535
with self._scoped_odata() as od:
536536
return od._list_tables()

0 commit comments

Comments
 (0)