fix: Resolve all linting errors from ruff
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>
This commit is contained in:
@@ -6,7 +6,6 @@ Tests the three-tier argument system:
|
||||
3. Advanced arguments
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from skill_seekers.cli.arguments.create import (
|
||||
UNIVERSAL_ARGUMENTS,
|
||||
WEB_ARGUMENTS,
|
||||
@@ -20,7 +19,6 @@ from skill_seekers.cli.arguments.create import (
|
||||
add_create_arguments,
|
||||
)
|
||||
|
||||
|
||||
class TestUniversalArguments:
|
||||
"""Test universal argument definitions."""
|
||||
|
||||
@@ -51,7 +49,6 @@ class TestUniversalArguments:
|
||||
assert 'kwargs' in arg_def
|
||||
assert 'help' in arg_def['kwargs']
|
||||
|
||||
|
||||
class TestSourceSpecificArguments:
|
||||
"""Test source-specific argument definitions."""
|
||||
|
||||
@@ -96,7 +93,6 @@ class TestSourceSpecificArguments:
|
||||
assert flag not in all_flags, f"Duplicate flag: {flag}"
|
||||
all_flags.add(flag)
|
||||
|
||||
|
||||
class TestAdvancedArguments:
|
||||
"""Test advanced/rare argument definitions."""
|
||||
|
||||
@@ -106,7 +102,6 @@ class TestAdvancedArguments:
|
||||
assert 'no_rate_limit' in ADVANCED_ARGUMENTS
|
||||
assert 'interactive_enhancement' in ADVANCED_ARGUMENTS
|
||||
|
||||
|
||||
class TestArgumentHelpers:
|
||||
"""Test helper functions."""
|
||||
|
||||
@@ -148,7 +143,6 @@ class TestArgumentHelpers:
|
||||
args = get_source_specific_arguments('unknown')
|
||||
assert args == {}
|
||||
|
||||
|
||||
class TestCompatibleArguments:
|
||||
"""Test compatible argument detection."""
|
||||
|
||||
@@ -217,7 +211,6 @@ class TestCompatibleArguments:
|
||||
assert 'repo' not in compatible
|
||||
assert 'directory' not in compatible
|
||||
|
||||
|
||||
class TestAddCreateArguments:
|
||||
"""Test add_create_arguments function."""
|
||||
|
||||
@@ -284,7 +277,6 @@ class TestAddCreateArguments:
|
||||
args = parser.parse_args(['some_source'])
|
||||
assert args.source == 'some_source'
|
||||
|
||||
|
||||
class TestNoDuplicates:
|
||||
"""Test that there are no duplicate arguments across tiers."""
|
||||
|
||||
@@ -320,7 +312,6 @@ class TestNoDuplicates:
|
||||
assert len(github_flags & pdf_flags) == 0
|
||||
assert len(local_flags & pdf_flags) == 0
|
||||
|
||||
|
||||
class TestArgumentQuality:
|
||||
"""Test argument definition quality."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user