Skip to content

Conversation

@ventusfortis
Copy link
Contributor

@ventusfortis ventusfortis commented Dec 24, 2025

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

@ventusfortis ventusfortis changed the title Enrich Python import nodes with location metadata and exact code in the code property (#5651) [pysrc2cpg] Enrich Python import nodes with location metadata and exact code in the code property (#5651) Dec 24, 2025
@ventusfortis ventusfortis requested a review from maltek January 15, 2026 15:13
Copy link
Contributor

@maltek maltek left a 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.

@ventusfortis ventusfortis requested a review from maltek January 15, 2026 16:28
@ventusfortis
Copy link
Contributor Author

ventusfortis commented Jan 19, 2026

Test are failing, but the failed tests don't seem to be affected by changes in my commits =/ Correct me if I'm wrong

@maltek
Copy link
Contributor

maltek commented Jan 19, 2026

the failing tests are

[error] 	io.joern.pysrc2cpg.dataflow.RegexDefinedFlowsDataFlowTests
[error] 	io.joern.pysrc2cpg.passes.TypeRecoveryPassTests

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants