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

Add isort in pre commit configuration file #2805

Merged

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Mar 9, 2019

Description

This add isort in the pre-commit configuration file and also apply it on all applicable files. Isort permit to sort import so there is less conflict during merging and rebase of file with conflicting modification. We're using a style of import compatible with black and made some efforts so that automated changes made by black are not deemed invalid and automatically reverted by isort later in the commit hooks :

It also update the version of Black, and of pre-commit's trailing-whitespace and end-of-file-fixer

Type of Changes

| ✓ | 🔨 Refactoring |

@Pierre-Sassoulas Pierre-Sassoulas force-pushed the add-isort-in-pre-commit branch 5 times, most recently from c3b3f7e to da9c49b Compare March 9, 2019 10:59
@Pierre-Sassoulas
Copy link
Member Author

I moved a comment from the import to the top of the file in pylint/test/conftest.py because isort and black are not entirely compatible yet. (IMHO its compatible enough if the only problem is on one file for the entire project.). See this issue : psf/black#251

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 89.716% when pulling da9c49b on Pierre-Sassoulas:add-isort-in-pre-commit into 5073ebd on PyCQA:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 89.716% when pulling da9c49b on Pierre-Sassoulas:add-isort-in-pre-commit into 5073ebd on PyCQA:master.

@coveralls
Copy link

coveralls commented Mar 9, 2019

Coverage Status

Coverage decreased (-0.03%) to 89.701% when pulling 09913f1 on Pierre-Sassoulas:add-isort-in-pre-commit into 8d2f5d0 on PyCQA:master.

@Pierre-Sassoulas
Copy link
Member Author

#2806 might be blocking.

Copy link
Contributor

@PCManticore PCManticore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff @Pierre-Sassoulas ! Thank you for working on this. The next steps would be to have isort in CI as well, once that's in we can merge this.

.gitignore Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Show resolved Hide resolved
@PCManticore PCManticore merged commit 30b2ae7 into pylint-dev:master Mar 20, 2019
@Pierre-Sassoulas Pierre-Sassoulas deleted the add-isort-in-pre-commit branch March 20, 2019 08:36
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Aug 4, 2019
Also fixed spelling in C0112 to C0116 messages following the review
of pull-request pylint-dev#2036 by Ashley Whetter.

See also pylint-dev#2075, pylint-dev#2077, pylint-dev#2262, pylint-dev#2654, pylint-dev#2805, pylint-dev#2809, pylint-dev#2844, pylint-dev#2992
and pylint-dev#3013 for full historical context.
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Aug 19, 2019
Also fixed spelling in C0112 to C0116 messages following the review
of pull-request pylint-dev#2036 by Ashley Whetter.

See also pylint-dev#2075, pylint-dev#2077, pylint-dev#2262, pylint-dev#2654, pylint-dev#2805, pylint-dev#2809, pylint-dev#2844, pylint-dev#2992
and pylint-dev#3013 for full historical context.
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Sep 10, 2019
Also fixed spelling in C0112 to C0116 messages following the review
of pull-request pylint-dev#2036 by Ashley Whetter.

See also pylint-dev#2075, pylint-dev#2077, pylint-dev#2262, pylint-dev#2654, pylint-dev#2805, pylint-dev#2809, pylint-dev#2844, pylint-dev#2992
and pylint-dev#3013 for full historical context.
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Sep 10, 2019
Also fixed spelling in C0112 to C0116 messages following the review
of pull-request pylint-dev#2036 by Ashley Whetter.

See also pylint-dev#2075, pylint-dev#2077, pylint-dev#2262, pylint-dev#2654, pylint-dev#2805, pylint-dev#2809, pylint-dev#2844, pylint-dev#2992
and pylint-dev#3013 for full historical context.
PCManticore pushed a commit that referenced this pull request Sep 10, 2019
Also fixed spelling in C0112 to C0116 messages following the review
of pull-request #2036 by Ashley Whetter.

See also #2075, #2077, #2262, #2654, #2805, #2809, #2844, #2992
and #3013 for full historical context.
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.

None yet

3 participants