Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor underlying data structure of assertions AST from string to something more flexible #12499

Open
farbodahm opened this issue Jun 20, 2024 · 0 comments
Labels
topic: reporting related to terminal output and user-facing messages and errors topic: rewrite related to the assertion rewrite mechanism type: enhancement new feature or API change, should be merged into features branch

Comments

@farbodahm
Copy link
Contributor

What's the problem this feature will solve?

The current data structure for assertion AST, which contains assertion explanations, is a large chunk of string generated in rewrite.py. This string is then passed to format_explanation for further formatting.

Describe the solution you'd like

Implement a more flexible data structure (such as a tree) to construct the assertion explanations. This structure can then provide the string representation when needed, allowing for greater flexibility and potential improvements in how explanations are handled and formatted.

Alternative Solutions

Additional context

@Zac-HD Zac-HD added type: enhancement new feature or API change, should be merged into features branch topic: reporting related to terminal output and user-facing messages and errors topic: rewrite related to the assertion rewrite mechanism labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: reporting related to terminal output and user-facing messages and errors topic: rewrite related to the assertion rewrite mechanism type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

2 participants