Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove trailing whitespace from python.gram #133175

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 1 commit into from
Apr 30, 2025

Conversation

rffontenelle
Copy link
Contributor

The intention is to solve "trailing whitespace" warning by sphinx-lint when running against translation files.

Grammar/python.gram is included by Doc/reference/grammar.rst. So running Sphinx gettext builder (make -C Doc gettext) results in the whole grammar content being extracted to translation files (Doc/build/gettext/reference/grammar.pot will be generated and used as the template for translation files).

In the current situation, running sphinx-lint against translation files and having the grammar content simply copied and pasted into the translation (msgstr) will cause warnings like this:

reference/grammar.po:145: trailing whitespace (trailing-whitespace)
reference/grammar.po:706: trailing whitespace (trailing-whitespace)
reference/grammar.po:1373: trailing whitespace (trailing-whitespace)
reference/grammar.po:1379: trailing whitespace (trailing-whitespace)
reference/grammar.po:1503: trailing whitespace (trailing-whitespace)

Copy link
Member

@lysnikolaou lysnikolaou left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @rffontenelle!

@lysnikolaou lysnikolaou merged commit fd0f5d0 into python:main Apr 30, 2025
54 checks passed
@rffontenelle
Copy link
Contributor Author

rffontenelle commented Apr 30, 2025

Can this be backported for previous versions? I mean normally one would trigger the bot for backporting to orrvious versions.

@lysnikolaou
Copy link
Member

I'm not sure whether we backport "stylistic" changes like this, so I'll let someone else decide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants