-
Notifications
You must be signed in to change notification settings - Fork 71
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 of cpg-language-python #1282
Conversation
I did a first cleanup pass on this. I removed everything which was breaking things in other language frontends. I also added initial type parsing and some type inference work, which we sill can improve later on, but it works for the tests. |
…ontends/python/PythonValueEvaluator.java
This PR implements the `ScopeProvider` interface in the `Pass` class. This should now enable passes to use the information in the stored `scopeManager` when creating new nodes with the node builder.
All python classes are no prefixed with AST. All abstract classes are prefixed with ASTBASE.
SonarCloud Quality Gate failed.
|
This PR aims at minimizing Python code in favor of Kotlin code in our CPG. This will benefit the overall experience as
This goal is achieved in a similar manner as with the other frontends (i.e. cpg-language-go). We will still use Python's
ast
module to parse Python code but then map all Python objects to a Kotlin interface. All logic will be implemented in Kotlin.Open todos:
PythonLanguageFrontend
functions (getCode()
, ...) -> need to store the file name somewherepycodestyle
references (github runner, ...)