Skip to content

DEV: skip pandas/__init__.py in isort's pre-commit hook #28517

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

Merged
merged 2 commits into from
Sep 19, 2019

Conversation

jorisvandenbossche
Copy link
Member

I noticed that when you modified pandas/__init__.py, isort actually completely reordered it when using pre-commit hook. Apparantly, isort ignores the skip config when you explicitly pass a path to isort (pre-commit basically does isort pandas/__init__.py when that file changed).

See pre-commit/mirrors-isort#9, which suggested to add this exclude to the pre-commit config (although that duplicates the "skip" information from setup.cfg)

@TomAugspurger
Copy link
Contributor

Thanks for tracking this down. I wondered why the config was being ignored.

@TomAugspurger TomAugspurger merged commit c811e77 into pandas-dev:master Sep 19, 2019
@TomAugspurger TomAugspurger added this to the 1.0 milestone Sep 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
…8517)

* DEV: skip pandas/__init__.py in isort's pre-commit hook

* also add core api
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
…8517)

* DEV: skip pandas/__init__.py in isort's pre-commit hook

* also add core api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants