Skip to content

Improve parse error readability#5068

Merged
cobaltt7 merged 15 commits intopsf:mainfrom
Chandana098-learn:improve-parse-error-message
Apr 14, 2026
Merged

Improve parse error readability#5068
cobaltt7 merged 15 commits intopsf:mainfrom
Chandana098-learn:improve-parse-error-message

Conversation

@Chandana098-learn
Copy link
Copy Markdown
Contributor

@Chandana098-learn Chandana098-learn commented Mar 29, 2026

Closes #4820
Closes #4992

I updated the parse error message while still keeping it in readable format.
New Change: Now it shows the error in multiple lines , points to the error position with ^.

Copy link
Copy Markdown
Collaborator

@cobaltt7 cobaltt7 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Can you add an entry to CHANGES.md and run Black on itself?

Comment thread src/black/parsing.py Outdated
Comment thread src/black/parsing.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 29, 2026

diff-shades results comparing this PR (3e181f2) to main (9e969dd):

--preview style: no changes

--stable style: no changes


What is this? | Workflow run | diff-shades documentation

@Chandana098-learn
Copy link
Copy Markdown
Contributor Author

Thanks for the review! I’ll complete the remaining changes you mentioned (docs and tests) by today. Apologies for the delay , I’ll update everything by tonight.

Comment thread CHANGES.md Outdated
Comment thread src/black/parsing.py Outdated
Comment thread tests/test_format.py Outdated
Comment thread tests/test_black.py Outdated
Comment thread docs/usage_and_configuration/the_basics.md Outdated
Comment thread tests/test_black.py Outdated
@cobaltt7
Copy link
Copy Markdown
Collaborator

Hey @Chandana098-learn, are able to make those changes?

@Chandana098-learn
Copy link
Copy Markdown
Contributor Author

Hey! I’ve been working on the changes, but I’m currently facing issues with passing the flake8 and pytest checks. I’m still in my 1st year and learning, so I’d appreciate any guidance you can share. I’ll keep working on it and update you soon. Thanks!

@cobaltt7
Copy link
Copy Markdown
Collaborator

Those issues should be fixed by my previous review comments, so focus on those first

@Chandana098-learn
Copy link
Copy Markdown
Contributor Author

Chandana098-learn commented Apr 13, 2026

hello, i have reviewed the changes. please look into it.

Comment thread docs/usage_and_configuration/the_basics.md Outdated
Comment thread docs/usage_and_configuration/the_basics.md
Comment thread docs/usage_and_configuration/the_basics.md
Comment thread tests/test_black.py Outdated
@Chandana098-learn
Copy link
Copy Markdown
Contributor Author

Please check the changes you asked for

Comment thread docs/usage_and_configuration/the_basics.md Outdated
Comment thread tests/test_black.py Outdated
Comment thread tests/test_black.py Outdated
Comment thread docs/usage_and_configuration/the_basics.md
Comment thread docs/usage_and_configuration/the_basics.md Outdated
cobaltt7 and others added 3 commits April 14, 2026 09:26
Co-authored-by: cobalt <61329810+cobaltt7@users.noreply.github.com>
@Chandana098-learn
Copy link
Copy Markdown
Contributor Author

is there anything i need to do right now?

@cobaltt7
Copy link
Copy Markdown
Collaborator

Nope! It looks like some things were messed up with the markdown formatting, but I fixed them. Just waiting for CI to pass and I can merge. Thanks for the contribution!

@cobaltt7 cobaltt7 merged commit c7fc243 into psf:main Apr 14, 2026
52 checks passed
@Chandana098-learn
Copy link
Copy Markdown
Contributor Author

Thank you for the review and guidance!

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.

Improve syntax error reporting for a better user experience

2 participants