Skip to content

refactor(system): add new overridesOnly parameter to…#27

Merged
cesarcoatl merged 2 commits into
8.3from
8.3-refactor/system/tag.getConfiguration
Apr 27, 2026
Merged

refactor(system): add new overridesOnly parameter to…#27
cesarcoatl merged 2 commits into
8.3from
8.3-refactor/system/tag.getConfiguration

Conversation

@cesarcoatl

@cesarcoatl cesarcoatl commented Apr 27, 2026

Copy link
Copy Markdown
Member

system.tag.getConfiguration

Summary by Sourcery

Add support for an overridesOnly flag when retrieving tag configurations.

New Features:

  • Introduce an overridesOnly parameter to system.tag.getConfiguration to optionally return only overridden properties for UDT member tags.

Enhancements:

  • Document the new overridesOnly behavior in the getConfiguration docstring and update type stubs to reflect the new function signature.

@sourcery-ai

sourcery-ai Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds 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 signature

classDiagram
    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
Loading

Class diagram for updated stubs_system_tag_getConfiguration stub

classDiagram
    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
Loading

File-Level Changes

Change Details Files
Extend getConfiguration to support an overridesOnly flag and document its behavior.
  • Add overridesOnly boolean parameter with default False to getConfiguration signature in the runtime implementation
  • Document overridesOnly parameter semantics in the getConfiguration docstring, clarifying its effect on UDT member properties and non-UDT tags
src/system/tag.py
Keep type hints in sync with the updated getConfiguration signature.
  • Update the getConfiguration declaration in the stub file to include the overridesOnly parameter with a default value
stubs/stubs/system/tag.pyi

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 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.
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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/system/tag.py Outdated
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@cesarcoatl cesarcoatl merged commit fd2511d into 8.3 Apr 27, 2026
5 checks passed
@cesarcoatl cesarcoatl deleted the 8.3-refactor/system/tag.getConfiguration branch April 27, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant