-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Python AST] AST Viewer shows [Str] but no such type exists #9833
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
Comments
What is the code snippet that produces this AST? |
Hi @aeisenberg, class A:
NAME = "A" I created the database with |
Thanks. I am asking our python team for a detailed answer. |
Thank you for your question. In this case, Unfortunately, because In the short term, we'll probably just override the |
This makes total sense to me, and if you'd like I can open a PR that does it. |
I mean, I certainly won't prevent you from doing that, but I think you'll find it's going to be quite a lot of hassle to update all of the tests that currently say I'm wondering if a less painful solution would be to add a That way, a user of the AST viewer would at least have a fighting chance of finding the right class to look at. I'll make a PR for this. |
Description of the issue
I expect the type names present on the AST viewer to match a real CodeQL type, but this is not the case here.
The type could be either Str_ or StrConst, both printing "Str" as their toString().
The Str_ class also mentions the Str class which I cannot find:
codeql/python/ql/lib/semmle/python/AstGenerated.qll
Line 1240 in d50816a
The text was updated successfully, but these errors were encountered: