Skip to content

Commit 5685d3c

Browse files
committed
fixed linting ruff
Signed-off-by: aritroCoder <ogcodinggod@gmail.com>
1 parent 882a859 commit 5685d3c

18 files changed

Lines changed: 36 additions & 14 deletions

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: uv run black --check src/ tests/
2727

2828
- name: Run ruff
29-
run: uv run ruff check src/ tests/
29+
run: uv run ruff check src/ tests/ --fix
3030

3131
- name: Run mypy
3232
run: uv run mypy src/

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,12 @@ GROQ_API_KEY=your_key uv run pytest tests/integration/test_error_scenarios.py::t
429429
uv run pytest -m "not integration"
430430
```
431431

432+
**Run github actions locally**
433+
```bash
434+
act -j test -W .github/workflows/test.yml
435+
```
436+
Run `brew install act` if `act` is not installed
437+
432438
**Important Notes:**
433439
- Integration tests make real API calls and consume API quota
434440
- Tests will be skipped automatically if `GROQ_API_KEY` is not set

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
from typing import Union
77

88
import pytest
9-
from promptshift import Client
109
from pydantic import BaseModel
1110

11+
from promptshift import Client
12+
1213

1314
# Configure pytest markers
1415
def pytest_configure(config):

tests/integration/test_determinism.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
import os
66

77
import pytest
8-
from promptshift import Client
98
from pydantic import BaseModel
109

10+
from promptshift import Client
11+
1112

1213
class Person(BaseModel):
1314
"""Simple schema for determinism testing."""

tests/integration/test_end_to_end.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
import os
66

77
import pytest
8-
from promptshift import Client
98
from pydantic import BaseModel
109

10+
from promptshift import Client
11+
1112

1213
class Person(BaseModel):
1314
"""Simple test schema for integration testing."""

tests/integration/test_error_scenarios.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
from unittest.mock import patch
1818

1919
import pytest
20+
from pydantic import BaseModel
21+
2022
from promptshift import Client
2123
from promptshift.exceptions import (
2224
ProviderError,
2325
RetryExhaustedError,
2426
SchemaValidationError,
2527
)
26-
from pydantic import BaseModel
2728

2829
# Skip all tests in this module if GROQ_API_KEY is not set
2930
pytestmark = [

tests/integration/test_groq_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
from unittest.mock import Mock, patch
1818

1919
import pytest
20+
from pydantic import BaseModel
21+
2022
from promptshift import Client, UnsupportedModelError
2123
from promptshift.exceptions import RateLimitError, SchemaValidationError
2224
from promptshift.providers.groq import GroqProvider
23-
from pydantic import BaseModel
2425

2526
# Skip all tests in this module if GROQ_API_KEY is not set
2627
pytestmark = pytest.mark.skipif(

tests/integration/test_retry_logging.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
from unittest.mock import Mock
1111

1212
import pytest
13+
from pydantic import BaseModel
14+
1315
from promptshift.exceptions import SchemaValidationError
1416
from promptshift.retry import RetryStrategy
15-
from pydantic import BaseModel
1617

1718

1819
class Person(BaseModel):

tests/performance/test_benchmarks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
from unittest.mock import Mock
1818

1919
import pytest
20+
from pydantic import BaseModel
21+
2022
from promptshift import client as client_module
2123
from promptshift.cache import CacheKeyGenerator, ResponseCache
2224
from promptshift.client import Client
2325
from promptshift.utils import SchemaComplexityAnalyzer
2426
from promptshift.validation import validate_against_schema
25-
from pydantic import BaseModel
2627

2728

2829
# Test schemas for benchmarks

tests/performance/test_memory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
from __future__ import annotations
1212

1313
import pytest
14-
from promptshift.cache import CacheKeyGenerator, ResponseCache
1514
from pydantic import BaseModel
1615

16+
from promptshift.cache import CacheKeyGenerator, ResponseCache
17+
1718

1819
class RealisticPerson(BaseModel):
1920
"""Realistic test schema with multiple string fields for memory testing.

0 commit comments

Comments
 (0)