Skip to content

Remove trailing whitespace from python.gram - #133175

Merged
lysnikolaou merged 1 commit into
python:mainfrom
rffontenelle:patch-8
Apr 30, 2025
Merged

lysnikolaou merged 1 commit into
python:mainfrom
rffontenelle:patch-8

Conversation

@rffontenelle

Copy link
Copy Markdown
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)

@lysnikolaou lysnikolaou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks @rffontenelle!

@rffontenelle

rffontenelle commented Apr 30, 2025 •

Copy link
Copy Markdown
Contributor Author

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

@lysnikolaou

Copy link
Copy Markdown
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