Fix #4225: Dynamically generate manifest extensions from package handlers#4857
Open
HasTheDev wants to merge 2 commits intoaboutcode-org:developfrom
Open
Fix #4225: Dynamically generate manifest extensions from package handlers#4857HasTheDev wants to merge 2 commits intoaboutcode-org:developfrom
HasTheDev wants to merge 2 commits intoaboutcode-org:developfrom
Conversation
Signed-off-by: HasTheDev <hassanazam2021@gmail.com>
3c8e1a2 to
7a79419
Compare
…age handlers Signed-off-by: HasTheDev <122232470+HasTheDev@users.noreply.github.com>
7a79419 to
5b358b7
Compare
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.
Fixes #4225
Replaces the hardcoded
_MANIFEST_ENDSlist insrc/summarycode/classify.pywith a dynamically generated set of manifest file extensions fromAPPLICATION_PACKAGE_DATAFILE_HANDLERS.Key Updates:
Created
get_dynamic_manifest_ends()to safely extractpath_patternsfrom registered package handlers.Placed the import of
APPLICATION_PACKAGE_DATAFILE_HANDLERSlocally inside the function and moved the assignment to the bottom of the file to prevent the circular import issue.Added a fallback to seed the dynamic set with the legacy hardcoded list to ensure 100% backwards compatibility with outdated test suite files (like
elm-package.json,project.clj, andmetadata).All
test_classify.pytests passing locally.Tasks
Reviewed contribution guidelines
PR is descriptively titled 📑 and links the original issue above 🔗
Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
Run tests locally to check for errors.
Commits are in uniquely-named feature branch and has no merge conflicts 📁
Updated documentation pages (if applicable)
Updated CHANGELOG.rst (if applicable)
Signed-off-by: HasTheDev 122232470+HasTheDev@users.noreply.github.com