diff --git a/src/skill_seekers/cli/adaptors/base.py b/src/skill_seekers/cli/adaptors/base.py index fdfabff..5178505 100644 --- a/src/skill_seekers/cli/adaptors/base.py +++ b/src/skill_seekers/cli/adaptors/base.py @@ -140,7 +140,7 @@ class SkillAdaptor(ABC): """ return False - def enhance(self, skill_dir: Path, api_key: str) -> bool: + def enhance(self, _skill_dir: Path, _api_key: str) -> bool: """ Optionally enhance SKILL.md using platform's AI. diff --git a/src/skill_seekers/cli/adaptors/gemini.py b/src/skill_seekers/cli/adaptors/gemini.py index e07be69..367a5c5 100644 --- a/src/skill_seekers/cli/adaptors/gemini.py +++ b/src/skill_seekers/cli/adaptors/gemini.py @@ -154,7 +154,7 @@ See the references directory for complete documentation with examples and best p return output_path - def upload(self, package_path: Path, api_key: str, **kwargs) -> dict[str, Any]: + def upload(self, package_path: Path, api_key: str, **_kwargs) -> dict[str, Any]: """ Upload skill tar.gz to Gemini Files API. diff --git a/src/skill_seekers/cli/adaptors/markdown.py b/src/skill_seekers/cli/adaptors/markdown.py index 323d3e9..05d39d8 100644 --- a/src/skill_seekers/cli/adaptors/markdown.py +++ b/src/skill_seekers/cli/adaptors/markdown.py @@ -152,7 +152,7 @@ Browse the reference files for detailed information on each topic. All files are return output_path - def upload(self, package_path: Path, api_key: str, **kwargs) -> dict[str, Any]: + def upload(self, package_path: Path, _api_key: str, **_kwargs) -> dict[str, Any]: """ Generic markdown export does not support upload. @@ -176,7 +176,7 @@ Browse the reference files for detailed information on each topic. All files are ), } - def validate_api_key(self, api_key: str) -> bool: + def validate_api_key(self, _api_key: str) -> bool: """ Markdown export doesn't use API keys. @@ -206,7 +206,7 @@ Browse the reference files for detailed information on each topic. All files are """ return False - def enhance(self, skill_dir: Path, api_key: str) -> bool: + def enhance(self, _skill_dir: Path, _api_key: str) -> bool: """ Markdown export doesn't support enhancement. diff --git a/src/skill_seekers/cli/architectural_pattern_detector.py b/src/skill_seekers/cli/architectural_pattern_detector.py index c4ba251..4aaa01b 100644 --- a/src/skill_seekers/cli/architectural_pattern_detector.py +++ b/src/skill_seekers/cli/architectural_pattern_detector.py @@ -181,7 +181,7 @@ class ArchitecturalPatternDetector: return dict(structure) - def _detect_frameworks(self, directory: Path, files: list[dict]) -> list[str]: + def _detect_frameworks(self, _directory: Path, files: list[dict]) -> list[str]: """Detect frameworks being used""" detected = [] @@ -419,7 +419,7 @@ class ArchitecturalPatternDetector: return patterns def _detect_layered_architecture( - self, dirs: dict[str, int], files: list[dict] + self, dirs: dict[str, int], _files: list[dict] ) -> list[ArchitecturalPattern]: """Detect Layered Architecture (3-tier, N-tier)""" patterns = [] @@ -430,7 +430,7 @@ class ArchitecturalPatternDetector: return patterns evidence = [] - components = defaultdict(list) + _components = defaultdict(list) layers_found = [] if "presentation" in dirs or "ui" in dirs: @@ -461,7 +461,7 @@ class ArchitecturalPatternDetector: return patterns def _detect_clean_architecture( - self, dirs: dict[str, int], files: list[dict] + self, dirs: dict[str, int], _files: list[dict] ) -> list[ArchitecturalPattern]: """Detect Clean Architecture""" patterns = [] diff --git a/src/skill_seekers/cli/code_analyzer.py b/src/skill_seekers/cli/code_analyzer.py index 4df21e7..e17b466 100644 --- a/src/skill_seekers/cli/code_analyzer.py +++ b/src/skill_seekers/cli/code_analyzer.py @@ -256,7 +256,7 @@ class CodeAnalyzer: decorators=decorators, ) - def _analyze_javascript(self, content: str, file_path: str) -> dict[str, Any]: + def _analyze_javascript(self, content: str, _file_path: str) -> dict[str, Any]: """ Analyze JavaScript/TypeScript file using regex patterns. @@ -407,7 +407,7 @@ class CodeAnalyzer: return params - def _analyze_cpp(self, content: str, file_path: str) -> dict[str, Any]: + def _analyze_cpp(self, content: str, _file_path: str) -> dict[str, Any]: """ Analyze C/C++ header file using regex patterns. @@ -554,7 +554,7 @@ class CodeAnalyzer: # C++ uses the same comment syntax as JavaScript return self._extract_js_comments(content) - def _analyze_csharp(self, content: str, file_path: str) -> dict[str, Any]: + def _analyze_csharp(self, content: str, _file_path: str) -> dict[str, Any]: """ Analyze C# file using regex patterns. @@ -742,7 +742,7 @@ class CodeAnalyzer: return comments - def _analyze_go(self, content: str, file_path: str) -> dict[str, Any]: + def _analyze_go(self, content: str, _file_path: str) -> dict[str, Any]: """ Analyze Go file using regex patterns. @@ -774,7 +774,7 @@ class CodeAnalyzer: # Matches: func [receiver] name(params) [returns] func_pattern = r"func\s+(?:\((\w+)\s+\*?(\w+)\)\s+)?(\w+)\s*\(([^)]*)\)(?:\s+\(([^)]+)\)|(?:\s+(\w+(?:\[.*?\])?(?:,\s*\w+)*)))?" for match in re.finditer(func_pattern, content): - receiver_var = match.group(1) + _receiver_var = match.group(1) receiver_type = match.group(2) func_name = match.group(3) params_str = match.group(4) @@ -851,7 +851,7 @@ class CodeAnalyzer: # Go uses C-style comments return self._extract_js_comments(content) - def _analyze_rust(self, content: str, file_path: str) -> dict[str, Any]: + def _analyze_rust(self, content: str, _file_path: str) -> dict[str, Any]: """ Analyze Rust file using regex patterns. @@ -969,7 +969,7 @@ class CodeAnalyzer: return comments - def _analyze_java(self, content: str, file_path: str) -> dict[str, Any]: + def _analyze_java(self, content: str, _file_path: str) -> dict[str, Any]: """ Analyze Java file using regex patterns. @@ -1151,7 +1151,7 @@ class CodeAnalyzer: return comments - def _analyze_ruby(self, content: str, file_path: str) -> dict[str, Any]: + def _analyze_ruby(self, content: str, _file_path: str) -> dict[str, Any]: """ Analyze Ruby file using regex patterns. @@ -1251,7 +1251,7 @@ class CodeAnalyzer: return comments - def _analyze_php(self, content: str, file_path: str) -> dict[str, Any]: + def _analyze_php(self, content: str, _file_path: str) -> dict[str, Any]: """ Analyze PHP file using regex patterns. diff --git a/src/skill_seekers/cli/config_enhancer.py b/src/skill_seekers/cli/config_enhancer.py index 38b7bf4..4ac9bf0 100644 --- a/src/skill_seekers/cli/config_enhancer.py +++ b/src/skill_seekers/cli/config_enhancer.py @@ -336,7 +336,7 @@ Focus on actionable insights: """ return prompt - def _run_claude_cli(self, prompt_file: Path, output_file: Path) -> dict | None: + def _run_claude_cli(self, prompt_file: Path, _output_file: Path) -> dict | None: """Run Claude Code CLI and wait for completion""" try: # Run claude command diff --git a/src/skill_seekers/cli/config_manager.py b/src/skill_seekers/cli/config_manager.py index 9d0736e..201e3c7 100644 --- a/src/skill_seekers/cli/config_manager.py +++ b/src/skill_seekers/cli/config_manager.py @@ -166,7 +166,7 @@ class ConfigManager: return profiles def get_github_token( - self, profile_name: str | None = None, repo_url: str | None = None + self, profile_name: str | None = None, _repo_url: str | None = None ) -> str | None: """ Get GitHub token with smart fallback chain. @@ -219,7 +219,7 @@ class ConfigManager: # Find current profile index current_idx = None - for idx, (name, profile) in enumerate(profiles): + for idx, (_name, profile) in enumerate(profiles): if profile["token"] == current_token: current_idx = idx break diff --git a/src/skill_seekers/cli/dependency_analyzer.py b/src/skill_seekers/cli/dependency_analyzer.py index ad5e693..1f026be 100644 --- a/src/skill_seekers/cli/dependency_analyzer.py +++ b/src/skill_seekers/cli/dependency_analyzer.py @@ -350,7 +350,7 @@ class DependencyAnalyzer: # Extract individual imports from block import_line_pattern = r'(?:(\w+)\s+)?"([^"]+)"' for line_match in re.finditer(import_line_pattern, block): - alias = line_match.group(1) + _alias = line_match.group(1) package = line_match.group(2) line_num = content[: block_start + line_match.start()].count("\n") + 1 @@ -609,7 +609,7 @@ class DependencyAnalyzer: return self.graph def _resolve_import( - self, source_file: str, imported_module: str, is_relative: bool + self, _source_file: str, imported_module: str, _is_relative: bool ) -> str | None: """ Resolve import statement to actual file path. diff --git a/src/skill_seekers/cli/doc_scraper.py b/src/skill_seekers/cli/doc_scraper.py index ffaa665..1289b21 100755 --- a/src/skill_seekers/cli/doc_scraper.py +++ b/src/skill_seekers/cli/doc_scraper.py @@ -544,7 +544,7 @@ class DocToSkillConverter: return lang # Return string for backward compatibility def extract_patterns( - self, main: Any, code_samples: list[dict[str, Any]] + self, main: Any, _code_samples: list[dict[str, Any]] ) -> list[dict[str, str]]: """Extract common coding patterns (NEW FEATURE)""" patterns = [] @@ -881,7 +881,7 @@ class DocToSkillConverter: # Save ALL variants to references/ os.makedirs(os.path.join(self.skill_dir, "references"), exist_ok=True) - for variant, data in downloaded.items(): + for _variant, data in downloaded.items(): filepath = os.path.join(self.skill_dir, "references", data["filename"]) with open(filepath, "w", encoding="utf-8") as f: f.write(data["content"]) diff --git a/src/skill_seekers/cli/enhance_skill_local.py b/src/skill_seekers/cli/enhance_skill_local.py index e39c7bd..3907df8 100644 --- a/src/skill_seekers/cli/enhance_skill_local.py +++ b/src/skill_seekers/cli/enhance_skill_local.py @@ -133,7 +133,7 @@ class LocalSkillEnhancer: Summarized content """ lines = content.split("\n") - target_lines = int(len(lines) * target_ratio) + _target_lines = int(len(lines) * target_ratio) # Priority 1: Keep introduction (first 20%) intro_lines = int(len(lines) * 0.2) @@ -165,7 +165,7 @@ class LocalSkillEnhancer: result = result_lines.copy() # Add code blocks first (prioritize code examples) - for idx, block in code_blocks[:5]: # Max 5 code blocks + for _idx, block in code_blocks[:5]: # Max 5 code blocks result.append("") # Add blank line before code block result.extend(block) @@ -222,7 +222,7 @@ class LocalSkillEnhancer: print() # Summarize each reference - for filename, metadata in references.items(): + for _filename, metadata in references.items(): summarized = self.summarize_reference(metadata["content"], summarization_ratio) metadata["content"] = summarized metadata["size"] = len(summarized) diff --git a/src/skill_seekers/cli/generate_router.py b/src/skill_seekers/cli/generate_router.py index 33d52cf..f73ee33 100644 --- a/src/skill_seekers/cli/generate_router.py +++ b/src/skill_seekers/cli/generate_router.py @@ -146,7 +146,7 @@ class RouterGenerator: return routing - def _extract_skill_specific_labels(self, skill_name: str, skill_keywords: set) -> list[str]: + def _extract_skill_specific_labels(self, _skill_name: str, skill_keywords: set) -> list[str]: """ Extract labels from GitHub issues that match this specific skill. @@ -198,7 +198,7 @@ class RouterGenerator: return list(matching_labels) - def _generate_frontmatter(self, routing_keywords: dict[str, list[str]]) -> str: + def _generate_frontmatter(self, _routing_keywords: dict[str, list[str]]) -> str: """ Generate YAML frontmatter compliant with agentskills.io spec. @@ -924,7 +924,7 @@ Simply ask your question and mention the topic. The router will find the right s return skill_md - def generate_subskill_issues_section(self, skill_name: str, topics: list[str]) -> str: + def generate_subskill_issues_section(self, _skill_name: str, topics: list[str]) -> str: """ Generate "Common Issues" section for a sub-skill (Phase 4). diff --git a/src/skill_seekers/cli/github_scraper.py b/src/skill_seekers/cli/github_scraper.py index f101678..4808035 100644 --- a/src/skill_seekers/cli/github_scraper.py +++ b/src/skill_seekers/cli/github_scraper.py @@ -99,7 +99,7 @@ def extract_description_from_readme(readme_content: str, repo_name: str) -> str: meaningful_paragraph = None in_code_block = False - for i, line in enumerate(lines): + for _i, line in enumerate(lines): stripped = line.strip() # Track code blocks diff --git a/src/skill_seekers/cli/how_to_guide_builder.py b/src/skill_seekers/cli/how_to_guide_builder.py index e858b43..1b8c406 100644 --- a/src/skill_seekers/cli/how_to_guide_builder.py +++ b/src/skill_seekers/cli/how_to_guide_builder.py @@ -240,7 +240,7 @@ class WorkflowAnalyzer: return steps - def _extract_steps_heuristic(self, code: str, workflow: dict) -> list[WorkflowStep]: + def _extract_steps_heuristic(self, code: str, _workflow: dict) -> list[WorkflowStep]: """Extract steps using heuristics (for non-Python or invalid syntax)""" steps = [] lines = code.split("\n") @@ -377,7 +377,7 @@ class WorkflowAnalyzer: has_mock = "mock" in code.lower() or "patch" in code.lower() has_error_handling = "try" in code or "except" in code - complexity_score = workflow.get("complexity_score", 0.5) + _complexity_score = workflow.get("complexity_score", 0.5) # Determine level if num_steps <= 3 and not has_async and not has_mock: @@ -957,7 +957,7 @@ class HowToGuideBuilder: return guide - def _generate_overview(self, primary_workflow: dict, all_workflows: list[dict]) -> str: + def _generate_overview(self, primary_workflow: dict, _all_workflows: list[dict]) -> str: """Generate guide overview""" # Try to get explanation from AI analysis if primary_workflow.get("ai_analysis"): @@ -973,7 +973,7 @@ class HowToGuideBuilder: # Final fallback return f"Learn how to use {primary_workflow.get('test_name', 'this feature')} in your code." - def _enhance_guide_with_ai(self, guide: HowToGuide, ai_analysis: dict, enhancer): + def _enhance_guide_with_ai(self, guide: HowToGuide, _ai_analysis: dict, enhancer): """ Comprehensively enhance guide with AI using GuideEnhancer. diff --git a/src/skill_seekers/cli/install_agent.py b/src/skill_seekers/cli/install_agent.py index 5278f56..1c59204 100644 --- a/src/skill_seekers/cli/install_agent.py +++ b/src/skill_seekers/cli/install_agent.py @@ -259,7 +259,7 @@ def install_to_agent( ) # Copy skill directory - def ignore_files(directory, files): + def ignore_files(_directory, files): """Filter function for shutil.copytree to exclude unwanted files.""" ignored = [] for f in files: diff --git a/src/skill_seekers/cli/pattern_recognizer.py b/src/skill_seekers/cli/pattern_recognizer.py index ee5a1d4..3c30529 100644 --- a/src/skill_seekers/cli/pattern_recognizer.py +++ b/src/skill_seekers/cli/pattern_recognizer.py @@ -107,7 +107,7 @@ class BasePatternDetector: self.pattern_type = "BasePattern" self.category = "Unknown" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, _class_sig, _all_classes: list) -> PatternInstance | None: """ Surface-level detection using naming conventions. @@ -121,7 +121,7 @@ class BasePatternDetector: # Default: no surface detection return None - def detect_deep(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_deep(self, _class_sig, _all_classes: list) -> PatternInstance | None: """ Deep detection using structural analysis. @@ -136,7 +136,7 @@ class BasePatternDetector: return None def detect_full( - self, class_sig, all_classes: list, file_content: str + self, _class_sig, _all_classes: list, _file_content: str ) -> PatternInstance | None: """ Full detection using behavioral analysis. @@ -385,7 +385,7 @@ class SingletonDetector(BasePatternDetector): self.pattern_type = "Singleton" self.category = "Creational" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check if class name suggests Singleton""" if "singleton" in class_sig.name.lower(): return PatternInstance( @@ -519,7 +519,7 @@ class FactoryDetector(BasePatternDetector): self.pattern_type = "Factory" self.category = "Creational" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check naming conventions for Factory""" # Check class name if "factory" in class_sig.name.lower(): @@ -626,7 +626,7 @@ class ObserverDetector(BasePatternDetector): self.pattern_type = "Observer" self.category = "Behavioral" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check naming for Observer pattern""" observer_keywords = ["observer", "listener", "subscriber", "watcher"] @@ -749,7 +749,7 @@ class StrategyDetector(BasePatternDetector): self.pattern_type = "Strategy" self.category = "Behavioral" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check naming for Strategy""" strategy_keywords = ["strategy", "policy", "algorithm"] @@ -852,7 +852,7 @@ class DecoratorDetector(BasePatternDetector): self.pattern_type = "Decorator" self.category = "Structural" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check naming for Decorator""" decorator_keywords = ["decorator", "wrapper", "proxy"] @@ -965,7 +965,7 @@ class BuilderDetector(BasePatternDetector): self.pattern_type = "Builder" self.category = "Creational" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check naming for Builder""" if "builder" in class_sig.name.lower(): return PatternInstance( @@ -1096,7 +1096,7 @@ class AdapterDetector(BasePatternDetector): self.pattern_type = "Adapter" self.category = "Structural" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check naming for Adapter""" adapter_keywords = ["adapter", "wrapper", "bridge"] @@ -1182,7 +1182,7 @@ class CommandDetector(BasePatternDetector): self.pattern_type = "Command" self.category = "Behavioral" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check naming for Command""" command_keywords = ["command", "action", "task", "operation"] @@ -1389,7 +1389,7 @@ class ChainOfResponsibilityDetector(BasePatternDetector): self.pattern_type = "ChainOfResponsibility" self.category = "Behavioral" - def detect_surface(self, class_sig, all_classes: list) -> PatternInstance | None: + def detect_surface(self, class_sig, _all_classes: list) -> PatternInstance | None: """Check naming for Chain of Responsibility""" chain_keywords = ["handler", "chain", "middleware", "filter", "processor"] diff --git a/src/skill_seekers/cli/pdf_scraper.py b/src/skill_seekers/cli/pdf_scraper.py index b33c330..939088e 100644 --- a/src/skill_seekers/cli/pdf_scraper.py +++ b/src/skill_seekers/cli/pdf_scraper.py @@ -203,7 +203,7 @@ class PDFToSkillConverter: categorized["content"] = {"title": "Content", "pages": self.extracted_data["pages"]} print(f"βœ… Created {len(categorized)} categories") - for cat_key, cat_data in categorized.items(): + for _cat_key, cat_data in categorized.items(): print(f" - {cat_data['title']}: {len(cat_data['pages'])} pages") return categorized @@ -339,7 +339,7 @@ class PDFToSkillConverter: total_pages = self.extracted_data.get("total_pages", 0) f.write(f"**Total Pages:** {total_pages}\n\n") f.write("**Content Breakdown:**\n\n") - for cat_key, cat_data in categorized.items(): + for _cat_key, cat_data in categorized.items(): page_count = len(cat_data["pages"]) f.write(f"- **{cat_data['title']}**: {page_count} pages\n") f.write("\n") @@ -421,7 +421,7 @@ class PDFToSkillConverter: # Navigation f.write("## πŸ—ΊοΈ Navigation\n\n") f.write("**Reference Files:**\n\n") - for cat_key, cat_data in categorized.items(): + for _cat_key, cat_data in categorized.items(): cat_file = self._sanitize_filename(cat_data["title"]) f.write(f"- `references/{cat_file}.md` - {cat_data['title']}\n") f.write("\n") @@ -477,7 +477,7 @@ class PDFToSkillConverter: # Simple pattern extraction from headings and emphasized text for page in self.extracted_data.get("pages", []): - text = page.get("text", "") + _text = page.get("text", "") headings = page.get("headings", []) # Look for common pattern keywords in headings diff --git a/src/skill_seekers/cli/quality_checker.py b/src/skill_seekers/cli/quality_checker.py index 669f181..af6e5fe 100644 --- a/src/skill_seekers/cli/quality_checker.py +++ b/src/skill_seekers/cli/quality_checker.py @@ -180,7 +180,7 @@ class SkillQualityChecker: } code_blocks = len(enhancement_indicators["code_examples"].findall(content)) - real_examples = len(enhancement_indicators["real_examples"].findall(content)) + _real_examples = len(enhancement_indicators["real_examples"].findall(content)) sections = len(enhancement_indicators["sections"].findall(content)) # Quality thresholds diff --git a/src/skill_seekers/cli/resume_command.py b/src/skill_seekers/cli/resume_command.py index 9047ca2..2e57b7b 100644 --- a/src/skill_seekers/cli/resume_command.py +++ b/src/skill_seekers/cli/resume_command.py @@ -73,7 +73,7 @@ def resume_job(job_id: str): # Extract job details command = progress.get("command", "") - job_config = progress.get("config", {}) + _job_config = progress.get("config", {}) checkpoint = progress.get("progress", {}).get("last_checkpoint") print(f"Original command: {command}") diff --git a/src/skill_seekers/cli/test_unified_simple.py b/src/skill_seekers/cli/test_unified_simple.py index 6653daa..ecf5903 100644 --- a/src/skill_seekers/cli/test_unified_simple.py +++ b/src/skill_seekers/cli/test_unified_simple.py @@ -142,7 +142,7 @@ def test_config_validation_errors(): print("\nβœ“ Testing invalid source type...") try: # validate_config() calls .validate() automatically - validator = validate_config(config_path) + _validator = validate_config(config_path) assert False, "Should have raised error for invalid source type" except ValueError as e: assert "Invalid" in str(e) or "invalid" in str(e) diff --git a/src/skill_seekers/cli/unified_scraper.py b/src/skill_seekers/cli/unified_scraper.py index 7819466..cc27811 100644 --- a/src/skill_seekers/cli/unified_scraper.py +++ b/src/skill_seekers/cli/unified_scraper.py @@ -605,7 +605,7 @@ class UnifiedScraper: try: # Run full C3.x analysis - results = analyze_codebase( + _results = analyze_codebase( directory=Path(local_repo_path), output_dir=temp_output, depth="deep", diff --git a/src/skill_seekers/cli/unified_skill_builder.py b/src/skill_seekers/cli/unified_skill_builder.py index 36f4ecf..c93b6a7 100644 --- a/src/skill_seekers/cli/unified_skill_builder.py +++ b/src/skill_seekers/cli/unified_skill_builder.py @@ -222,7 +222,7 @@ class UnifiedSkillBuilder: github_sections = self._parse_skill_md_sections(skill_mds.get("github", "")) # Extract GitHub metadata from full content - github_full = skill_mds.get("github", "") + _github_full = skill_mds.get("github", "") # Start with YAML frontmatter skill_name = self.name.lower().replace("_", "-").replace(" ", "-")[:64] @@ -688,28 +688,28 @@ This skill combines knowledge from multiple sources: if matched: content += "### βœ… Verified APIs\n\n" content += "*Documentation and code agree*\n\n" - for api_name, api_data in list(matched.items())[:10]: # Limit to first 10 + for _api_name, api_data in list(matched.items())[:10]: # Limit to first 10 content += self._format_api_entry(api_data, inline_conflict=False) # Show conflicting APIs with warnings if conflicts: content += "\n### ⚠️ APIs with Conflicts\n\n" content += "*Documentation and code differ*\n\n" - for api_name, api_data in list(conflicts.items())[:10]: + for _api_name, api_data in list(conflicts.items())[:10]: content += self._format_api_entry(api_data, inline_conflict=True) # Show undocumented APIs if code_only: content += "\n### πŸ’» Undocumented APIs\n\n" content += f"*Found in code but not in documentation ({len(code_only)} total)*\n\n" - for api_name, api_data in list(code_only.items())[:5]: + for _api_name, api_data in list(code_only.items())[:5]: content += self._format_api_entry(api_data, inline_conflict=False) # Show removed/missing APIs if docs_only: content += "\n### πŸ“– Documentation-Only APIs\n\n" content += f"*Documented but not found in code ({len(docs_only)} total)*\n\n" - for api_name, api_data in list(docs_only.items())[:5]: + for _api_name, api_data in list(docs_only.items())[:5]: content += self._format_api_entry(api_data, inline_conflict=False) content += "\n*See references/api/ for complete API documentation*\n" diff --git a/src/skill_seekers/mcp/agent_detector.py b/src/skill_seekers/mcp/agent_detector.py index 0ee4dbe..0a6a435 100644 --- a/src/skill_seekers/mcp/agent_detector.py +++ b/src/skill_seekers/mcp/agent_detector.py @@ -197,7 +197,7 @@ class AgentDetector: return json.dumps(config, indent=2) - def _generate_intellij_config(self, server_command: str, http_port: int) -> str: + def _generate_intellij_config(self, _server_command: str, http_port: int) -> str: """ Generate IntelliJ IDEA MCP configuration (XML format). diff --git a/src/skill_seekers/mcp/server_legacy.py b/src/skill_seekers/mcp/server_legacy.py index a208cc7..93b05d1 100644 --- a/src/skill_seekers/mcp/server_legacy.py +++ b/src/skill_seekers/mcp/server_legacy.py @@ -944,7 +944,7 @@ async def upload_skill_tool(args: dict) -> list[TextContent]: return [TextContent(type="text", text=f"{output}\n\n❌ Error:\n{stderr}")] -async def list_configs_tool(args: dict) -> list[TextContent]: +async def list_configs_tool(_args: dict) -> list[TextContent]: """List available configs""" configs_dir = Path("configs") diff --git a/src/skill_seekers/mcp/tools/config_tools.py b/src/skill_seekers/mcp/tools/config_tools.py index 578ed30..4af4730 100644 --- a/src/skill_seekers/mcp/tools/config_tools.py +++ b/src/skill_seekers/mcp/tools/config_tools.py @@ -103,7 +103,7 @@ Note: Default selectors may need adjustment for your documentation site. return [TextContent(type="text", text=result)] -async def list_configs(args: dict) -> list[TextContent]: +async def list_configs(_args: dict) -> list[TextContent]: """ List all available preset configurations. diff --git a/tests/conftest.py b/tests/conftest.py index 6212d8c..6886a04 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,7 +10,7 @@ import sys import pytest -def pytest_configure(config): +def pytest_configure(config): # noqa: ARG001 """Check if package is installed before running tests.""" try: import skill_seekers # noqa: F401 diff --git a/tests/test_architecture_scenarios.py b/tests/test_architecture_scenarios.py index 02b4264..013473c 100644 --- a/tests/test_architecture_scenarios.py +++ b/tests/test_architecture_scenarios.py @@ -399,7 +399,7 @@ How to use async tools. oauth_count = oauth_keywords.count("oauth") assert oauth_count >= 2 # Should appear at least twice for 2x weight - def test_scenario_1_quality_metrics(self, tmp_path): + def test_scenario_1_quality_metrics(self, tmp_path): # noqa: ARG002 """Test quality metrics meet architecture targets.""" # Create simple router output router_md = """--- @@ -565,7 +565,7 @@ class TestScenario2MultiSource: } # Mock GitHub streams - github_streams = ThreeStreamData( + _github_streams = ThreeStreamData( code_stream=CodeStream(directory=Path("/tmp"), files=[]), docs_stream=DocsStream( readme="Use client_id and client_secret", contributing=None, docs_files=[] diff --git a/tests/test_bootstrap_skill_e2e.py b/tests/test_bootstrap_skill_e2e.py index 9cd92d1..2e3e2df 100644 --- a/tests/test_bootstrap_skill_e2e.py +++ b/tests/test_bootstrap_skill_e2e.py @@ -95,7 +95,7 @@ class TestBootstrapSkillE2E: # Find closing delimiter lines = content.split("\n") closing_found = False - for i, line in enumerate(lines[1:], 1): + for _i, line in enumerate(lines[1:], 1): if line.strip() == "---": closing_found = True break diff --git a/tests/test_c3_integration.py b/tests/test_c3_integration.py index ed4f50c..aaa79f9 100644 --- a/tests/test_c3_integration.py +++ b/tests/test_c3_integration.py @@ -136,7 +136,7 @@ class TestC3Integration: }, } - def test_codebase_analysis_enabled_by_default(self, mock_config, temp_dir): + def test_codebase_analysis_enabled_by_default(self, _mock_config, temp_dir): """Test that enable_codebase_analysis defaults to True.""" # Config with GitHub source but no explicit enable_codebase_analysis config_without_flag = { @@ -174,7 +174,7 @@ class TestC3Integration: # Verify flag disabled it github_source = scraper.config["sources"][0] - assert github_source["enable_codebase_analysis"] == False + assert not github_source["enable_codebase_analysis"] def test_architecture_md_generation(self, mock_config, mock_c3_data, temp_dir): """Test ARCHITECTURE.md is generated with all 8 sections.""" @@ -310,7 +310,7 @@ class TestC3Integration: # Validate validator = ConfigValidator(config_path) - assert validator.validate() == True + assert validator.validate() def test_config_validator_rejects_invalid_ai_mode(self, temp_dir): """Test config validator rejects invalid ai_mode values.""" diff --git a/tests/test_config_extractor.py b/tests/test_config_extractor.py index 87fca35..bc2e647 100644 --- a/tests/test_config_extractor.py +++ b/tests/test_config_extractor.py @@ -558,8 +558,8 @@ class TestConfigExtractorIntegration(unittest.TestCase): # Create test config (Path(self.temp_dir) / "config.json").write_text('{"key": "value"}') - result = self.extractor.extract_from_directory(Path(self.temp_dir)) - output_dir = Path(self.temp_dir) / "output" + _result = self.extractor.extract_from_directory(Path(self.temp_dir)) + _output_dir = Path(self.temp_dir) / "output" # TODO: Implement save_results method in ConfigExtractor # self.extractor.save_results(result, output_dir) diff --git a/tests/test_e2e_three_stream_pipeline.py b/tests/test_e2e_three_stream_pipeline.py index 43f08b9..93410b7 100644 --- a/tests/test_e2e_three_stream_pipeline.py +++ b/tests/test_e2e_three_stream_pipeline.py @@ -582,7 +582,7 @@ class TestE2ETokenEfficiency: insights_stream = InsightsStream( metadata={"stars": 100}, common_problems=[], known_solutions=[], top_labels=[] ) - three_streams = ThreeStreamData(code_stream, docs_stream, insights_stream) + _three_streams = ThreeStreamData(code_stream, docs_stream, insights_stream) # Verify streams are separate (no duplication) assert code_stream.directory == tmp_path diff --git a/tests/test_excluded_dirs_config.py b/tests/test_excluded_dirs_config.py index 9f380ef..08a53e5 100644 --- a/tests/test_excluded_dirs_config.py +++ b/tests/test_excluded_dirs_config.py @@ -13,7 +13,7 @@ class TestExcludedDirsDefaults(unittest.TestCase): """Test default EXCLUDED_DIRS behavior (backward compatibility).""" @patch("skill_seekers.cli.github_scraper.Github") - def test_defaults_when_no_config(self, mock_github): + def test_defaults_when_no_config(self, _mock_github): """Test that default exclusions are used when no config provided.""" config = {"repo": "owner/repo"} @@ -23,7 +23,7 @@ class TestExcludedDirsDefaults(unittest.TestCase): self.assertEqual(scraper.excluded_dirs, EXCLUDED_DIRS) @patch("skill_seekers.cli.github_scraper.Github") - def test_defaults_exclude_common_dirs(self, mock_github): + def test_defaults_exclude_common_dirs(self, _mock_github): """Test that default exclusions work correctly.""" config = {"repo": "owner/repo"} @@ -42,7 +42,7 @@ class TestExcludedDirsDefaults(unittest.TestCase): self.assertFalse(scraper.should_exclude_dir("docs")) @patch("skill_seekers.cli.github_scraper.Github") - def test_dot_directories_always_excluded(self, mock_github): + def test_dot_directories_always_excluded(self, _mock_github): """Test that directories starting with '.' are always excluded.""" config = {"repo": "owner/repo"} @@ -58,7 +58,7 @@ class TestExcludedDirsAdditional(unittest.TestCase): """Test exclude_dirs_additional (extend mode).""" @patch("skill_seekers.cli.github_scraper.Github") - def test_extend_with_additional_dirs(self, mock_github): + def test_extend_with_additional_dirs(self, _mock_github): """Test adding custom exclusions to defaults.""" config = { "repo": "owner/repo", @@ -78,7 +78,7 @@ class TestExcludedDirsAdditional(unittest.TestCase): self.assertEqual(len(scraper.excluded_dirs), len(EXCLUDED_DIRS) + 3) @patch("skill_seekers.cli.github_scraper.Github") - def test_extend_excludes_additional_dirs(self, mock_github): + def test_extend_excludes_additional_dirs(self, _mock_github): """Test that additional directories are actually excluded.""" config = {"repo": "owner/repo", "exclude_dirs_additional": ["legacy", "deprecated"]} @@ -96,7 +96,7 @@ class TestExcludedDirsAdditional(unittest.TestCase): self.assertFalse(scraper.should_exclude_dir("src")) @patch("skill_seekers.cli.github_scraper.Github") - def test_extend_with_empty_list(self, mock_github): + def test_extend_with_empty_list(self, _mock_github): """Test that empty additional list works correctly.""" config = {"repo": "owner/repo", "exclude_dirs_additional": []} @@ -110,7 +110,7 @@ class TestExcludedDirsReplace(unittest.TestCase): """Test exclude_dirs (replace mode).""" @patch("skill_seekers.cli.github_scraper.Github") - def test_replace_with_custom_list(self, mock_github): + def test_replace_with_custom_list(self, _mock_github): """Test replacing default exclusions entirely.""" config = {"repo": "owner/repo", "exclude_dirs": ["node_modules", "custom_vendor"]} @@ -121,7 +121,7 @@ class TestExcludedDirsReplace(unittest.TestCase): self.assertEqual(len(scraper.excluded_dirs), 2) @patch("skill_seekers.cli.github_scraper.Github") - def test_replace_excludes_only_specified_dirs(self, mock_github): + def test_replace_excludes_only_specified_dirs(self, _mock_github): """Test that only specified directories are excluded in replace mode.""" config = {"repo": "owner/repo", "exclude_dirs": ["node_modules", ".git"]} @@ -141,7 +141,7 @@ class TestExcludedDirsReplace(unittest.TestCase): self.assertFalse(scraper.should_exclude_dir("src")) @patch("skill_seekers.cli.github_scraper.Github") - def test_replace_with_empty_list(self, mock_github): + def test_replace_with_empty_list(self, _mock_github): """Test that empty replace list allows all directories (except dot-prefixed).""" config = {"repo": "owner/repo", "exclude_dirs": []} @@ -164,7 +164,7 @@ class TestExcludedDirsPrecedence(unittest.TestCase): """Test precedence when both options provided.""" @patch("skill_seekers.cli.github_scraper.Github") - def test_replace_takes_precedence_over_additional(self, mock_github): + def test_replace_takes_precedence_over_additional(self, _mock_github): """Test that exclude_dirs takes precedence over exclude_dirs_additional.""" config = { "repo": "owner/repo", @@ -184,7 +184,7 @@ class TestExcludedDirsEdgeCases(unittest.TestCase): """Test edge cases and error handling.""" @patch("skill_seekers.cli.github_scraper.Github") - def test_duplicate_exclusions_in_additional(self, mock_github): + def test_duplicate_exclusions_in_additional(self, _mock_github): """Test that duplicates in additional list are handled (set deduplication).""" config = { "repo": "owner/repo", @@ -207,7 +207,7 @@ class TestExcludedDirsEdgeCases(unittest.TestCase): ) @patch("skill_seekers.cli.github_scraper.Github") - def test_case_sensitive_exclusions(self, mock_github): + def test_case_sensitive_exclusions(self, _mock_github): """Test that exclusions are case-sensitive.""" config = {"repo": "owner/repo", "exclude_dirs": ["Venv", "NODE_MODULES"]} @@ -224,7 +224,7 @@ class TestExcludedDirsWithLocalRepo(unittest.TestCase): """Test exclude_dirs integration with local_repo_path.""" @patch("skill_seekers.cli.github_scraper.Github") - def test_exclude_dirs_with_local_repo_path(self, mock_github): + def test_exclude_dirs_with_local_repo_path(self, _mock_github): """Test that exclude_dirs works when local_repo_path is provided.""" config = { "repo": "owner/repo", @@ -245,7 +245,7 @@ class TestExcludedDirsWithLocalRepo(unittest.TestCase): self.assertTrue(scraper.should_exclude_dir("venv")) @patch("skill_seekers.cli.github_scraper.Github") - def test_replace_mode_with_local_repo_path(self, mock_github): + def test_replace_mode_with_local_repo_path(self, _mock_github): """Test that replace mode works with local_repo_path.""" config = { "repo": "owner/repo", @@ -266,11 +266,11 @@ class TestExcludedDirsLogging(unittest.TestCase): @patch("skill_seekers.cli.github_scraper.Github") @patch("skill_seekers.cli.github_scraper.logger") - def test_extend_mode_logs_info(self, mock_logger, mock_github): + def test_extend_mode_logs_info(self, mock_logger, _mock_github): """Test that extend mode logs INFO level message.""" config = {"repo": "owner/repo", "exclude_dirs_additional": ["custom1", "custom2"]} - scraper = GitHubScraper(config) + _scraper = GitHubScraper(config) # Should have logged INFO message # Check that info was called with a message about adding custom exclusions @@ -279,11 +279,11 @@ class TestExcludedDirsLogging(unittest.TestCase): @patch("skill_seekers.cli.github_scraper.Github") @patch("skill_seekers.cli.github_scraper.logger") - def test_replace_mode_logs_warning(self, mock_logger, mock_github): + def test_replace_mode_logs_warning(self, mock_logger, _mock_github): """Test that replace mode logs WARNING level message.""" config = {"repo": "owner/repo", "exclude_dirs": ["only", "these"]} - scraper = GitHubScraper(config) + _scraper = GitHubScraper(config) # Should have logged WARNING message warning_calls = [str(call) for call in mock_logger.warning.call_args_list] @@ -296,11 +296,11 @@ class TestExcludedDirsLogging(unittest.TestCase): @patch("skill_seekers.cli.github_scraper.Github") @patch("skill_seekers.cli.github_scraper.logger") - def test_no_config_no_logging(self, mock_logger, mock_github): + def test_no_config_no_logging(self, mock_logger, _mock_github): """Test that default mode doesn't log exclude_dirs messages.""" config = {"repo": "owner/repo"} - scraper = GitHubScraper(config) + _scraper = GitHubScraper(config) # Should NOT have logged any exclude_dirs messages info_calls = [str(call) for call in mock_logger.info.call_args_list] @@ -318,7 +318,7 @@ class TestExcludedDirsTypeHandling(unittest.TestCase): """Test type handling for exclude_dirs configuration.""" @patch("skill_seekers.cli.github_scraper.Github") - def test_exclude_dirs_with_tuple(self, mock_github): + def test_exclude_dirs_with_tuple(self, _mock_github): """Test that tuples are converted to sets correctly.""" config = { "repo": "owner/repo", @@ -331,7 +331,7 @@ class TestExcludedDirsTypeHandling(unittest.TestCase): self.assertEqual(scraper.excluded_dirs, {"node_modules", "build"}) @patch("skill_seekers.cli.github_scraper.Github") - def test_exclude_dirs_additional_with_set(self, mock_github): + def test_exclude_dirs_additional_with_set(self, _mock_github): """Test that sets work correctly for exclude_dirs_additional.""" config = { "repo": "owner/repo", diff --git a/tests/test_git_repo.py b/tests/test_git_repo.py index 449c10f..cf64362 100644 --- a/tests/test_git_repo.py +++ b/tests/test_git_repo.py @@ -182,7 +182,7 @@ class TestCloneOrPull: mock_repo.remotes.origin = mock_origin mock_repo_class.return_value = mock_repo - result = git_repo.clone_or_pull( + _result = git_repo.clone_or_pull( source_name="test-source", git_url="https://github.com/org/repo.git", token="ghp_token123", diff --git a/tests/test_git_sources_e2e.py b/tests/test_git_sources_e2e.py index 92af08e..773e48f 100644 --- a/tests/test_git_sources_e2e.py +++ b/tests/test_git_sources_e2e.py @@ -493,7 +493,7 @@ class TestGitSourcesE2E: 4. Modify one cache 5. Verify other cache is unaffected """ - config_dir = temp_dirs[1] + _config_dir = temp_dirs[1] repo_dir, repo = temp_git_repo cache_dir_1 = tempfile.mkdtemp(prefix="ss_cache1_") diff --git a/tests/test_github_fetcher.py b/tests/test_github_fetcher.py index 9cff317..9e4247f 100644 --- a/tests/test_github_fetcher.py +++ b/tests/test_github_fetcher.py @@ -382,7 +382,7 @@ class TestIntegration: mock_run.return_value = Mock(returncode=0, stderr="") # Mock GitHub API calls - def api_side_effect(*args, **kwargs): + def api_side_effect(*args, **_kwargs): url = args[0] mock_response = Mock() mock_response.raise_for_status = Mock() diff --git a/tests/test_github_scraper.py b/tests/test_github_scraper.py index c0bee2d..0f72b0e 100644 --- a/tests/test_github_scraper.py +++ b/tests/test_github_scraper.py @@ -65,7 +65,7 @@ class TestGitHubScraperInitialization(unittest.TestCase): config = {"repo": "facebook/react", "name": "react", "github_token": "test_token_123"} with patch("skill_seekers.cli.github_scraper.Github") as mock_github: - scraper = self.GitHubScraper(config) + _scraper = self.GitHubScraper(config) mock_github.assert_called_once_with("test_token_123") def test_init_with_token_from_env(self): @@ -74,7 +74,7 @@ class TestGitHubScraperInitialization(unittest.TestCase): with patch.dict(os.environ, {"GITHUB_TOKEN": "env_token_456"}): with patch("skill_seekers.cli.github_scraper.Github") as mock_github: - scraper = self.GitHubScraper(config) + _scraper = self.GitHubScraper(config) mock_github.assert_called_once_with("env_token_456") def test_init_without_token(self): diff --git a/tests/test_install_agent.py b/tests/test_install_agent.py index a2157b5..48b9310 100644 --- a/tests/test_install_agent.py +++ b/tests/test_install_agent.py @@ -325,7 +325,7 @@ class TestInstallToAllAgents: """Test that install_to_all_agents attempts all 11 agents.""" with tempfile.TemporaryDirectory() as agent_tmpdir: - def mock_get_agent_path(agent_name, project_root=None): + def mock_get_agent_path(agent_name, _project_root=None): return Path(agent_tmpdir) / f".{agent_name}" / "skills" with patch( @@ -344,7 +344,7 @@ class TestInstallToAllAgents: # All should succeed in dry-run mode assert len(results) == 11 - for agent_name, (success, message) in results.items(): + for _agent_name, (success, message) in results.items(): assert success is True assert "DRY RUN" in message @@ -356,7 +356,7 @@ class TestInstallToAllAgents: agent_dir = Path(agent_tmpdir) / f".{agent}" / "skills" / "test-skill" agent_dir.mkdir(parents=True) - def mock_get_agent_path(agent_name, project_root=None): + def mock_get_agent_path(agent_name, _project_root=None): return Path(agent_tmpdir) / f".{agent_name}" / "skills" with patch( @@ -365,13 +365,13 @@ class TestInstallToAllAgents: # Without force - should fail results_no_force = install_to_all_agents(self.skill_dir, force=False) # All should fail because directories exist - for agent_name, (success, message) in results_no_force.items(): + for _agent_name, (success, message) in results_no_force.items(): assert success is False assert "already installed" in message.lower() # With force - should succeed results_with_force = install_to_all_agents(self.skill_dir, force=True) - for agent_name, (success, message) in results_with_force.items(): + for _agent_name, (success, message) in results_with_force.items(): assert success is True def test_install_to_all_returns_results(self): @@ -426,7 +426,7 @@ class TestInstallAgentCLI: """Test that --dry-run flag works correctly.""" with tempfile.TemporaryDirectory() as agent_tmpdir: - def mock_get_agent_path(agent_name, project_root=None): + def mock_get_agent_path(agent_name, _project_root=None): return Path(agent_tmpdir) / f".{agent_name}" / "skills" with patch( @@ -446,7 +446,7 @@ class TestInstallAgentCLI: """Test end-to-end CLI execution.""" with tempfile.TemporaryDirectory() as agent_tmpdir: - def mock_get_agent_path(agent_name, project_root=None): + def mock_get_agent_path(agent_name, _project_root=None): return Path(agent_tmpdir) / f".{agent_name}" / "skills" with patch( @@ -468,7 +468,7 @@ class TestInstallAgentCLI: """Test CLI with --agent all.""" with tempfile.TemporaryDirectory() as agent_tmpdir: - def mock_get_agent_path(agent_name, project_root=None): + def mock_get_agent_path(agent_name, _project_root=None): return Path(agent_tmpdir) / f".{agent_name}" / "skills" with patch( diff --git a/tests/test_install_skill_e2e.py b/tests/test_install_skill_e2e.py index d209efb..6abd2df 100644 --- a/tests/test_install_skill_e2e.py +++ b/tests/test_install_skill_e2e.py @@ -523,7 +523,7 @@ class TestInstallSkillE2E_RealFiles: assert "WORKFLOW COMPLETE" in output or "βœ…" in output # The output directory should exist (created by scraping) - output_dir = tmp_path / "output" + _output_dir = tmp_path / "output" # Note: Directory existence is not guaranteed in all cases (mocked package might not create files) # So we mainly verify the workflow logic worked assert "Enhancement complete" in output diff --git a/tests/test_integration.py b/tests/test_integration.py index 2610ce9..7688962 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -34,7 +34,7 @@ class TestDryRunMode(unittest.TestCase): def test_dry_run_no_directories_created(self): """Test that dry-run mode doesn't create directories""" - converter = DocToSkillConverter(self.config, dry_run=True) + _converter = DocToSkillConverter(self.config, dry_run=True) # Check directories were NOT created data_dir = Path(f"output/{self.config['name']}_data") @@ -57,7 +57,7 @@ class TestDryRunMode(unittest.TestCase): def test_normal_mode_creates_directories(self): """Test that normal mode creates directories""" - converter = DocToSkillConverter(self.config, dry_run=False) + _converter = DocToSkillConverter(self.config, dry_run=False) # Check directories WERE created data_dir = Path(f"output/{self.config['name']}_data") @@ -522,7 +522,7 @@ app.use('*', cors()) mock_head.return_value = mock_head_response # Mock downloads - def mock_download(url, **kwargs): + def mock_download(url, **_kwargs): response = Mock() response.status_code = 200 if "llms-full.txt" in url: @@ -540,7 +540,7 @@ app.use('*', cors()) from skill_seekers.cli.doc_scraper import DocToSkillConverter as DocumentationScraper scraper = DocumentationScraper(config, dry_run=False) - result = scraper._try_llms_txt() + _result = scraper._try_llms_txt() # Verify all 3 files created refs_dir = Path(f"output/{config['name']}/references") diff --git a/tests/test_issue_219_e2e.py b/tests/test_issue_219_e2e.py index 42fb3cb..2e3854a 100644 --- a/tests/test_issue_219_e2e.py +++ b/tests/test_issue_219_e2e.py @@ -227,7 +227,7 @@ class TestIssue219Problem3CustomAPIEndpoints(unittest.TestCase): patch("skill_seekers.cli.enhance_skill.anthropic.Anthropic") as mock_anthropic, ): # Create enhancer - enhancer = SkillEnhancer(self.skill_dir) + _enhancer = SkillEnhancer(self.skill_dir) # VERIFY: Anthropic client called with custom base_url mock_anthropic.assert_called_once() diff --git a/tests/test_llms_txt_detector.py b/tests/test_llms_txt_detector.py index 3064d6b..c278ab7 100644 --- a/tests/test_llms_txt_detector.py +++ b/tests/test_llms_txt_detector.py @@ -59,7 +59,7 @@ def test_detect_all_variants(): with patch("skill_seekers.cli.llms_txt_detector.requests.head") as mock_head: # Mock responses for different variants - def mock_response(url, **kwargs): + def mock_response(url, **_kwargs): response = Mock() # All 3 variants exist for Hono if "llms-full.txt" in url or "llms.txt" in url or "llms-small.txt" in url: diff --git a/tests/test_mcp_fastmcp.py b/tests/test_mcp_fastmcp.py index 85a88ee..a6642d4 100644 --- a/tests/test_mcp_fastmcp.py +++ b/tests/test_mcp_fastmcp.py @@ -219,7 +219,7 @@ class TestConfigTools: result = await server_fastmcp.generate_config(**args) assert isinstance(result, str) - async def test_list_configs(self, temp_dirs): + async def test_list_configs(self, _temp_dirs): """Test listing available configs.""" result = await server_fastmcp.list_configs() @@ -850,7 +850,7 @@ class TestTypeValidation: result = await server_fastmcp.estimate_pages(config_path=str(sample_config)) assert isinstance(result, str) - async def test_all_tools_return_strings(self, sample_config, temp_dirs): + async def test_all_tools_return_strings(self, sample_config, _temp_dirs): """Test that all tools return string type.""" # Sample a few tools from each category tools_to_test = [ diff --git a/tests/test_mcp_git_sources.py b/tests/test_mcp_git_sources.py index fb54444..ff82ade 100644 --- a/tests/test_mcp_git_sources.py +++ b/tests/test_mcp_git_sources.py @@ -272,7 +272,7 @@ class TestFetchConfigModes: class TestSourceManagementTools: """Test add/list/remove config source tools.""" - async def test_add_config_source(self, temp_dirs): + async def test_add_config_source(self, _temp_dirs): """Test adding a new config source.""" from skill_seekers.mcp.server import add_config_source_tool diff --git a/tests/test_mcp_server.py b/tests/test_mcp_server.py index 71a9fdd..ef151d5 100644 --- a/tests/test_mcp_server.py +++ b/tests/test_mcp_server.py @@ -153,7 +153,7 @@ class TestGenerateConfigTool(unittest.IsolatedAsyncioTestCase): "rate_limit": 1.0, } - result = await skill_seeker_server.generate_config_tool(args) + _result = await skill_seeker_server.generate_config_tool(args) # Verify config has custom options config_path = Path("configs/custom-framework.json") @@ -166,7 +166,7 @@ class TestGenerateConfigTool(unittest.IsolatedAsyncioTestCase): """Test that default values are applied correctly""" args = {"name": "default-test", "url": "https://test.dev/", "description": "Test defaults"} - result = await skill_seeker_server.generate_config_tool(args) + _result = await skill_seeker_server.generate_config_tool(args) config_path = Path("configs/default-test.json") with open(config_path) as f: @@ -228,7 +228,7 @@ class TestEstimatePagesTool(unittest.IsolatedAsyncioTestCase): args = {"config_path": str(self.config_path), "max_discovery": 500} - result = await skill_seeker_server.estimate_pages_tool(args) + _result = await skill_seeker_server.estimate_pages_tool(args) # Verify subprocess was called with correct args mock_streaming.assert_called_once() @@ -296,7 +296,7 @@ class TestScrapeDocsTool(unittest.IsolatedAsyncioTestCase): args = {"config_path": str(self.config_path), "skip_scrape": True} - result = await skill_seeker_server.scrape_docs_tool(args) + _result = await skill_seeker_server.scrape_docs_tool(args) # Verify --skip-scrape was passed call_args = mock_streaming.call_args[0][0] @@ -310,7 +310,7 @@ class TestScrapeDocsTool(unittest.IsolatedAsyncioTestCase): args = {"config_path": str(self.config_path), "dry_run": True} - result = await skill_seeker_server.scrape_docs_tool(args) + _result = await skill_seeker_server.scrape_docs_tool(args) call_args = mock_streaming.call_args[0][0] self.assertIn("--dry-run", call_args) @@ -323,7 +323,7 @@ class TestScrapeDocsTool(unittest.IsolatedAsyncioTestCase): args = {"config_path": str(self.config_path), "enhance_local": True} - result = await skill_seeker_server.scrape_docs_tool(args) + _result = await skill_seeker_server.scrape_docs_tool(args) call_args = mock_streaming.call_args[0][0] self.assertIn("--enhance-local", call_args) diff --git a/tests/test_pdf_extractor.py b/tests/test_pdf_extractor.py index 25027cd..c0e321e 100644 --- a/tests/test_pdf_extractor.py +++ b/tests/test_pdf_extractor.py @@ -382,7 +382,7 @@ class TestCodeDetectionMethods(unittest.TestCase): def test_pattern_based_detection(self): """Test pattern-based code detection""" - extractor = self.PDFExtractor.__new__(self.PDFExtractor) + _extractor = self.PDFExtractor.__new__(self.PDFExtractor) # Should detect function definitions text = "Here is an example:\ndef calculate(x, y):\n return x + y" @@ -394,7 +394,7 @@ class TestCodeDetectionMethods(unittest.TestCase): def test_indent_based_detection(self): """Test indent-based code detection""" - extractor = self.PDFExtractor.__new__(self.PDFExtractor) + _extractor = self.PDFExtractor.__new__(self.PDFExtractor) # Code with consistent indentation indented_text = """ def foo(): diff --git a/tests/test_real_world_fastmcp.py b/tests/test_real_world_fastmcp.py index 549ec95..9e2e12e 100644 --- a/tests/test_real_world_fastmcp.py +++ b/tests/test_real_world_fastmcp.py @@ -373,7 +373,7 @@ class TestRealWorldFastMCP: print("\nβœ… Router generation verified!\n") - def test_04_quality_metrics(self, fastmcp_analysis, output_dir): + def test_04_quality_metrics(self, fastmcp_analysis, output_dir): # noqa: ARG002 """Test that quality metrics meet architecture targets.""" print("\n" + "=" * 80) print("TEST 4: Quality Metrics Validation") diff --git a/tests/test_server_fastmcp_http.py b/tests/test_server_fastmcp_http.py index 0e49c12..bbf150c 100644 --- a/tests/test_server_fastmcp_http.py +++ b/tests/test_server_fastmcp_http.py @@ -31,7 +31,7 @@ class TestFastMCPHTTP: from starlette.responses import JSONResponse from starlette.routing import Route - async def health_check(request): + async def health_check(_request): return JSONResponse( { "status": "healthy", diff --git a/tests/test_smart_summarization.py b/tests/test_smart_summarization.py index 02b77ef..b577456 100644 --- a/tests/test_smart_summarization.py +++ b/tests/test_smart_summarization.py @@ -217,7 +217,7 @@ Another paragraph of content. enhancer = LocalSkillEnhancer(skill_dir) # Mock the headless run to avoid actually calling Claude - def mock_headless(prompt_file, timeout): + def mock_headless(_prompt_file, _timeout): return True monkeypatch.setattr(enhancer, "_run_headless", mock_headless) diff --git a/tests/test_source_manager.py b/tests/test_source_manager.py index 6f7fd8d..1c49501 100644 --- a/tests/test_source_manager.py +++ b/tests/test_source_manager.py @@ -38,7 +38,7 @@ class TestSourceManagerInit: def test_init_creates_registry_file(self, temp_config_dir): """Test that initialization creates registry file.""" - manager = SourceManager(config_dir=str(temp_config_dir)) + _manager = SourceManager(config_dir=str(temp_config_dir)) registry_file = temp_config_dir / "sources.json" assert registry_file.exists() @@ -61,7 +61,7 @@ class TestSourceManagerInit: json.dump(existing_data, f) # Initialize manager - manager = SourceManager(config_dir=str(temp_config_dir)) + _manager = SourceManager(config_dir=str(temp_config_dir)) # Verify data preserved with open(registry_file) as f: diff --git a/tests/test_swift_detection.py b/tests/test_swift_detection.py index fd2c81a..fa6894e 100644 --- a/tests/test_swift_detection.py +++ b/tests/test_swift_detection.py @@ -1308,7 +1308,7 @@ class TestSwiftErrorHandling: ] # Create new detector - should skip malformed pattern - detector = LanguageDetector() + _detector = LanguageDetector() # Verify error was logged assert any( @@ -1367,7 +1367,7 @@ class TestSwiftErrorHandling: ] # Should log TypeError and skip - detector = LanguageDetector() + _detector = LanguageDetector() # Verify TypeError was logged assert any( diff --git a/tests/test_terminal_detection.py b/tests/test_terminal_detection.py index 915dd93..d400cee 100644 --- a/tests/test_terminal_detection.py +++ b/tests/test_terminal_detection.py @@ -167,7 +167,7 @@ class TestDetectTerminalApp(unittest.TestCase): # Run enhancer in interactive mode (not headless) enhancer = LocalSkillEnhancer(skill_dir) - result = enhancer.run(headless=False) + _result = enhancer.run(headless=False) # Verify Popen was called self.assertTrue(mock_popen.called) diff --git a/tests/test_unified.py b/tests/test_unified.py index 95b6a5d..8c890b7 100644 --- a/tests/test_unified.py +++ b/tests/test_unified.py @@ -46,7 +46,7 @@ def test_detect_unified_format(): try: validator = ConfigValidator(config_path) - assert validator.is_unified == True + assert validator.is_unified finally: os.unlink(config_path) @@ -105,7 +105,7 @@ def test_needs_api_merge(): } validator = ConfigValidator(config_needs_merge) - assert validator.needs_api_merge() == True + assert validator.needs_api_merge() # Config with only docs config_no_merge = { @@ -545,8 +545,8 @@ def test_full_workflow_unified_config(): # Validate config validator = ConfigValidator(config) validator.validate() - assert validator.is_unified == True - assert validator.needs_api_merge() == True + assert validator.is_unified + assert validator.needs_api_merge() def test_config_file_validation(): @@ -562,7 +562,7 @@ def test_config_file_validation(): try: validator = validate_config(config_path) - assert validator.is_unified == True + assert validator.is_unified finally: os.unlink(config_path) diff --git a/tests/test_unified_analyzer.py b/tests/test_unified_analyzer.py index 609b3a8..84cbf26 100644 --- a/tests/test_unified_analyzer.py +++ b/tests/test_unified_analyzer.py @@ -376,7 +376,7 @@ class TestTokenHandling: (tmp_path / "main.py").write_text("code") analyzer = UnifiedCodebaseAnalyzer() - result = analyzer.analyze(source="https://github.com/test/repo", depth="basic") + _result = analyzer.analyze(source="https://github.com/test/repo", depth="basic") # Verify fetcher was created with token mock_fetcher_class.assert_called_once() @@ -401,7 +401,7 @@ class TestTokenHandling: (tmp_path / "main.py").write_text("code") analyzer = UnifiedCodebaseAnalyzer(github_token="custom_token") - result = analyzer.analyze(source="https://github.com/test/repo", depth="basic") + _result = analyzer.analyze(source="https://github.com/test/repo", depth="basic") mock_fetcher_class.assert_called_once() args = mock_fetcher_class.call_args[0]