Commit bb1009b4 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Merge branch 'inspector-init-options' into 'master'

Pass options to Inspector's init

See merge request validata/validata-core!10
parents c8d69513 2ae924e8
Pipeline #1947 passed with stage
in 2 minutes and 10 seconds
......@@ -355,11 +355,21 @@ def validate(source, schema, with_repair=True, **options):
if custom_checks_config:
for custom_check_conf in custom_checks_config:
checks.append({custom_check_conf['name']: custom_check_conf['params']})
inspector = goodtables.Inspector(
skip_checks=['non-matching-header', 'extra-header', 'missing-header'],
inspector_options_keys = [
'checks', 'skip_checks', 'infer_schema',
'infer_fields', 'order_fields', 'error_limit',
'table_limit', 'row_limit',
inspector_options = {
'checks': checks,
'skip_checks': ['non-matching-header', 'extra-header', 'missing-header'],
'row_limit': VALIDATA_MAX_ROWS,
**{k: v for k, v in options.items() if k in inspector_options_keys}
inspector = goodtables.Inspector(**inspector_options)
options = {**base_options}
if with_repair:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment