Skip to content

Remove dead config_path assignment in _cmd_investigation#115

Merged
wrhalpin merged 1 commit intomainfrom
claude/phase1-connectors-wave1-BOSrp
Apr 11, 2026
Merged

Remove dead config_path assignment in _cmd_investigation#115
wrhalpin merged 1 commit intomainfrom
claude/phase1-connectors-wave1-BOSrp

Conversation

@wrhalpin
Copy link
Copy Markdown
Owner

This was a pre-existing F841 (local variable assigned but never used) that ruff had been flagging since before the scheduler CLI work. The config_path = getattr(args, "config", None) line at the top of _cmd_investigation was never referenced — the handler reads the database URL from GNAT_DB_URL environment variable, not from the config file, so the stashed path was dead weight.

Matches the existing pattern in _cmd_review which already uses os.environ.get("GNAT_DB_URL", "sqlite:///gnat.db") without bothering with config resolution.

Ruff now clean on the full gnat/cli/main.py (was 1 remaining F841). Full unit suite: 4,678 passed, 198 skipped, 0 failed.

This was a pre-existing F841 (local variable assigned but never used)
that ruff had been flagging since before the scheduler CLI work. The
``config_path = getattr(args, "config", None)`` line at the top of
``_cmd_investigation`` was never referenced — the handler reads the
database URL from ``GNAT_DB_URL`` environment variable, not from the
config file, so the stashed path was dead weight.

Matches the existing pattern in ``_cmd_review`` which already uses
``os.environ.get("GNAT_DB_URL", "sqlite:///gnat.db")`` without bothering
with config resolution.

Ruff now clean on the full gnat/cli/main.py (was 1 remaining F841).
Full unit suite: 4,678 passed, 198 skipped, 0 failed.
Copilot AI review requested due to automatic review settings April 11, 2026 22:53
@wrhalpin wrhalpin merged commit fdc18d9 into main Apr 11, 2026
1 of 19 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes an unused local variable in the gnat investigation CLI handler (_cmd_investigation) to eliminate a longstanding Ruff F841 warning, aligning it with the existing pattern used by _cmd_review (DB URL sourced from GNAT_DB_URL rather than config).

Changes:

  • Removed dead config_path = getattr(args, "config", None) assignment from _cmd_investigation.
  • No behavioral change: investigation CLI continues to use GNAT_DB_URL (default sqlite:///gnat.db) for storage initialization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants