Skip to content

Commit

Permalink
TYP: check_untyped_defs pandas/io/sql.py (#30661)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins authored and WillAyd committed Jan 4, 2020
1 parent 984a2ca commit bd15c59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,8 @@ def read(self, coerce_float=True, parse_dates=None, columns=None, chunksize=None

cols = [self.table.c[n] for n in columns]
if self.index is not None:
[cols.insert(0, self.table.c[idx]) for idx in self.index[::-1]]
for idx in self.index[::-1]:
cols.insert(0, self.table.c[idx])
sql_select = select(cols)
else:
sql_select = self.table.select()
Expand Down Expand Up @@ -1447,7 +1448,8 @@ def insert_statement(self):
escape = _get_valid_sqlite_name

if self.index is not None:
[names.insert(0, idx) for idx in self.index[::-1]]
for idx in self.index[::-1]:
names.insert(0, idx)

bracketed_names = [escape(column) for column in names]
col_names = ",".join(bracketed_names)
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,6 @@ check_untyped_defs=False
[mypy-pandas.io.sas.sasreader]
check_untyped_defs=False

[mypy-pandas.io.sql]
check_untyped_defs=False

[mypy-pandas.io.stata]
check_untyped_defs=False

Expand Down

0 comments on commit bd15c59

Please sign in to comment.