Skip to content

Commit 8ab145d

Browse files
use ruff
1 parent e2481a5 commit 8ab145d

File tree

6 files changed

+26
-17
lines changed

6 files changed

+26
-17
lines changed

.flake8

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/flake8.yml renamed to .github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Linting validation using flake8
1+
name: Linting validation using ruff
22

33
on:
44
push:
55
branches: [main]
66
pull_request:
77

88
jobs:
9-
build:
9+
lint:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 5
1212
strategy:
@@ -23,6 +23,6 @@ jobs:
2323
run: |
2424
pip install -U pip
2525
pip install -r requirements.txt
26-
- name: Lint with flake8
26+
- name: Lint with ruff
2727
run: |
28-
flake8 *.py
28+
ruff check

.github/workflows/pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77

88
jobs:
9-
build:
9+
test:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 5
1212
strategy:

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ To stop running locally, press `<CTRL> + C` to end the process.
5959
#### Linting
6060

6161
```zsh
62-
# Run flake8 from root directory for linting
63-
flake8 *.py
62+
# Run ruff from root directory for linting
63+
ruff check
6464

65-
# Run black from root directory for code formatting
66-
black .
65+
# Run ruff from root directory for code formatting
66+
ruff format
67+
ruff check --fix
6768
```
6869

6970
## Testing

pyproject.toml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
# black project prefers pyproject.toml
2-
# that's why we have this file in addition to other setting files
3-
[tool.black]
1+
[tool.ruff]
42
line-length = 125
53

4+
[tool.ruff.lint]
5+
ignore = []
6+
select = [
7+
# pycodestyle error
8+
"E",
9+
# pycodestyle warning
10+
"W",
11+
# Pyflakes
12+
"F",
13+
# isort
14+
"I",
15+
]
16+
617
[tool.pytest.ini_options]
718
testpaths = ["tests"]
819
log_file = "logs/pytest.log"

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
slack-cli-hooks
22
slack-bolt==1.19.0rc1
3-
pytest==8.2
4-
flake8==7.0
5-
black==24.4
63
requests==2.32
74
Flask==3.0
5+
pytest==8.2
6+
ruff==0.4

0 commit comments

Comments
 (0)