style: Run black formatter on 16 files
Applied black formatting to files modified in linting fixes: Source files (8): - config_extractor.py - doc_scraper.py - how_to_guide_builder.py - llms_txt_downloader.py - llms_txt_parser.py - pattern_recognizer.py - test_example_extractor.py - unified_codebase_analyzer.py Test files (8): - 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 All formatting issues resolved. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,9 @@ class TestAsyncScrapeMethods(unittest.TestCase):
|
||||
os.chdir(tmpdir)
|
||||
converter = DocToSkillConverter(config, dry_run=True)
|
||||
self.assertTrue(hasattr(converter, "scrape_page_async"))
|
||||
self.assertTrue(asyncio.iscoroutinefunction(converter.scrape_page_async))
|
||||
self.assertTrue(
|
||||
asyncio.iscoroutinefunction(converter.scrape_page_async)
|
||||
)
|
||||
finally:
|
||||
os.chdir(self.original_cwd)
|
||||
|
||||
@@ -177,9 +179,12 @@ class TestAsyncRouting(unittest.TestCase):
|
||||
converter = DocToSkillConverter(config, dry_run=True)
|
||||
|
||||
# Mock scrape_all_async to verify it does NOT get called
|
||||
with patch.object(
|
||||
converter, "scrape_all_async", new_callable=AsyncMock
|
||||
) as mock_async, patch.object(converter, "_try_llms_txt", return_value=False):
|
||||
with (
|
||||
patch.object(
|
||||
converter, "scrape_all_async", new_callable=AsyncMock
|
||||
) as mock_async,
|
||||
patch.object(converter, "_try_llms_txt", return_value=False),
|
||||
):
|
||||
converter.scrape_all()
|
||||
# Verify async version was NOT called
|
||||
mock_async.assert_not_called()
|
||||
@@ -258,7 +263,9 @@ class TestAsyncErrorHandling(unittest.TestCase):
|
||||
|
||||
async with httpx.AsyncClient() as client:
|
||||
# Mock client.get to raise exception
|
||||
with patch.object(client, "get", side_effect=httpx.HTTPError("Test error")):
|
||||
with patch.object(
|
||||
client, "get", side_effect=httpx.HTTPError("Test error")
|
||||
):
|
||||
# Should not raise exception, just log error
|
||||
await converter.scrape_page_async(
|
||||
"https://example.com/test", semaphore, client
|
||||
@@ -316,7 +323,10 @@ class TestAsyncLlmsTxtIntegration(unittest.TestCase):
|
||||
converter = DocToSkillConverter(config, dry_run=False)
|
||||
|
||||
# Mock _try_llms_txt to return True (llms.txt found)
|
||||
with patch.object(converter, "_try_llms_txt", return_value=True), patch.object(converter, "save_summary"):
|
||||
with (
|
||||
patch.object(converter, "_try_llms_txt", return_value=True),
|
||||
patch.object(converter, "save_summary"),
|
||||
):
|
||||
converter.scrape_all()
|
||||
# If llms.txt succeeded, async scraping should be skipped
|
||||
# Verify by checking that pages were not scraped
|
||||
|
||||
Reference in New Issue
Block a user