Fix Python ecosystem PyPI-to-import name mismatch and code review follow-ups#243
Open
tmihalac wants to merge 3 commits into
Open
Fix Python ecosystem PyPI-to-import name mismatch and code review follow-ups#243tmihalac wants to merge 3 commits into
tmihalac wants to merge 3 commits into
Conversation
…low-ups
Python name normalization:
- Add _resolve_tree_key in CCA to fall back to is_same_package for tree
lookups
- Re-key dep tree from PyPI names to import names via
_find_module_dirs/top_level.txt
- Add PEP 503 is_same_package override in PythonLanguageFunctionsParser
- Wire dependency builder into parser via lang_functions_parsers_factory
- Use parser is_same_package in FL _is_package_available instead of inline
lambda
- Use PEP 503 re.sub(r'[-_.]', '-') for root dep matching instead of
replace('-', '_')
- Replace pip install with uv pip install for deptree setup
CCA query parsing:
- Fix dotted function name splitting with rpartition instead of split
- Fix __determine_doc_package_name to use _resolve_tree_key with fallback
JavaScript parser:
- Guard is_function check before get_function_name in
search_for_called_function
Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
Author
|
/test vulnerability-analysis-on-pr |
Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python name normalization:
CCA query parsing:
JavaScript parser: