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

Remove numeric underscore normalization #696

Merged
merged 7 commits into from
Feb 7, 2019

Conversation

zsol
Copy link
Collaborator

@zsol zsol commented Feb 6, 2019

Fixes #549.

@zsol zsol force-pushed the remove_num_underscores branch from 0be016e to 2a30be8 Compare February 6, 2019 15:33
@coveralls
Copy link

Pull Request Test Coverage Report for Build 889

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.008%) to 91.62%

Files with Coverage Reduction New Missed Lines %
blackd.py 1 8.97%
black.py 1 94.6%
Totals Coverage Status
Change from base Build 883: 0.008%
Covered Lines: 2777
Relevant Lines: 3031

💛 - Coveralls

4 similar comments
@coveralls
Copy link

Pull Request Test Coverage Report for Build 889

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.008%) to 91.62%

Files with Coverage Reduction New Missed Lines %
blackd.py 1 8.97%
black.py 1 94.6%
Totals Coverage Status
Change from base Build 883: 0.008%
Covered Lines: 2777
Relevant Lines: 3031

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 889

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.008%) to 91.62%

Files with Coverage Reduction New Missed Lines %
blackd.py 1 8.97%
black.py 1 94.6%
Totals Coverage Status
Change from base Build 883: 0.008%
Covered Lines: 2777
Relevant Lines: 3031

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 889

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.008%) to 91.62%

Files with Coverage Reduction New Missed Lines %
blackd.py 1 8.97%
black.py 1 94.6%
Totals Coverage Status
Change from base Build 883: 0.008%
Covered Lines: 2777
Relevant Lines: 3031

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 889

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.008%) to 91.62%

Files with Coverage Reduction New Missed Lines %
blackd.py 1 8.97%
black.py 1 94.6%
Totals Coverage Status
Change from base Build 883: 0.008%
Covered Lines: 2777
Relevant Lines: 3031

💛 - Coveralls

@coveralls
Copy link

coveralls commented Feb 6, 2019

Pull Request Test Coverage Report for Build 909

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.005%) to 90.251%

Files with Coverage Reduction New Missed Lines %
blackd.py 2 7.55%
Totals Coverage Status
Change from base Build 901: 0.005%
Covered Lines: 2805
Relevant Lines: 3108

💛 - Coveralls

README.md Outdated
the `-N` or `--skip-numeric-underscore-normalization` command line option
makes *Black* preserve underscores in numeric literals.
styled as `2L` instead of `2l` to avoid confusion between `l` and `1`.
In Python 3.6 and later, *Black* preserves underscores in numeric literals.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add "unchanged"? Otherwise, I'm not sure it's worth mentioning something Black doesn't change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm, fair enough. I'll just remove this sentence.

@@ -4,13 +4,13 @@

from third_party import X, Y, Z

from library import some_connection, \
some_decorator
from library import some_connection, some_decorator
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like you accidentally blackened the whole file.

from library import some_connection, \
some_decorator
f'trigger 3.6 mode'
from library import some_connection, some_decorator
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here.

@JelleZijlstra JelleZijlstra merged commit 250ba7f into master Feb 7, 2019
@imomaliev
Copy link

Hi, when this will be released?

@zsol zsol deleted the remove_num_underscores branch March 14, 2019 17:35
enrico-usai added a commit to enrico-usai/aws-parallelcluster that referenced this pull request Mar 15, 2019
The option used to preserve underscores in numeric literals
has been removed from Black.

Black no longer normalizes numeric literals to include _ separators.

See:
psf/black#549
psf/black#696
Signed-off-by: Enrico Usai <[email protected]>
enrico-usai added a commit to aws/aws-parallelcluster that referenced this pull request Mar 15, 2019
The option used to preserve underscores in numeric literals
has been removed from Black.

Black no longer normalizes numeric literals to include _ separators.

See:
psf/black#549
psf/black#696
Signed-off-by: Enrico Usai <[email protected]>
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.

4 participants