Skip to content

Commit

Permalink
Use ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
amandeepg committed Jan 7, 2025
1 parent 7f4c9c0 commit 02a8511
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 50 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- name: Install the project
run: uv sync --all-extras --dev --directory serverless/path-summarize-alerts/

- name: "Compile python code with flake8"
run: uv --directory serverless/path-summarize-alerts/ run flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics
- name: "Compile python code with ruff"
run: uv --directory serverless/path-summarize-alerts/ tool run ruff check

- name: "Check python formatting with black"
run: uv --directory serverless/path-summarize-alerts/ run black . --check
- name: "Check python formatting with ruff"
run: uv --directory serverless/path-summarize-alerts/ tool run ruff format --check
1 change: 0 additions & 1 deletion serverless/path-summarize-alerts/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ dependencies = [
"langsmith>=0.2.10",
"aws-xray-sdk>=2.14.0",
"tool>=0.8.0",
"flake8>=7.1.1",
]
2 changes: 1 addition & 1 deletion serverless/path-summarize-alerts/src/lib/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import boto3
from aws_lambda_powertools import Logger, Tracer

from .constants import *
from .constants import SYSTEM_MESSAGE, MODEL_NAME, CACHE_INT
from .models import CacheResponse

logger = Logger()
Expand Down
2 changes: 1 addition & 1 deletion serverless/path-summarize-alerts/src/lib/summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from openai import AsyncOpenAI

from .cache import CacheService
from .constants import *
from .constants import BUCKET_NAME, MODEL_NAME, BUCKET_NAME_RATE_LIMIT, SYSTEM_MESSAGE
from .models import CacheResponse, AlertSummary

logger = Logger()
Expand Down
43 changes: 0 additions & 43 deletions serverless/path-summarize-alerts/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 02a8511

Please sign in to comment.