Skip to content

Commit

Permalink
Add ruff actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ka-sarthak committed Aug 12, 2024
1 parent 85b1d4a commit db088ec
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,18 @@ jobs:
run: |
pytest
ruff-linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
args: "check ."

ruff-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
args: "format . --check"
14 changes: 9 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies = [
[project.optional-dependencies]
dev = [
"pytest",
"ruff",
"structlog>=22.3.0",
]

Expand All @@ -40,6 +41,14 @@ file = "LICENSE"

[tool.ruff]
include = ["src/*.py", "tests/*.py"]

exclude = ["dependencies"]

# Same as Black.
line-length = 88
indent-width = 4

[tool.ruff.lint]
select = [
"E", # pycodestyle
"W", # pycodestyle
Expand All @@ -61,11 +70,6 @@ ignore = [
"PLR5501", # else-if-used
]
fixable = ["ALL"]
exclude = ["dependencies"]

# Same as Black.
line-length = 88
indent-width = 4

[tool.ruff.format]
# use single quotes for strings.
Expand Down

0 comments on commit db088ec

Please sign in to comment.