Fix 145 linting errors across CLI refactor code: Type annotation modernization (Python 3.9+): - Replace typing.Dict with dict - Replace typing.List with list - Replace typing.Set with set - Replace Optional[X] with X | None Code quality improvements: - Remove trailing whitespace (W291) - Remove whitespace from blank lines (W293) - Remove unused imports (F401) - Use dictionary lookup instead of if-elif chains (SIM116) - Combine nested if statements (SIM102) Files fixed (45 files): - src/skill_seekers/cli/arguments/*.py (10 files) - src/skill_seekers/cli/parsers/*.py (24 files) - src/skill_seekers/cli/presets/*.py (4 files) - src/skill_seekers/cli/create_command.py - src/skill_seekers/cli/source_detector.py - src/skill_seekers/cli/github_scraper.py - tests/test_*.py (5 test files) All files now pass ruff linting checks. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
35 lines
1.0 KiB
Python
35 lines
1.0 KiB
Python
"""Scrape subcommand parser.
|
|
|
|
Uses shared argument definitions from arguments.scrape to ensure
|
|
consistency with the standalone doc_scraper module.
|
|
"""
|
|
|
|
from .base import SubcommandParser
|
|
from skill_seekers.cli.arguments.scrape import add_scrape_arguments
|
|
|
|
class ScrapeParser(SubcommandParser):
|
|
"""Parser for scrape subcommand."""
|
|
|
|
@property
|
|
def name(self) -> str:
|
|
return "scrape"
|
|
|
|
@property
|
|
def help(self) -> str:
|
|
return "Scrape documentation website"
|
|
|
|
@property
|
|
def description(self) -> str:
|
|
return "Scrape documentation website and generate skill"
|
|
|
|
def add_arguments(self, parser):
|
|
"""Add scrape-specific arguments.
|
|
|
|
Uses shared argument definitions to ensure consistency
|
|
with doc_scraper.py (standalone scraper).
|
|
"""
|
|
# Add all scrape arguments from shared definitions
|
|
# This ensures the unified CLI has exactly the same arguments
|
|
# as the standalone scraper - they CANNOT drift out of sync
|
|
add_scrape_arguments(parser)
|