Skip to content

Warn on complex natural language doctypes #36

@lagru

Description

@lagru

The current grammar allows nesting of natural language constructs such as tuple of ..., (N, 3) array, dict of {...: ...}. This can quickly lead to doctypes that are actually more confusing to read. I currently see two solutions to this:

  • Disallow in grammar I could rewrite the grammar in a way that only allows natural language constructs in simple contexts and without nesting. However, this requires a more complex grammar and some duplication.

  • Warn I'd prefer to find a solution that warns users that they might want to improve the readability of the expression. Maybe that can be integrated with DoctypeTransformer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions