Skip to content

Commit

Permalink
Apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
noliveleger committed Sep 10, 2024
1 parent 5e07fe9 commit 5ce6eab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
1. [ ] If you've added code that should be tested, add tests
2. [ ] If you've changed APIs, update (or create!) the documentation
3. [ ] Ensure the tests pass
4. [ ] Make sure that your code lints and that you've followed [our coding style](https://github.com/kobotoolbox/kpi/blob/master/CONTRIBUTING.md)
4. [ ] Run `./python-format.sh` to make sure that your code lints and that you've followed [our coding style](https://github.com/kobotoolbox/kpi/blob/master/CONTRIBUTING.md)
5. [ ] Write a title and, if necessary, a description of your work suitable for publishing in our [release notes](https://community.kobotoolbox.org/tag/release-notes)
6. [ ] Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
7. [ ] Open an issue in the [docs](https://github.com/kobotoolbox/docs/issues/new) if there are UI/UX changes
Expand Down
5 changes: 3 additions & 2 deletions format-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ if [ -n "$PYTHON_CHANGES" ]; then
echo "Using ruff..."
git diff --name-only "$BASE_REVISION" | grep '\.py' | xargs ruff check --select Q --select I --select F401 --select UP026 --select UP034 --select UP039 --select W292 --fix

# Applying Black format on changes (since $BASE_REVISION)
# Applying Black format on changes
echo "Using darker..."
darker -i -r "$BASE_REVISION"
# Use `isort` and compare changes with revision $BASE_REVISION
darker --isort --revision "$BASE_REVISION"
else
echo "No Python changes detected!"
fi
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Do not enable `verbose = true` unless Black changes their behavior to respect
# `--quiet` on the command line properly
# verbose = true
line-length = 80
line-length = 88
skip-string-normalization = true

[tool.darker]
Expand All @@ -17,7 +17,7 @@ isort = true

[tool.isort]
profile = "black"
line_length = 80 # same as black
line_length = 88 # same as black
known_first_party = "kobo"
no_lines_before = ["LOCALFOLDER"]

Expand Down

0 comments on commit 5ce6eab

Please sign in to comment.