CI Upgrade isort in pre-commit
State: closed

- xref #36879 

```console
(base) root@ada0229371a4:/home/pandas-tazminia# pre-commit autoupdate && pre-commit run --all
Updating https://github.com/python/black ... [INFO] Initializing environment for https://github.com/python/black.
already up to date.
Updating https://gitlab.com/pycqa/flake8 ... [INFO] Initializing environment for https://gitlab.com/pycqa/flake8.
already up to date.
Updating https://github.com/PyCQA/isort ... [INFO] Initializing environment for https://github.com/PyCQA/isort.
updating 5.2.2 -> 5.6.0.
Updating https://github.com/asottile/pyupgrade ... [INFO] Initializing environment for https://github.com/asottile/pyupgrade.
already up to date.
Updating https://github.com/pre-commit/pygrep-hooks ... [INFO] Initializing environment for https://github.com/pre-commit/pygrep-hooks.
already up to date.
Updating https://github.com/asottile/yesqa ... [INFO] Initializing environment for https://github.com/asottile/yesqa.
already up to date.
Updating https://github.com/pre-commit/pre-commit-hooks ... [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
already up to date.
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8:flake8-comprehensions>=3.1.0.
[INFO] Installing environment for https://github.com/python/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/pycqa/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/pycqa/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/PyCQA/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/asottile/pyupgrade.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/asottile/yesqa.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
black....................................................................Passed
flake8...................................................................Passed
flake8-pyx...............................................................Passed
flake8-pxd...............................................................Passed
isort....................................................................Passed
pyupgrade................................................................Passed
rst ``code`` is two backticks............................................Passed
Generate pip dependency from conda.......................................Passed
Strip unnecessary `# noqa`s..............................................Passed
Fix End of Files.........................................................Passed
```


Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
Seems isort recently introduced sorting for pxd files https://github.com/PyCQA/isort/issues/1494

I think they need to update their `.pre-commit-config.yaml` file, as it seems that `types: [python]` isn't picking up .pxd files. I'll take a look later

(this probably makes the case for not de-duplicating code-checks just yet)
@Tazminia for now, could you add the lines
```python
        files: '.pxd$|.py$'
        types: [file]
```
to this hook?

We may be able to remove this when they update their pre-commit hook and release a new version
Added your suggestion @MarcoGorelli. Planning to merge when CI passes.
the pxd files will need isorting too for this to work 😄  just added a commit for that
LGTM
Thanks @Tazminia !