Skip to content

Error explainer #147

@LightAndLight

Description

@LightAndLight

Currently if you validate python code then you just get a list of errors. It would be good to be able to translate that list into a human readable representation. The output would give a succinct explanation of the error, and use the original source file + the annotations in the error to pull out relevant areas of the code so we can pinpoint the bits that caused the error.

For example, if we validate this code:

def a():
    x = 1
    y = x + b
    return y

we could get an error message like:

Line 3: 'b' is not in scope
2 |     x = 1
3 |     y = x + b
                ^
4 |     return y

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions