Repository navigation
Extract InheritanceRef value object from InheritanceLoader.get_source - #56
Merged
Merged
Conversation
Code review of the prior commit found that ref.next().format() rewrote
the extends tag using the loader's map key instead of the text actually
captured from the {% extends %} tag, diverging from pre-refactor
behavior whenever they don't match. Also drops the now-unused
InheritanceRef.next(), since name always comes from the captured text.
Refs #47
Contributor
|
Contributor
|
Version hint: patch Comment ID: Display version hint-auto-generated |
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.
Summary
"N/name"string parsing/rewriting inInheritanceLoader.get_sourceinto a smallInheritanceRefvalue object (parse/format), per the coupling cleanup filed in InheritanceLoader/InheritanceMap: private numeric-prefix protocol split across two files #47.extendstags now reuse the text actually captured from the{% extends %}tag rather than the loader's map key, preserving exact pre-refactor output even when the two differ (caught in code review of the first pass).Test plan
uv run pytest— 342 passed (pre-existing, unrelatedtest_git_commands.pyerrors only, reproduced identically onmaster)InheritanceRef.parse/formatruff check/ruff format --checkclean on changed filesmypyclean on changed file (one pre-existing, unrelatedSuperUndefined.__call__note untouched by this diff)Refs #47