From d653a071460e120e87b101d7f1748d74f1e3f93f Mon Sep 17 00:00:00 2001 From: kaesuarez Date: Fri, 20 Jan 2023 09:55:14 -0700 Subject: [PATCH] feat(polars): allow ibis.polars.connect() to function without any arguments --- ibis/backends/polars/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ibis/backends/polars/__init__.py b/ibis/backends/polars/__init__.py index 0406faed0dfd..211a4042cf3a 100644 --- a/ibis/backends/polars/__init__.py +++ b/ibis/backends/polars/__init__.py @@ -34,7 +34,9 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._tables = dict() - def do_connect(self, tables: MutableMapping[str, pl.LazyFrame]) -> None: + def do_connect( + self, tables: MutableMapping[str, pl.LazyFrame] | None = None + ) -> None: """Construct a client from a dictionary of `polars.LazyFrame`s. Parameters @@ -42,6 +44,8 @@ def do_connect(self, tables: MutableMapping[str, pl.LazyFrame]) -> None: tables Mutable mapping of string table names to polars LazyFrames. """ + if not tables: + tables = {} self._tables.update(tables) @property