-
Notifications
You must be signed in to change notification settings - Fork 381
[pysrc2cpg] Enrich Python import nodes with location metadata and exact code in the code property (#5651) #5730
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
base: master
Are you sure you want to change the base?
Conversation
…he code property + add tests (joernio#5651)
...i/frontends/x2cpg/src/main/scala/io/joern/x2cpg/frontendspecific/pysrc2cpg/ImportsPass.scala
Outdated
Show resolved
Hide resolved
...i/frontends/x2cpg/src/main/scala/io/joern/x2cpg/frontendspecific/pysrc2cpg/ImportsPass.scala
Outdated
Show resolved
Hide resolved
…t/dataflow expectations for exact code strings
maltek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! We're almost there.
To get past the code style checker, run sbt scalafmtAll and commit the changed code.
joern-cli/frontends/x2cpg/src/main/scala/io/joern/x2cpg/passes/frontend/XImportsPass.scala
Outdated
Show resolved
Hide resolved
|
Test are failing, but the failed tests don't seem to be affected by changes in my commits =/ Correct me if I'm wrong |
|
the failing tests are Given that this PR touches the representation of imports in Python, it seems likely to me that your change is responsible. Unfortunately, I'm not familiar with how the python type recovery works either. I suspect there is some code there that's looking at the code field that you've changed. |
This commit adds a runOnPart method for python imports, which enriches import nodes with missing data about location (#5651 and also fixes the code property to be exact in output