Skip to content

Commit 47b9062

Browse files
committed
Add ruff to CI, update pre-commit to include tests
1 parent 574a495 commit 47b9062

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/main.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ jobs:
3737
python-version: "3.11"
3838
cache: 'pip' # caching pip dependencies
3939
- run: pip install -r requirements-devel.txt
40-
- name: "Black"
41-
run: black --check weaviate test mock_tests integration
40+
- name: "Ruff lint"
41+
run: ruff check weaviate test mock_tests integration
42+
- name: "Ruff format"
43+
run: ruff format --diff weaviate test mock_tests integration
4244
- name: "Flake 8"
4345
run: flake8 weaviate test mock_tests integration
4446
- name: "Check release for pypi"

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ repos:
1313
hooks:
1414
# Run the linter.
1515
- id: ruff
16-
args: [ ./weaviate, --select, F401, --select, I, --fix ]
16+
args: [ weaviate, integration, test, mock_tests, journey_tests, --select, F401, --select, I, --fix ]
1717
# Run the formatter.
1818
- id: ruff-format
19-
args: [ ./weaviate ]
19+
args: [ weaviate, integration, test, mock_tests, journey_tests ]
2020

2121
- repo: https://github.com/PyCQA/flake8
2222
rev: 7.1.0

0 commit comments

Comments
 (0)