def __init__(self, force={}, locale='en_US'): self._force = force # In order of preference self._possible_types = [ Boolean(), Number(locale=locale), TimeDelta(), DateTime(), Date(), Text() ]
def __init__(self, force={}, limit=None, types=None): self._force = force self._limit = limit if types: self._possible_types = types else: # In order of preference self._possible_types = [ Boolean(), Number(), TimeDelta(), Date(), DateTime(), Text() ]
def agate_tester(): # Override the original list of type checkers present in agate # to detect types. # # Original list here: # https://github.com/wireservice/agate/blob/e3078dca8b3566e8408e65981f79918c2f36f9fe/agate/type_tester.py#L64-L71 return TypeTester( types=[ Boolean(), SirenSiret(), Number(), Time(), TimeDelta(), Date(), DateTime(), Text(), ] )
def __init__(self, force={}, limit=None, types=None, null_values=DEFAULT_NULL_VALUES): self._force = force self._limit = limit if types: self._possible_types = types else: # In order of preference self._possible_types = [ Boolean(null_values=null_values), Number(null_values=null_values), TimeDelta(null_values=null_values), Date(null_values=null_values), DateTime(null_values=null_values), Text(null_values=null_values) ]