Skip to content

Conversation

@shivasurya
Copy link
Owner

Added Python parsing capabilities alongside existing Java support using tree-sitter-python. The parser now extracts classes, functions, variables, and control flow structures from .py files with full statement support (return, break, continue, assert, yield).

Changes:

  • Created Python statement parsers with comprehensive test coverage
  • Updated construct.go to handle both Java and Python files
  • Parser auto-detects language by file extension
  • All tests passing (100% success rate)

Files Changed:

  • graph/python/parse_statement.go (new)
  • graph/python/parse_statement_test.go (new)
  • graph/construct.go (modified - 389 lines changed)
  • go.mod (added tree-sitter-python dependency)

@shivasurya shivasurya added enhancement New feature or request go Pull requests that update go code labels Oct 22, 2025
@shivasurya shivasurya self-assigned this Oct 22, 2025
@safedep
Copy link

safedep bot commented Oct 22, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

Package Details
Package Malware Vulnerability Risky License Report

This report is generated by SafeDep Github App

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 94.20677% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.07%. Comparing base (bd2a5ab) to head (b96a9db).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
sourcecode-parser/graph/parser_java.go 90.76% 27 Missing and 2 partials ⚠️
sourcecode-parser/graph/parser_statements.go 90.40% 17 Missing and 2 partials ⚠️
sourcecode-parser/graph/initialize.go 91.50% 7 Missing and 2 partials ⚠️
sourcecode-parser/graph/utils.go 97.15% 4 Missing and 1 partial ⚠️
sourcecode-parser/graph/parser.go 95.77% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #314      +/-   ##
==========================================
+ Coverage   72.30%   74.07%   +1.77%     
==========================================
  Files          16       22       +6     
  Lines        2473     2550      +77     
==========================================
+ Hits         1788     1889     +101     
+ Misses        641      622      -19     
+ Partials       44       39       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shivasurya shivasurya merged commit 001ab24 into main Oct 22, 2025
5 checks passed
@shivasurya shivasurya deleted the shiva/python branch October 22, 2025 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants