Skip to content

Commit

Permalink
PEP8: fix sql.py and test_sql.py
Browse files Browse the repository at this point in the history
Master is failing due to my PR
pandas-dev#12205    Strange that it did not
fail on travis before merging ?

Author: Joris Van den Bossche <[email protected]>

Closes pandas-dev#12263 from jorisvandenbossche/fix-sql-pep8 and squashes the following commits:

f2c1606 [Joris Van den Bossche] PEP8: fix sql.py and test_sql.py
  • Loading branch information
jorisvandenbossche authored and cldy committed Feb 11, 2016
1 parent 77b3a4e commit 73c6447
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions pandas/io/tests/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 73c6447

Please sign in to comment.