Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Ruff checks formatting during CI checks #2021

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@
"vsliveshare.vsliveshare"
],
"settings": {
"ruff.lint.ignore": ["F401"],
"ruff.lint.run": "onSave",
"ruff.organizeImports": false,
"[python]": {
"ruff.lint.run": "onSave",
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
}
},
"ruff.configurationPreference": "filesystemFirst"
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ run-gunicorn:

.PHONY: format
format:
ruff check --select I --fix .
ruff check --fix .
ruff check
ruff format .
mypy ./
Expand Down
40 changes: 20 additions & 20 deletions poetry.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ mypy = "1.11.2"
monkeytype = "23.3.0"
poethepoet = "^0.24.4"
pre-commit = "^3.7.1"
ruff = "^0.6.9"
ruff = "^0.8.2"

# stubs libraries to keep mypy happy
types-python-dateutil = "2.9.0.20241003"
Expand Down
3 changes: 3 additions & 0 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ display_result $? 1 "Code style check"
ruff check --select I .
display_result $? 1 "Import order check"

ruff format --check .
display_result $? 1 "Code format check"

mypy ./
display_result $? 1 "Type check"

Expand Down
Loading