refactor(system): add new overridesOnly parameter to…#27
Merged
Conversation
system.tag.getConfiguration
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds an overridesOnly parameter to system.tag.getConfiguration and updates the type stubs to match, enabling callers to request only overridden UDT member properties while preserving backward compatibility. Class diagram for updated system_tag_getConfiguration function signatureclassDiagram
class system_tag {
+exportTags(basePath, exportType) List~Dict~
+getConfiguration(basePath, recursive, overridesOnly) List~Dict~
+importTags(filePath)
}
class getConfiguration_details {
+basePath Union_str_unicode
+recursive bool
+overridesOnly bool
+return List_Dict_Union_str_unicode_Any
}
system_tag ..> getConfiguration_details : uses
Class diagram for updated stubs_system_tag_getConfiguration stubclassDiagram
class stubs_system_tag_pyi {
+getConfiguration(basePath, recursive, overridesOnly) List~Dict~
}
class getConfiguration_stub_details {
+basePath Union_str_unicode
+recursive bool
+overridesOnly bool
+return List_Dict_Union_str_unicode_Any
}
stubs_system_tag_pyi ..> getConfiguration_stub_details : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- There is a spelling error in the docstring for
overridesOnly("overriden" → "overridden"). - Since
overridesOnlyis ignored for non-UDT members, consider briefly clarifying in the docstring whether the returned configuration for those tags is identical to theoverridesOnly=Falsecase to avoid ambiguity for callers.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- There is a spelling error in the docstring for `overridesOnly` ("overriden" → "overridden").
- Since `overridesOnly` is ignored for non-UDT members, consider briefly clarifying in the docstring whether the returned configuration for those tags is identical to the `overridesOnly=False` case to avoid ambiguity for callers.
## Individual Comments
### Comment 1
<location path="src/system/tag.py" line_range="229" />
<code_context>
will be retrieved. Note that this will only check one level
under the base path. True recursion would require multiple
uses of this function at different paths. Optional.
+ overridesOnly: If True, only overriden properties from UDT
+ members will be returned. If the tag is not a UDT member,
+ this parameter is ignored. Optional.
</code_context>
<issue_to_address>
**nitpick (typo):** Fix minor spelling error in the new parameter description.
"overriden" should be spelled "overridden" in `only overridden properties from UDT` to use the correct standard spelling.
```suggestion
overridesOnly: If True, only overridden properties from UDT
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.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.
system.tag.getConfiguration
Summary by Sourcery
Add support for an overridesOnly flag when retrieving tag configurations.
New Features:
Enhancements: