Skip to content

bq27441: remove redundant try/except in current_average()#24

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/sub-pr-22-again
Closed

bq27441: remove redundant try/except in current_average()#24
Copilot wants to merge 3 commits intomainfrom
copilot/sub-pr-22-again

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 11, 2026

current_average() wrapped its call in a try/except Exception: raise block — catching only to re-raise, which is a no-op.

Change

Replaced with a direct return, consistent with all other methods in the same class:

# Before
def current_average(self):
    """Return average current"""
    try:
        result = self.current(CurrentMeasureType.AVG)
        return result
    except Exception:
        raise

# After
def current_average(self):
    """Return average current"""
    return self.current(CurrentMeasureType.AVG)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Base automatically changed from fix/bq27441-debug-prints to main March 11, 2026 10:28
Co-authored-by: nedseb <1420729+nedseb@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on removing debug print statements from driver bq27441: remove redundant try/except in current_average() Mar 11, 2026
@nedseb nedseb closed this Mar 11, 2026
@nedseb nedseb deleted the copilot/sub-pr-22-again branch March 11, 2026 15:45
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