CI: remove duplicated code check #36642
- [x] closes #36642

I wonder if it's also possible to move flake8-rst into pre-commit, perhaps as a local hook. Maybe @MarcoGorelli knows? xref #34150 flake8-rst is not under active development anymore. It requires flake8<3.8.0 Is flake8-rst the only thing blocking us from upgrading flake8? If so, I'd say let's fork it, run it in pre-commit (so it's in its own environment), and no longer pin flake8. Then later we can replace it with a different check (if necessary), but for now this would ensure the same checks will be run

EDIT
----
taken forward in  #36722 @simonjayhawkins I think should back port?  Sorry to backtrack, but TBH I'd appreciate if we could wait a little before merging this.

I noticed in #36978 that isort, when run in pre-commit, wasn't picking up `.pxd` files (which the newest version of isort supports), even though they're picked up when running `isort` from the terminal*. So first, I think that a version of #36978 which passes both code_checks and pre-commit should be in.

*this is because isort's `pre-commit-hooks.yaml` specfiies `types: [python]`, while `identify` picks up `.pxd` as `cython`.  > @simonjayhawkins I think should back port?

I _think_ better to keep the backport without the newer style checks. If we release 1.2 in November, 1.1.4 maybe the last in the 1.1.x Series. so maybe not that many more regressions to backport now anyhow. Hi @fangchenli 

We now have two separate hooks for isort:
```
    -   id: isort
        name: isort (python)
    -   id: isort
        name: isort (cython)
        types: [cython]
```
so IMO it's OK to remove it from `code_checks`. Can you fetch and merge upstream/master? Can you merge master to get CI green? thanks @fangchenli 