best-doctor / import_me

Python library to simplify importing data from xls/xlsx
MIT License
11 stars 12 forks source link

Feature request: strip whitespaces in BaseProcessor #34

Open LerikP opened 4 years ago

LerikP commented 4 years ago

Proposition: I propose to strip whitespaces in BaseProcessor and assume whitespaced values as None.

Reason: Cells with whitespaces in large files are hard to find for users and displayed error is not clear to them.

Expected behavior:

def test_integer_processor_with_whitespace():
    processor = IntegerProcessor()

    assert processor(' ') is None

Current result:

import_me.exceptions.ColumnError:   is not an integer.