@@ -579,7 +579,8 @@ def _clean_options(self, options, engine):
579579
580580 # type conversion-related
581581 if converters is not None :
582- assert (isinstance (converters , dict ))
582+ if not (isinstance (converters , dict )):
583+ raise AssertionError ()
583584 else :
584585 converters = {}
585586
@@ -1474,7 +1475,8 @@ def _rows_to_cols(self, content):
14741475 if self ._implicit_index :
14751476 col_len += len (self .index_col )
14761477
1477- assert (self .skip_footer >= 0 )
1478+ if not ((self .skip_footer >= 0 )):
1479+ raise AssertionError ()
14781480
14791481 if col_len != zip_len and self .index_col is not False :
14801482 row_num = - 1
@@ -1768,12 +1770,15 @@ def __init__(self, f, colspecs, filler, thousands=None):
17681770 self .filler = filler # Empty characters between fields.
17691771 self .thousands = thousands
17701772
1771- assert isinstance (colspecs , (tuple , list ))
1773+ if not ( isinstance (colspecs , (tuple , list ))):
1774+ raise AssertionError ()
1775+
17721776 for colspec in colspecs :
1773- assert isinstance (colspec , (tuple , list ))
1774- assert len (colspec ) == 2
1775- assert isinstance (colspec [0 ], int )
1776- assert isinstance (colspec [1 ], int )
1777+ if not ( isinstance (colspec , (tuple , list )) and
1778+ len (colspec ) == 2 and
1779+ isinstance (colspec [0 ], int ) and
1780+ isinstance (colspec [1 ], int ) ):
1781+ raise AssertionError ()
17771782
17781783 def next (self ):
17791784 line = next (self .f )
0 commit comments