Skip to content

Conversation

@cesarcoatl
Copy link
Member

@cesarcoatl cesarcoatl commented Sep 4, 2025

BREAKING CHANGE: The Param class has been renamed to _Param and is now private.

Summary by Sourcery

Enhancements:

  • Rename public Param class to internal _Param and remove the public Param definition

BREAKING CHANGE: The Param class has been renamed to _Param and is now private.
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 4, 2025

Reviewer's Guide

The public Param class was refactored into a private _Param base class, and the InParam/OutParam classes were updated to derive from _Param with exports adjusted accordingly.

File-Level Changes

Change Details Files
Param class is renamed to a private _Param and its original definition is removed
  • Renamed Param class to _Param
  • Removed original Param class definition block
  • Added _Param class implementation at top
incendium/src/incendium/db.py
InParam and OutParam now inherit from the new _Param base class
  • Updated InParam to subclass _Param instead of Param
  • Updated OutParam to subclass _Param instead of Param
incendium/src/incendium/db.py
Public API exports updated to hide Param
  • Removed Param from all exports
  • Added underscore prefix to class name to indicate privacy
incendium/src/incendium/db.py

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

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `incendium/src/incendium/db.py:44` </location>
<code_context>
+            type_code: Type code constant.
+            value: Value of type type_code.
+        """
+        super(_Param, self).__init__()
+        self._name_or_index = name_or_index
+        self._type_code = type_code
</code_context>

<issue_to_address>
The call to super().__init__() may be unnecessary if object is the only base.

You can remove the super().__init__() call here, as it has no effect unless you plan to support multiple inheritance in the future.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
        super(_Param, self).__init__()
        self._name_or_index = name_or_index
        self._type_code = type_code
        self._value = value
=======
        self._name_or_index = name_or_index
        self._type_code = type_code
        self._value = value
>>>>>>> REPLACE

</suggested_fix>

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 on lines +44 to +47
super(_Param, self).__init__()
self._name_or_index = name_or_index
self._type_code = type_code
self._value = value
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: The call to super().init() may be unnecessary if object is the only base.

You can remove the super().init() call here, as it has no effect unless you plan to support multiple inheritance in the future.

Suggested change
super(_Param, self).__init__()
self._name_or_index = name_or_index
self._type_code = type_code
self._value = value
self._name_or_index = name_or_index
self._type_code = type_code
self._value = value

@cesarcoatl cesarcoatl merged commit 007fec3 into main Sep 4, 2025
8 checks passed
@cesarcoatl cesarcoatl deleted the refactor/db/_Param branch September 4, 2025 20:07
cesarcoatl added a commit that referenced this pull request Sep 4, 2025
stubs now also include `db._Param` from #272

Co-authored-by: lokomoti <40903296+lokomoti@users.noreply.github.com>
Co-authored-by: César Román <cesar@coatl.dev>
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.

2 participants