style: Auto-format 48 files with ruff format

- Fixed formatting to comply with ruff standards
- No functional changes, only formatting/style
- Completes CI/CD pipeline formatting requirements
This commit is contained in:
yusyus
2026-02-15 20:24:32 +03:00
parent 83b03d9f9f
commit 57061b7daf
48 changed files with 626 additions and 548 deletions

View File

@@ -6,21 +6,21 @@ and routes to the correct scrapers without actually scraping.
import pytest
class TestCreateCommandBasic:
"""Basic integration tests for create command (dry-run mode)."""
def test_create_command_help(self):
"""Test that create command help works."""
import subprocess
result = subprocess.run(
['skill-seekers', 'create', '--help'],
capture_output=True,
text=True
["skill-seekers", "create", "--help"], capture_output=True, text=True
)
assert result.returncode == 0
assert 'Auto-detects source type' in result.stdout
assert 'auto-detected' in result.stdout
assert '--help-web' in result.stdout
assert "Auto-detects source type" in result.stdout
assert "auto-detected" in result.stdout
assert "--help-web" in result.stdout
def test_create_detects_web_url(self):
"""Test that web URLs are detected and routed correctly."""
@@ -31,11 +31,12 @@ class TestCreateCommandBasic:
def test_create_detects_github_repo(self):
"""Test that GitHub repos are detected."""
import subprocess
result = subprocess.run(
['skill-seekers', 'create', 'facebook/react', '--help'],
["skill-seekers", "create", "facebook/react", "--help"],
capture_output=True,
text=True,
timeout=10
timeout=10,
)
# Just verify help works - actual scraping would need API token
assert result.returncode in [0, 2] # 0 for success, 2 for argparse help
@@ -49,10 +50,10 @@ class TestCreateCommandBasic:
test_dir.mkdir()
result = subprocess.run(
['skill-seekers', 'create', str(test_dir), '--help'],
["skill-seekers", "create", str(test_dir), "--help"],
capture_output=True,
text=True,
timeout=10
timeout=10,
)
# Verify help works
assert result.returncode in [0, 2]
@@ -66,10 +67,10 @@ class TestCreateCommandBasic:
pdf_file.touch()
result = subprocess.run(
['skill-seekers', 'create', str(pdf_file), '--help'],
["skill-seekers", "create", str(pdf_file), "--help"],
capture_output=True,
text=True,
timeout=10
timeout=10,
)
# Verify help works
assert result.returncode in [0, 2]
@@ -81,17 +82,14 @@ class TestCreateCommandBasic:
# Create a minimal config file
config_file = tmp_path / "test.json"
config_data = {
"name": "test",
"base_url": "https://example.com/"
}
config_data = {"name": "test", "base_url": "https://example.com/"}
config_file.write_text(json.dumps(config_data))
result = subprocess.run(
['skill-seekers', 'create', str(config_file), '--help'],
["skill-seekers", "create", str(config_file), "--help"],
capture_output=True,
text=True,
timeout=10
timeout=10,
)
# Verify help works
assert result.returncode in [0, 2]
@@ -105,20 +103,19 @@ class TestCreateCommandBasic:
def test_create_supports_universal_flags(self):
"""Test that universal flags are accepted."""
import subprocess
result = subprocess.run(
['skill-seekers', 'create', '--help'],
capture_output=True,
text=True,
timeout=10
["skill-seekers", "create", "--help"], capture_output=True, text=True, timeout=10
)
assert result.returncode == 0
# Check that universal flags are present
assert '--name' in result.stdout
assert '--enhance' in result.stdout
assert '--chunk-for-rag' in result.stdout
assert '--preset' in result.stdout
assert '--dry-run' in result.stdout
assert "--name" in result.stdout
assert "--enhance" in result.stdout
assert "--chunk-for-rag" in result.stdout
assert "--preset" in result.stdout
assert "--dry-run" in result.stdout
class TestBackwardCompatibility:
"""Test that old commands still work."""
@@ -126,53 +123,45 @@ class TestBackwardCompatibility:
def test_scrape_command_still_works(self):
"""Old scrape command should still function."""
import subprocess
result = subprocess.run(
['skill-seekers', 'scrape', '--help'],
capture_output=True,
text=True,
timeout=10
["skill-seekers", "scrape", "--help"], capture_output=True, text=True, timeout=10
)
assert result.returncode == 0
assert 'scrape' in result.stdout.lower()
assert "scrape" in result.stdout.lower()
def test_github_command_still_works(self):
"""Old github command should still function."""
import subprocess
result = subprocess.run(
['skill-seekers', 'github', '--help'],
capture_output=True,
text=True,
timeout=10
["skill-seekers", "github", "--help"], capture_output=True, text=True, timeout=10
)
assert result.returncode == 0
assert 'github' in result.stdout.lower()
assert "github" in result.stdout.lower()
def test_analyze_command_still_works(self):
"""Old analyze command should still function."""
import subprocess
result = subprocess.run(
['skill-seekers', 'analyze', '--help'],
capture_output=True,
text=True,
timeout=10
["skill-seekers", "analyze", "--help"], capture_output=True, text=True, timeout=10
)
assert result.returncode == 0
assert 'analyze' in result.stdout.lower()
assert "analyze" in result.stdout.lower()
def test_main_help_shows_all_commands(self):
"""Main help should show both old and new commands."""
import subprocess
result = subprocess.run(
['skill-seekers', '--help'],
capture_output=True,
text=True,
timeout=10
["skill-seekers", "--help"], capture_output=True, text=True, timeout=10
)
assert result.returncode == 0
# Should show create command
assert 'create' in result.stdout
assert "create" in result.stdout
# Should still show old commands
assert 'scrape' in result.stdout
assert 'github' in result.stdout
assert 'analyze' in result.stdout
assert "scrape" in result.stdout
assert "github" in result.stdout
assert "analyze" in result.stdout