@@ -86,7 +86,13 @@ def version(self) -> str:
86
86
def list_tables (self , like = None , database = None ):
87
87
return self ._filter_with_like (list (self ._tables .keys ()), like )
88
88
89
- def table (self , name : str ) -> ir .Table :
89
+ def table (self , name : str , database : None = None ) -> ir .Table :
90
+ if database is not None :
91
+ raise com .IbisError (
92
+ "Passing `database` to the Polars backend's `table()` method is not "
93
+ "supported: Polars cannot set a database."
94
+ )
95
+
90
96
table = self ._tables .get (name )
91
97
if table is None :
92
98
raise com .TableNotFound (name )
@@ -390,19 +396,20 @@ def create_table(
390
396
) -> ir .Table :
391
397
if database is not None :
392
398
raise com .IbisError (
393
- "Passing `database` to the Polars backend create_table method has no "
394
- "effect : Polars cannot set a database."
399
+ "Passing `database` to the Polars backend's ` create_table()` method is "
400
+ "not supported : Polars cannot set a database."
395
401
)
396
402
397
403
if temp is False :
398
404
raise com .IbisError (
399
- "Passing `temp=False` to the Polars backend create_table method is not "
400
- "supported: all tables are in memory and temporary."
405
+ "Passing `temp=False` to the Polars backend's ` create_table()` method "
406
+ "is not supported: all tables are in memory and temporary."
401
407
)
402
408
403
409
if not overwrite and name in self ._tables :
404
410
raise com .IntegrityError (
405
- f"Table { name } already exists. Use overwrite=True to clobber existing tables"
411
+ f"Table { name !r} already exists. Use `overwrite=True` to clobber "
412
+ "existing tables."
406
413
)
407
414
408
415
if schema is not None and obj is None :
0 commit comments