Skip to content

Commit

Permalink
Remove unused exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
James McKinney committed Jan 30, 2016
1 parent 0a51d12 commit fe2b092
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
19 changes: 0 additions & 19 deletions csvkit/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ def length(self):
return len(self.row)


class CSVJSONException(CustomException):
"""
Exception raised when there is a problem converting data to CSV.
"""
pass


class InvalidValueForTypeException(CustomException):
"""
Exception raised when a value can not be normalized to a specified type.
Expand All @@ -69,18 +62,6 @@ def __init__(self, index, value, normal_type):
super(InvalidValueForTypeException, self).__init__(msg)


class InvalidValueForTypeListException(CustomException):
"""
Exception raised when one or more InvalidValueForTypeException
has been raised while accumulating errors.
"""

def __init__(self, errors):
self.errors = errors
msg = 'Encountered errors converting values in %i columns' % len(errors)
super(InvalidValueForTypeListException, self).__init__(msg)


class RequiredHeaderError(CustomException):
"""
Exception raised when an operation requires a CSV file to have a header row.
Expand Down
2 changes: 1 addition & 1 deletion csvkit/typeinference.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dateutil.parser import parse
import six

from csvkit.exceptions import InvalidValueForTypeException, InvalidValueForTypeListException
from csvkit.exceptions import InvalidValueForTypeException

NoneType = type(None)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_typeinference.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from csvkit import typeinference

from csvkit.exceptions import InvalidValueForTypeException, InvalidValueForTypeListException
from csvkit.exceptions import InvalidValueForTypeException

NoneType = type(None)

Expand Down

0 comments on commit fe2b092

Please sign in to comment.