Skip to content

Fix SIM102 linting issue in irc.py - #71

Closed
weiiwang01 with Copilot wants to merge 2 commits into
auto/uv+rufffrom
copilot/sub-pr-70
Closed

Fix SIM102 linting issue in irc.py#71
weiiwang01 with Copilot wants to merge 2 commits into
auto/uv+rufffrom
copilot/sub-pr-70

Conversation

Copilot AI commented Nov 27, 2025

Copy link
Copy Markdown

Applicable spec: N/A

Overview

Fixed ruff linting violation (SIM102) in src/irc.py that was blocking the migration to uv+ruff.

Rationale

The migration to ruff revealed a nested if statement that could be simplified using logical and operator.

Juju Events Changes

None.

Module Changes

src/irc.py: Combined nested if statements in reconcile() method from:

if self.db:
    if db_conn == "" or db_conn != self.db.uri:
        data["database"]["connectionString"] = self.db.uri

to:

if self.db and (db_conn == "" or db_conn != self.db.uri):
    data["database"]["connectionString"] = self.db.uri

Library Changes

None.

Checklist

Trivial linting fix only - no functional changes.


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

Co-authored-by: weiiwang01 <18743205+weiiwang01@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate Python project to uv and ruff for building and linting Fix SIM102 linting issue in irc.py Nov 27, 2025
Copilot AI requested a review from weiiwang01 November 27, 2025 12:29
@weiiwang01

Copy link
Copy Markdown
Contributor

Changes have been merged into #70

@weiiwang01 weiiwang01 closed this Dec 1, 2025
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