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

requires_ast decorator for SCTs, as in protowhat #240

Open
machow opened this issue Dec 28, 2017 · 0 comments
Open

requires_ast decorator for SCTs, as in protowhat #240

machow opened this issue Dec 28, 2017 · 0 comments

Comments

@machow
Copy link
Contributor

machow commented Dec 28, 2017

with the addition of check_file, pythonwhat can create a state for a file that is not python code. In this case, the ast tree (state.student_tree) will be None. if someone tries to use check_node etc.. it will fail the SCT.

However, we either want to...

  • skip these SCTs when the ast is None (as in protowhat). This would allow for custom ast parsers depending on file type, and for them to fail gracefully
  • to throw an error for developers, saying they can't use these SCTs without an AST.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants