style: Run ruff format on 15 files (CI fix)

CI uses 'ruff format' not 'black' - applied proper formatting:

Files reformatted by ruff:
- config_extractor.py
- doc_scraper.py
- how_to_guide_builder.py
- llms_txt_parser.py
- pattern_recognizer.py
- test_example_extractor.py
- unified_codebase_analyzer.py
- test_architecture_scenarios.py
- test_async_scraping.py
- test_github_scraper.py
- test_guide_enhancer.py
- test_install_agent.py
- test_issue_219_e2e.py
- test_llms_txt_downloader.py
- test_skip_llms_txt.py

Fixes CI formatting check failure.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-01-18 00:01:30 +03:00
parent 9d43956b1d
commit 85c8d9d385
15 changed files with 179 additions and 510 deletions

View File

@@ -50,9 +50,7 @@ class TestIssue219Problem1LargeFiles(unittest.TestCase):
# Mock large CHANGELOG (1.4MB, encoding="none")
mock_content = Mock()
mock_content.type = "file"
mock_content.encoding = (
"none" # This is what GitHub API returns for large files
)
mock_content.encoding = "none" # This is what GitHub API returns for large files
mock_content.size = 1388271
mock_content.download_url = (
"https://raw.githubusercontent.com/ccxt/ccxt/master/CHANGELOG.md"
@@ -82,9 +80,7 @@ class TestIssue219Problem1LargeFiles(unittest.TestCase):
# VERIFY: CHANGELOG was extracted successfully
self.assertIn("changelog", scraper.extracted_data)
self.assertIn("Bug fixes", scraper.extracted_data["changelog"])
self.assertEqual(
scraper.extracted_data["changelog"], mock_response.text
)
self.assertEqual(scraper.extracted_data["changelog"], mock_response.text)
def test_large_file_fallback_on_error(self):
"""E2E: Verify graceful handling if download_url fails"""
@@ -184,8 +180,7 @@ class TestIssue219Problem2CLIFlags(unittest.TestCase):
# VERIFY: sys.argv contains --enhance-local flag
# (main.py should have added it before calling github_scraper)
called_with_enhance = any(
"--enhance-local" in str(call)
for call in mock_github_main.call_args_list
"--enhance-local" in str(call) for call in mock_github_main.call_args_list
)
self.assertTrue(
called_with_enhance or "--enhance-local" in sys.argv,
@@ -229,9 +224,7 @@ class TestIssue219Problem3CustomAPIEndpoints(unittest.TestCase):
os.environ,
{"ANTHROPIC_API_KEY": "test-key-123", "ANTHROPIC_BASE_URL": custom_url},
),
patch(
"skill_seekers.cli.enhance_skill.anthropic.Anthropic"
) as mock_anthropic,
patch("skill_seekers.cli.enhance_skill.anthropic.Anthropic") as mock_anthropic,
):
# Create enhancer
_enhancer = SkillEnhancer(self.skill_dir)
@@ -258,9 +251,7 @@ class TestIssue219Problem3CustomAPIEndpoints(unittest.TestCase):
# Use ANTHROPIC_AUTH_TOKEN instead of ANTHROPIC_API_KEY
with (
patch.dict(os.environ, {"ANTHROPIC_AUTH_TOKEN": custom_token}, clear=True),
patch(
"skill_seekers.cli.enhance_skill.anthropic.Anthropic"
) as mock_anthropic,
patch("skill_seekers.cli.enhance_skill.anthropic.Anthropic") as mock_anthropic,
):
# Create enhancer (should accept ANTHROPIC_AUTH_TOKEN)
enhancer = SkillEnhancer(self.skill_dir)
@@ -290,9 +281,7 @@ class TestIssue219Problem3CustomAPIEndpoints(unittest.TestCase):
with (
patch.dict(os.environ, {"ANTHROPIC_API_KEY": "test-key"}),
patch(
"skill_seekers.cli.enhance_skill.anthropic.Anthropic"
) as mock_anthropic,
patch("skill_seekers.cli.enhance_skill.anthropic.Anthropic") as mock_anthropic,
):
enhancer = SkillEnhancer(self.skill_dir)
@@ -301,9 +290,7 @@ class TestIssue219Problem3CustomAPIEndpoints(unittest.TestCase):
mock_thinking_block = SimpleNamespace(type="thinking")
# TextBlock has .text attribute
mock_text_block = SimpleNamespace(
text="# Enhanced SKILL.md\n\nContent here"
)
mock_text_block = SimpleNamespace(text="# Enhanced SKILL.md\n\nContent here")
mock_message = Mock()
mock_message.content = [mock_thinking_block, mock_text_block]