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 configuration to ensure a newline before each comment #1000

Merged
merged 7 commits into from
Sep 12, 2019

Conversation

FuegoFro
Copy link
Contributor

This adds a ensure_newline_before_comments configuration that matches the format that black imposes (for better or worse) and allows isort to be used with black without any thrashing/conflicts with regards to blank lines before comments.

Should help address psf/black#251

This adds a `ensure_newline_before_comments` configuration that matches the format that `black` imposes (for better or worse) and allows `isort` to be used with `black` without any thrashing/conflicts with regards to blank lines before comments.

Should help address psf/black#251
@codecov-io
Copy link

codecov-io commented Aug 18, 2019

Codecov Report

Merging #1000 into develop will decrease coverage by 0.02%.
The diff coverage is 84.61%.

@@             Coverage Diff             @@
##           develop    #1000      +/-   ##
===========================================
- Coverage    89.77%   89.75%   -0.03%     
===========================================
  Files           12       12              
  Lines         2680     2693      +13     
  Branches       457      461       +4     
===========================================
+ Hits          2406     2417      +11     
- Misses         186      187       +1     
- Partials        88       89       +1

@xmnlab
Copy link

xmnlab commented Sep 10, 2019

this implementation would be very helpful.
is there any any estimate to move that forward?

@timothycrosley
Copy link
Member

@FuegoFro This is great! Thanks for working on this!

@timothycrosley timothycrosley merged commit e63ae06 into PyCQA:develop Sep 12, 2019
@FuegoFro FuegoFro deleted the black_newline_before_comment branch September 12, 2019 17:54
@FuegoFro
Copy link
Contributor Author

Thank you for the merge! 😀

toryhaavik pushed a commit to ibis-project/ibis that referenced this pull request Sep 13, 2019
waiting for PyCQA/isort#1000
Author: Ivan Ogasawara <ivan.ogasawara@gmail.com>

Closes #1963 from xmnlab/black-files-formatting and squashes the following commits:

9d1defb [Ivan Ogasawara] Re-formatting all files using pre-commit hook
@hugovk
Copy link
Contributor

hugovk commented Sep 25, 2019

Confirmed current master fixes the problem.

Is there a schedule for the next release? It would help unblock formatting pip with Black+isort.

Thanks!

@timothycrosley
Copy link
Member

timothycrosley commented Sep 26, 2019

@hugovk I can get it scheduled comfortably for 2 weeks for now. if it is really urgent I can try to get the release in good shape within a week. I hate to block the work on pip!

Let me know,

Thanks!

~Timothy

@hugovk
Copy link
Contributor

hugovk commented Sep 26, 2019

Thanks! I don't know how long it'll take for the PR to be reviewed (it's big!) so let's ask over there: pypa/pip#7084.

@pradyunsg
Copy link

I hate to block the work on pip!

Hi hi.

Don't worry about that -- We can easily wait for the next release of isort for doing this, so please feel free to make the release at a time that's comfortable for you. No pressure from our end. :)

AFAIK, we're in no hurry to adopt black (we already use isort!) even though I don't think anyone is opposed to it at this point. 🙃

Thanks for all of your (and other contributors') work on isort!

costrouc pushed a commit to costrouc/ibis that referenced this pull request Oct 10, 2019
waiting for PyCQA/isort#1000
Author: Ivan Ogasawara <ivan.ogasawara@gmail.com>

Closes ibis-project#1963 from xmnlab/black-files-formatting and squashes the following commits:

9d1defb [Ivan Ogasawara] Re-formatting all files using pre-commit hook
@FuegoFro
Copy link
Contributor Author

Hey! Just wondering if there was any news on a release that has this change in it. No rush! Just curious 🙂

@timothycrosley
Copy link
Member

Hi @FuegoFro,

I've finished the other project that I wanted to finish up before the release: https://timothycrosley.com/project-7-streamdeck_ui and switched to spending all my OpenSource time working on preparing the isort 5.0.0 release. I hope to have it wrapped up soon.

Thanks!

~Timothy

henrikhorluck added a commit to dotkom/onlineweb4 that referenced this pull request Oct 16, 2019
henrikhorluck added a commit to dotkom/onlineweb4 that referenced this pull request Oct 23, 2019
@FuegoFro
Copy link
Contributor Author

Hey there! Just checking in again to see if any progress has been made on a new release 🙂

StephenBrown2 added a commit to StephenBrown2/isort that referenced this pull request Jan 3, 2020
Since PyCQA#1000 was merged to address black compatibility, best include it in the profile.
@pradyunsg
Copy link

@timothycrosley Gentle nudge on 5.0.0. :)

Are there any release blocker issues that we could help you with?

@ssbarnea
Copy link
Member

Yes, please make a new release as we cannot use unreleased code in production.

@julien-c
Copy link

Any news on this? Thanks!

@thomwolf
Copy link

Can we help with the release somehow?

@jaklan

This comment has been minimized.

ap-- added a commit to ap--/python-seabreeze that referenced this pull request May 22, 2020
ap-- added a commit to ap--/python-seabreeze that referenced this pull request May 22, 2020
@jonathanunderwood
Copy link

@timothycrosley would it be possible to push a 4.3.x release with this feature added ahead of the move to 5.0.0? This is currently blocking projects from using isort where we would love to be able to make use of isort and black together.

benjaminhwilliams added a commit to xia2/screen19 that referenced this pull request Jun 23, 2020
Comments in import blocks cause disagreement between Black and isort.
This will soon be fixed by specifying
'ensure_newline_before_comments=true' in the isort config, though this
won't be honoured until the next isort release.

See psf/black#251
and PyCQA/isort#1000
benjaminhwilliams added a commit to xia2/xia2 that referenced this pull request Jun 23, 2020
Comments in import blocks cause disagreement between Black and isort.
This will soon be fixed by specifying
'ensure_newline_before_comments=true' in the isort config, though this
won't be honoured until the next isort release.

See psf/black#251
and PyCQA/isort#1000
benjaminhwilliams added a commit to dials/dials_scratch that referenced this pull request Jun 23, 2020
Comments in import blocks cause disagreement between Black and isort.
This will soon be fixed by specifying
'ensure_newline_before_comments=true' in the isort config, though this
won't be honoured until the next isort release.

See psf/black#251
and PyCQA/isort#1000
benjaminhwilliams added a commit to dials/dials that referenced this pull request Jun 23, 2020
Comments in import blocks cause disagreement between Black and isort.
This will soon be fixed by specifying
'ensure_newline_before_comments=true' in the isort config, though this
won't be honoured until the next isort release.

See psf/black#251
and PyCQA/isort#1000
benjaminhwilliams added a commit to cctbx/dxtbx that referenced this pull request Jun 23, 2020
Comments in import blocks cause disagreement between Black and isort.
This will soon be fixed by specifying
'ensure_newline_before_comments=true' in the isort config, though this
won't be honoured until the next isort release.

See psf/black#251
and PyCQA/isort#1000
@johnthagen
Copy link

Looks like 5.0.0 is releasing tomorrow: 2ea917e

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.