@@ -1634,8 +1634,8 @@ def prep_table(
1634
1634
1635
1635
def check_case_sensitive (
1636
1636
self ,
1637
- name ,
1638
- schema ,
1637
+ name : str ,
1638
+ schema : str | None ,
1639
1639
) -> None :
1640
1640
"""
1641
1641
Checks table name for issues with case-sensitivity.
@@ -1644,10 +1644,10 @@ def check_case_sensitive(
1644
1644
if not name .isdigit () and not name .islower ():
1645
1645
# check for potentially case sensitivity issues (GH7815)
1646
1646
# Only check when name is not a number and name is not lower case
1647
- from sqlalchemy import inspect
1647
+ from sqlalchemy import inspect as sqlalchemy_inspect
1648
1648
1649
1649
with self .connectable .connect () as conn :
1650
- insp = inspect (conn )
1650
+ insp = sqlalchemy_inspect (conn )
1651
1651
table_names = insp .get_table_names (schema = schema or self .meta .schema )
1652
1652
if name not in table_names :
1653
1653
msg = (
@@ -1665,11 +1665,11 @@ def check_case_sensitive(
1665
1665
def to_sql (
1666
1666
self ,
1667
1667
frame ,
1668
- name ,
1668
+ name : str ,
1669
1669
if_exists : str = "fail" ,
1670
1670
index : bool = True ,
1671
1671
index_label = None ,
1672
- schema = None ,
1672
+ schema : str | None = None ,
1673
1673
chunksize = None ,
1674
1674
dtype : DtypeArg | None = None ,
1675
1675
method = None ,
@@ -1756,9 +1756,9 @@ def tables(self):
1756
1756
return self .meta .tables
1757
1757
1758
1758
def has_table (self , name : str , schema : str | None = None ):
1759
- from sqlalchemy import inspect
1759
+ from sqlalchemy import inspect as sqlalchemy_inspect
1760
1760
1761
- insp = inspect (self .connectable )
1761
+ insp = sqlalchemy_inspect (self .connectable )
1762
1762
return insp .has_table (name , schema or self .meta .schema )
1763
1763
1764
1764
def get_table (self , table_name : str , schema : str | None = None ) -> Table :
0 commit comments