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

Skip to content

Remove trailing whitespace from python.gram #133858

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 2 commits into from
May 14, 2025
Merged

Conversation

rffontenelle
Copy link
Contributor

The intention is to solve "trailing whitespace" warning by sphinx-lint when running against translation files. That's related but not a duplicated of #133175.

Running sphinx-lint against this state of reference/grammar.po from pt_BR, these trailing whitespaces caused:

$ sphinx-lint reference/grammar.po 
reference/grammar.po:162: trailing whitespace (trailing-whitespace)
reference/grammar.po:163: trailing whitespace (trailing-whitespace)
reference/grammar.po:167: trailing whitespace (trailing-whitespace)
reference/grammar.po:515: trailing whitespace (trailing-whitespace)
reference/grammar.po:516: trailing whitespace (trailing-whitespace)
reference/grammar.po:517: trailing whitespace (trailing-whitespace)
reference/grammar.po:529: trailing whitespace (trailing-whitespace)
reference/grammar.po:530: trailing whitespace (trailing-whitespace)
reference/grammar.po:531: trailing whitespace (trailing-whitespace)
reference/grammar.po:1043: trailing whitespace (trailing-whitespace)
reference/grammar.po:1045: trailing whitespace (trailing-whitespace)
reference/grammar.po:1046: trailing whitespace (trailing-whitespace)
reference/grammar.po:1047: trailing whitespace (trailing-whitespace)
reference/grammar.po:1449: trailing whitespace (trailing-whitespace)
reference/grammar.po:1453: trailing whitespace (trailing-whitespace)

@AA-Turner
Copy link
Member

An alternative is just to silence the downstream warnings, but I've pushed a commit here to ensure no future whitespace regressions if we do merge this one.

A

@rffontenelle
Copy link
Contributor Author

@AA-Turner Do you think there is a way to make gettext builder not extract such string?

@AA-Turner
Copy link
Member

Can you elaborate?

@rffontenelle
Copy link
Contributor Author

Some kind of flag that could be added to the reST file to make gettext builder understand that the text should not be extracted into a POT file.

@hugovk hugovk added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 11, 2025
@StanFromIreland
Copy link
Contributor

Excluding it entirely: #133868

@rffontenelle
Copy link
Contributor Author

FYI: rebased to main

@hugovk hugovk merged commit 6df3976 into python:main May 14, 2025
38 checks passed
@miss-islington-app
Copy link

Thanks @rffontenelle for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 14, 2025
(cherry picked from commit 6df3976)

Co-authored-by: Rafael Fontenelle <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@miss-islington-app
Copy link

Sorry, @rffontenelle and @hugovk, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 6df39765e652ba06267f8e7abae431c37194a23e 3.13

@bedevere-app
Copy link

bedevere-app bot commented May 14, 2025

GH-133990 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 14, 2025
hugovk pushed a commit to hugovk/cpython that referenced this pull request May 14, 2025
Co-authored-by: Adam Turner <[email protected]>
(cherry picked from commit 6df3976)
@bedevere-app
Copy link

bedevere-app bot commented May 14, 2025

GH-133991 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 14, 2025
hugovk pushed a commit that referenced this pull request May 14, 2025
hugovk added a commit that referenced this pull request May 14, 2025
@rffontenelle rffontenelle deleted the patch-8 branch May 14, 2025 12:14
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.

5 participants