fix: Fix remaining 61 ruff linting errors (SIM102, SIM117)
Fixed all remaining linting errors from the 310 total: - SIM102: Combined nested if statements (31 errors) - adaptors/openai.py - config_extractor.py - codebase_scraper.py - doc_scraper.py - github_fetcher.py - pattern_recognizer.py - pdf_scraper.py - test_example_extractor.py - SIM117: Combined multiple with statements (24 errors) - tests/test_async_scraping.py (2 errors) - tests/test_github_scraper.py (2 errors) - tests/test_guide_enhancer.py (20 errors) - Fixed test fixture parameter (mock_config in test_c3_integration.py) All 700+ tests passing. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ Tests verify complete fixes for:
|
||||
3. Custom API endpoint support (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN)
|
||||
"""
|
||||
|
||||
import contextlib
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
@@ -169,11 +170,8 @@ class TestIssue219Problem2CLIFlags(unittest.TestCase):
|
||||
mock_github_main.return_value = 0
|
||||
|
||||
# Call main dispatcher
|
||||
with patch("sys.exit"):
|
||||
try:
|
||||
main.main()
|
||||
except SystemExit:
|
||||
pass
|
||||
with patch("sys.exit"), contextlib.suppress(SystemExit):
|
||||
main.main()
|
||||
|
||||
# VERIFY: github_scraper.main was called
|
||||
mock_github_main.assert_called_once()
|
||||
|
||||
Reference in New Issue
Block a user