Commit 6f6dc913 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Simplify code

parent 42a5b41a
......@@ -108,15 +108,12 @@ def validate(source, schema, **options):
]
# Dynamically add custom check based on schema needs
custom_checks_config = schema.get("custom_checks")
if custom_checks_config:
# extra_checks = []
for cc_conf in custom_checks_config:
cc_name = cc_conf["name"]
if cc_name in available_checks:
cc_class = available_checks[cc_name]
cc_descriptor = cc_conf["params"]
extra_checks.append(cc_class(cc_descriptor))
for cc_conf in schema.get("custom_checks", []):
cc_name = cc_conf["name"]
if cc_name in available_checks:
cc_class = available_checks[cc_name]
cc_descriptor = cc_conf["params"]
extra_checks.append(cc_class(cc_descriptor))
# Merge options to pass to frictionless
validate_options = {
......
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