Skip to content

Commit 2472853

Browse files
committed
fix: improve __dir__ method to return sorted unique attributes
1 parent 3487ef3 commit 2472853

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/datafusion/table_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __getattr__(self, name: str) -> Any:
8888

8989
def __dir__(self) -> list[str]:
9090
"""Expose delegated attributes via :func:`dir`."""
91-
return dir(self._table_provider) + super().__dir__()
91+
return sorted(set(super().__dir__()) | set(dir(self._table_provider)))
9292

9393
def __repr__(self) -> str: # pragma: no cover - simple delegation
9494
"""Return a representation of the wrapped provider."""

0 commit comments

Comments
 (0)