Skip to content

syntax error messages capitalization #19114

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

Merged
merged 8 commits into from
May 20, 2025
Merged

Conversation

charulatalodha
Copy link
Contributor

@charulatalodha charulatalodha commented May 19, 2025

Fixes ##19107

Cause of Issue:
ast3 parser raises exception with error message which sometimes non-standardized.

eg :

 error: expected an indented block after function definition on line 1  [syntax]

Resolution:

  • standardize the exception error message before report generation for syntax exceptions specifically

Contributors:

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@charulatalodha
Copy link
Contributor Author

HI @JukkaL can you please review, thanks.

Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@JukkaL JukkaL 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! Looks good.

@JukkaL JukkaL merged commit 9f53138 into python:master May 20, 2025
18 checks passed
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.

3 participants