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:
@@ -89,9 +89,7 @@ class ConfigExtractionResult:
|
||||
config_files: list[ConfigFile] = field(default_factory=list)
|
||||
total_files: int = 0
|
||||
total_settings: int = 0
|
||||
detected_patterns: dict[str, list[str]] = field(
|
||||
default_factory=dict
|
||||
) # pattern -> files
|
||||
detected_patterns: dict[str, list[str]] = field(default_factory=dict) # pattern -> files
|
||||
errors: list[str] = field(default_factory=list)
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
@@ -241,9 +239,7 @@ class ConfigFileDetector:
|
||||
"*.egg-info",
|
||||
}
|
||||
|
||||
def find_config_files(
|
||||
self, directory: Path, max_files: int = 100
|
||||
) -> list[ConfigFile]:
|
||||
def find_config_files(self, directory: Path, max_files: int = 100) -> list[ConfigFile]:
|
||||
"""
|
||||
Find all configuration files in directory.
|
||||
|
||||
@@ -314,10 +310,7 @@ class ConfigFileDetector:
|
||||
filename = file_path.name.lower()
|
||||
|
||||
# Database configs
|
||||
if any(
|
||||
word in path_lower
|
||||
for word in ["database", "db", "postgres", "mysql", "mongo"]
|
||||
):
|
||||
if any(word in path_lower for word in ["database", "db", "postgres", "mysql", "mongo"]):
|
||||
return "database_configuration"
|
||||
|
||||
# API configs
|
||||
@@ -333,9 +326,7 @@ class ConfigFileDetector:
|
||||
return "docker_configuration"
|
||||
|
||||
# CI/CD configs
|
||||
if any(
|
||||
word in path_lower for word in [".travis", ".gitlab", ".github", "ci", "cd"]
|
||||
):
|
||||
if any(word in path_lower for word in [".travis", ".gitlab", ".github", "ci", "cd"]):
|
||||
return "ci_cd_configuration"
|
||||
|
||||
# Package configs
|
||||
@@ -347,11 +338,7 @@ class ConfigFileDetector:
|
||||
return "typescript_configuration"
|
||||
|
||||
# Framework configs
|
||||
if (
|
||||
"next.config" in filename
|
||||
or "vue.config" in filename
|
||||
or "webpack.config" in filename
|
||||
):
|
||||
if "next.config" in filename or "vue.config" in filename or "webpack.config" in filename:
|
||||
return "framework_configuration"
|
||||
|
||||
# Environment configs
|
||||
@@ -531,9 +518,7 @@ class ConfigParser:
|
||||
for match in re.finditer(pattern, config_file.raw_content):
|
||||
if len(match.groups()) >= 2:
|
||||
key = match.group(1)
|
||||
value = (
|
||||
match.group(3) if len(match.groups()) > 2 else match.group(2)
|
||||
)
|
||||
value = match.group(3) if len(match.groups()) > 2 else match.group(2)
|
||||
|
||||
setting = ConfigSetting(
|
||||
key=key, value=value, value_type=self._infer_type(value)
|
||||
@@ -579,9 +564,7 @@ class ConfigParser:
|
||||
for key, value in data.items():
|
||||
if isinstance(value, dict):
|
||||
# Recurse into nested dicts
|
||||
self._extract_settings_from_dict(
|
||||
value, config_file, parent_path + [key]
|
||||
)
|
||||
self._extract_settings_from_dict(value, config_file, parent_path + [key])
|
||||
else:
|
||||
setting = ConfigSetting(
|
||||
key=".".join(parent_path + [key]) if parent_path else key,
|
||||
@@ -872,9 +855,7 @@ def main():
|
||||
print("\n📊 Summary:")
|
||||
print(f" Config files found: {result.total_files}")
|
||||
print(f" Total settings: {result.total_settings}")
|
||||
print(
|
||||
f" Detected patterns: {', '.join(result.detected_patterns.keys()) or 'None'}"
|
||||
)
|
||||
print(f" Detected patterns: {', '.join(result.detected_patterns.keys()) or 'None'}")
|
||||
|
||||
if "ai_enhancements" in output_dict:
|
||||
print(f" ✨ AI enhancements: Yes ({enhance_mode} mode)")
|
||||
|
||||
Reference in New Issue
Block a user