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:
@@ -1,6 +1,5 @@
|
||||
"""ABOUTME: Parses llms.txt markdown content into structured page data"""
|
||||
|
||||
|
||||
import re
|
||||
from urllib.parse import urljoin
|
||||
|
||||
@@ -128,7 +127,9 @@ class LlmsTxtParser:
|
||||
# Extract code blocks
|
||||
code_blocks = re.findall(r"```(\w+)?\n(.*?)```", content, re.DOTALL)
|
||||
for lang, code in code_blocks:
|
||||
page["code_samples"].append({"code": code.strip(), "language": lang or "unknown"})
|
||||
page["code_samples"].append(
|
||||
{"code": code.strip(), "language": lang or "unknown"}
|
||||
)
|
||||
|
||||
# Extract h2/h3 headings
|
||||
headings = re.findall(r"^(#{2,3})\s+(.+)$", content, re.MULTILINE)
|
||||
@@ -145,7 +146,9 @@ class LlmsTxtParser:
|
||||
content_no_code = re.sub(r"```.*?```", "", content, flags=re.DOTALL)
|
||||
|
||||
# Extract paragraphs
|
||||
paragraphs = [p.strip() for p in content_no_code.split("\n\n") if len(p.strip()) > 20]
|
||||
paragraphs = [
|
||||
p.strip() for p in content_no_code.split("\n\n") if len(p.strip()) > 20
|
||||
]
|
||||
page["content"] = "\n\n".join(paragraphs)
|
||||
|
||||
return page
|
||||
|
||||
Reference in New Issue
Block a user