From fe201a2663a89913ac9b024b3864a53836a49d36 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 8 Feb 2016 22:13:35 +0100 Subject: [PATCH] PEP8: fix sql.py and test_sql.py Master is failing due to my PR https://github.com/pydata/pandas/pull/12205 Strange that it did not fail on travis before merging ? Author: Joris Van den Bossche Closes #12263 from jorisvandenbossche/fix-sql-pep8 and squashes the following commits: f2c1606 [Joris Van den Bossche] PEP8: fix sql.py and test_sql.py --- pandas/io/sql.py | 1 - pandas/io/tests/test_sql.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pandas/io/sql.py b/pandas/io/sql.py index 072ca86600ea0..c29286016a34f 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -21,7 +21,6 @@ from pandas.core.base import PandasObject from pandas.core.dtypes import DatetimeTZDtype from pandas.tseries.tools import to_datetime -from pandas.util.decorators import Appender from contextlib import contextmanager diff --git a/pandas/io/tests/test_sql.py b/pandas/io/tests/test_sql.py index a5f6acc113466..c2d6f5af48388 100644 --- a/pandas/io/tests/test_sql.py +++ b/pandas/io/tests/test_sql.py @@ -2324,7 +2324,7 @@ def _check_roundtrip(self, frame): frame2['Idx'] = Index(lrange(len(frame2))) + 10 sql.to_sql(frame2, name='test_table2', con=self.conn, index=False) result = sql.read_sql("select * from test_table2", self.conn, - index_col='Idx') + index_col='Idx') expected = frame.copy() expected.index = Index(lrange(len(frame2))) + 10 expected.index.name = 'Idx' @@ -2672,7 +2672,7 @@ def _check_roundtrip(self, frame): sql.to_sql(frame2, name='test_table2', con=self.conn, flavor='mysql', index=False) result = sql.read_sql("select * from test_table2", self.conn, - index_col='Idx') + index_col='Idx') expected = frame.copy() # HACK! Change this once indexes are handled properly. @@ -2738,7 +2738,7 @@ def test_keyword_as_column_names(self): _skip_if_no_pymysql() df = DataFrame({'From': np.ones(5)}) sql.to_sql(df, con=self.conn, name='testkeywords', - if_exists='replace', flavor='mysql', index=False) + if_exists='replace', flavor='mysql', index=False) def test_if_exists(self): _skip_if_no_pymysql()