Repository navigation
Consolidate path-get engine; flatten_store alias (#69) - #133
Merged
Merged
Conversation
…as (#69) path_get, add_path_get/add_path_access and the legacy _path_get alias now share dol._paths_core.path_get_core. _path_get kept as alias. flatten_store added as the unambiguous name for trans.flatten (vs paths.flatten_dict); chain_get documented as a different operation. Behaviour-preserving. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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.
Closes #69
What
dol._paths_core.path_get_core(the formerpaths._path_getloop).path_get,add_path_getand the legacy (non-create_missing) set/del walks inadd_path_accessnow all delegate to it.paths._path_getstays as an alias;paths.raise_on_erroris re-exported from the core (same object).path_setwas already consolidated in_paths_core(Enabling (optional)KeyPathability to write when path doesn't already exist #16/Refactor: split oversized modules + dedup triplicated helpers #70); nothing to do.chain_getis not a path walk (first-existing-key lookup), so it is not routed; its docstring now says so and points topath_get.dol.flatten_storeadded as the unambiguous name fortrans.flatten(flattenkept, no warning, to not disturb ~86 dependents);flatten_dict/flattendocstrings cross-reference each other.flatten_dictandleaf_pathskeep their separate recursions: they differ invisit_nested(Mappingvsdict), so merging would change behaviour.Tests / gate
pytest(incl. doctests): 698 passed, 3 skipped; new testtest_one_path_get_engine.priv test-dependents dol --transitive: 133 suites, 88 pass, 32 fail, 1 no-tests on this branch; the identical set of 33 non-passing suites onmaster(environmental/pre-existing, e.g. missingpipdeptree).Adversarial review (fresh Opus agent): verdict SAFE. A 45-case old-vs-new probe (add_path_get reads, legacy set/del, path_get on_error variants,
_path_get, flatten, KeyPath) was identical;_paths_coreis still stdlib-only; no fleet package imports the moved names. Cosmetic only:inspectmetadata (__module__, annotation) of the private_path_get/raise_on_errorchanged.🤖 Generated with Claude Code