Remove dead config_path assignment in _cmd_investigation#115
Merged
Conversation
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.
There was a problem hiding this comment.
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(defaultsqlite:///gnat.db) for storage initialization.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_investigationwas never referenced — the handler reads the database URL fromGNAT_DB_URLenvironment variable, not from the config file, so the stashed path was dead weight.Matches the existing pattern in
_cmd_reviewwhich already usesos.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.