Repository navigation
Closed
Labels
good first issueAccessible entry point for new community contributorspriority: lowUI tweaks, documentation, and minor optimizationspythonPython-specific runtime or environment optimizationsrefactorStructural cleanup or optimization without altering behavior
Milestone
Description
Objective
Part of the ruff lint baseline cleanup (SIM108 -- if/else block that could be a ternary). Chunked out of the larger sub-issue this replaces, so it's a manageable, self-contained pickup.
Findings
gitgalaxy/core/detector.py:1598(SIM108) -- Use ternary operatorline_end = len(safe_code) if next_nl == -1 else next_nl + 1instead ofif-else-blockgitgalaxy/core/detector.py:2043(SIM108) -- Use ternary operatorargs_count = args_str.count(",") + 1 if "," in args_str else len(args_str.strip().split())instead ofif-else-blockgitgalaxy/metrics/signal_processor.py:1679(SIM108) -- Use ternary operatornetwork_multiplier = 0.2 if popularity == 0 else min(1.0 + math.log1p(popularity) / 5.0, 2.0)instead ofif-else-blockgitgalaxy/tools/terabyte_log_scanning/pii_leak_hunter.py:125(SIM108) -- Use ternary operatorout_dir = Path(args.out).resolve() if args.out else target_path.parentinstead ofif-else-blockgitgalaxy/tools/terabyte_log_scanning/terabyte_log_scanner.py:161(SIM108) -- Use ternary operatorout_dir = Path(args.out).resolve() if args.out else target_path.parentinstead ofif-else-block
Fix in a small PR, removing resolved entries from tests/ruff_audit_baseline.json (see tests/ruff_audit.py's module docstring for the regen command).
Parent: #469
Metadata
Metadata
Assignees
Labels
good first issueAccessible entry point for new community contributorspriority: lowUI tweaks, documentation, and minor optimizationspythonPython-specific runtime or environment optimizationsrefactorStructural cleanup or optimization without altering behavior
Activity
Fix trivial, zero-behavior-change CodeQL findings from the Security d…