Skip to content

Commit 113bb15

Browse files
committed
fix: client.list_tables return type inconsistent with type hint & docstring
1 parent c1ce5f0 commit 113bb15

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/PowerPlatform/Dataverse/client.py

Lines changed: 8 additions & 8 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
531-
tables = client.list_tables()
532-
for table in tables:
533-
print(table)
531+
tables = client.list_tables()
532+
for table in tables:
533+
print(table["LogicalName"])
534534
"""
535535
with self._scoped_odata() as od:
536536
return od._list_tables()

0 commit comments

Comments
 (0)