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

Improve an error message when failed to load pyproject.toml #653

Merged
merged 1 commit into from
Dec 31, 2018

Conversation

thombashi
Copy link
Contributor

This PR aims to improve the information content of an error message when failed to load pyproject.toml file.

Like #637, current black 18.9b0 (and master branch) output the following error message when pyproject.toml malformed or toml package considers the format is invalid:

$ black .
Usage: black [OPTIONS] [SRC]...

Error: <click.core.Context object at 0x7f51c84264e0>

I think that it is difficult to understand the cause of the error from the message.
After applying the patch, the message looks like below:

$ black .
Error: Could not open file /home/.../pyproject.toml: Error reading configuration file: Invalid date or number (line 36 column 1 char 478)

@coveralls
Copy link

Pull Request Test Coverage Report for Build 850

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.614%

Changes Missing Coverage Covered Lines Changed/Added Lines %
black.py 0 1 0.0%
Totals Coverage Status
Change from base Build 838: 0.0%
Covered Lines: 2775
Relevant Lines: 3029

💛 - Coveralls

4 similar comments
@coveralls
Copy link

Pull Request Test Coverage Report for Build 850

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.614%

Changes Missing Coverage Covered Lines Changed/Added Lines %
black.py 0 1 0.0%
Totals Coverage Status
Change from base Build 838: 0.0%
Covered Lines: 2775
Relevant Lines: 3029

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 850

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.614%

Changes Missing Coverage Covered Lines Changed/Added Lines %
black.py 0 1 0.0%
Totals Coverage Status
Change from base Build 838: 0.0%
Covered Lines: 2775
Relevant Lines: 3029

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 850

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.614%

Changes Missing Coverage Covered Lines Changed/Added Lines %
black.py 0 1 0.0%
Totals Coverage Status
Change from base Build 838: 0.0%
Covered Lines: 2775
Relevant Lines: 3029

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 850

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.614%

Changes Missing Coverage Covered Lines Changed/Added Lines %
black.py 0 1 0.0%
Totals Coverage Status
Change from base Build 838: 0.0%
Covered Lines: 2775
Relevant Lines: 3029

💛 - Coveralls

@JelleZijlstra JelleZijlstra merged commit 3b72ed0 into psf:master Dec 31, 2018
@JelleZijlstra
Copy link
Collaborator

Thank you!

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