Skip to content

Commit

Permalink
Bump isort, enable Cython package resorting (#806)
Browse files Browse the repository at this point in the history
With rapidsai/integration#286, the version of isort running on gpuCI will be bumped to 5.6.4, allowing us to enforce the sorting of packages in Cython (pyx, pxd) files. This PR intends to:

- Enable these checks in the gpuCI style script
- Enable Cython package resorting in the pre-commit hook
- Resort all the Cython files in this repo so they pass the newly enabled checks

Authors:
  - Charles Blackmon-Luca (https://github.com/charlesbluca)

Approvers:
  - Dillon Cullinan (https://github.com/dillon-cullinan)

URL: #806
  • Loading branch information
charlesbluca committed Jun 24, 2021
1 parent aaba80a commit f7884b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
repos:
- repo: https://github.com/timothycrosley/isort
rev: 5.0.7
- repo: https://github.com/pycqa/isort
rev: 5.6.4
hooks:
- id: isort
args: ["--settings-path=python/setup.cfg"]
files: python/.*
exclude: __init__.py$
types: [text]
types_or: [python, cython]
- repo: https://github.com/ambv/black
rev: 19.10b0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion ci/checks/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LANG=C.UTF-8
conda activate rapids

# Run isort and get results/return code
ISORT=`isort --recursive --check-only python`
ISORT=`isort --check-only python --settings-path=python/setup.cfg `
ISORT_RETVAL=$?

# Run black and get results/return code
Expand Down

0 comments on commit f7884b3

Please sign in to comment.