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

CI Upgrade isort in pre-commit #36978

Merged
merged 4 commits into from Oct 8, 2020

Conversation

Tazminia
Copy link
Contributor

@Tazminia Tazminia commented Oct 8, 2020

(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

@MarcoGorelli
Copy link
Member

MarcoGorelli commented Oct 8, 2020

Seems isort recently introduced sorting for pxd files PyCQA/isort#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)

@MarcoGorelli MarcoGorelli changed the title fixes issue #36879 Upgrade isort in pre-commit Oct 8, 2020
@MarcoGorelli MarcoGorelli changed the title Upgrade isort in pre-commit CI Upgrade isort in pre-commit Oct 8, 2020
@MarcoGorelli
Copy link
Member

@Tazminia for now, could you add the lines

        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

@TomAugspurger
Copy link
Contributor

Added your suggestion @MarcoGorelli. Planning to merge when CI passes.

@MarcoGorelli
Copy link
Member

the pxd files will need isorting too for this to work 😄 just added a commit for that

@jbrockmendel
Copy link
Member

LGTM

@MarcoGorelli MarcoGorelli merged commit 028eecb into pandas-dev:master Oct 8, 2020
@MarcoGorelli MarcoGorelli added the Code Style Code style, linting, code_checks label Oct 8, 2020
@MarcoGorelli MarcoGorelli added this to the 1.2 milestone Oct 8, 2020
@MarcoGorelli
Copy link
Member

Thanks @Tazminia !

kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
* fixes issue pandas-dev#36879

* Fixup

* sort pxd files

Co-authored-by: Tom Augspurger <tom.w.augspurger@gmail.com>
Co-authored-by: Marco Gorelli <m.e.gorelli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants