Skip to content

Is best_match() well defined? #91

@Julian

Description

@Julian

Given an iterable of errors, can we define a useful best_match function that returns the best match of the given errors (i.e. the error that seems to most reasonably represent the validation failure?)

Rough idea:

  • Weigh how deep path and schema_path go into the instance / schema.
  • Use __lt__ on _Error ( 🎀 ) and return max(errors). Why? Because we can.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementSome new desired functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions