Fix: Handle override_keys and ignore_keys in requirements #67
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.
Summary
Fixes
process_line()to correctly handleoverride_keysandignore_keysfor both requirements and constraints files.Problem
Previously,
override_keysandignore_keysonly worked for constraints files (variety="c"). When processing requirements files (variety="r"), these settings were ignored.This broke the expected behavior where packages in
override_keysandignore_keysshould be commented out regardless of file type.Solution
variety == "c"condition from override_keys and ignore_keys checks"-> mxdev disabled (version override)""-> mxdev disabled (override)""-> mxdev disabled (ignore)"Changes
src/mxdev/processing.py:process_line()functiontest_process_line_package_in_override_keys- tests requirements with override_keystest_process_line_package_in_ignore_keys- tests requirements with ignore_keysCHANGES.mdTesting
✅ All 176 tests pass (174 previously + 2 new)
Related
This fix is needed to unblock PR #66 which was failing these tests.