Skip to content

Refactor validators #265

Closed
Closed
@sobolevn

Description

@sobolevn

Right now validators are very complicated.
They do a lot of stuff:

  • Type inference
  • Conditional logic
  • etc

Most of the problematic validators return Tuple or Context types.

Validators must do just one thing: validation.
Other steps should be executed on a higher level.

.instance call steps should be:

  1. We infer everything we need: runtime_type, instance_type, etc
  2. We register things we need with mro.metadata
  3. Then we validate everything we need
  4. Error handling / etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions