Skip to content

Commit

Permalink
refactor(internals): don't cache table accessor to avoid a circular r…
Browse files Browse the repository at this point in the history
…eference
  • Loading branch information
cpcloud authored and jcrist committed Aug 26, 2024
1 parent 0268044 commit fb604a5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ibis/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ class TablesAccessor(collections.abc.Mapping):
>>> con = ibis.sqlite.connect("example.db")
>>> people = con.tables["people"] # access via index
>>> people = con.tables.people # access via attribute
"""

def __init__(self, backend: BaseBackend):
def __init__(self, backend: BaseBackend) -> None:
self._backend = backend

def __getitem__(self, name) -> ir.Table:
Expand Down Expand Up @@ -1005,7 +1004,7 @@ def table(
"""

@functools.cached_property
@property
def tables(self):
"""An accessor for tables in the database.
Expand Down

0 comments on commit fb604a5

Please sign in to comment.