diff options
author | Tomas R. <tomas.roun8@gmail.com> | 2024-11-14 22:17:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 22:17:42 (GMT) |
commit | 9a456383bed52010b90bd491277ea855626a7bba (patch) | |
tree | f91dbcd12969b9c9b9c4ae2ded757bcfd49abf9a /Misc/NEWS.d | |
parent | cae9d9d20f61cdbde0765efa340b6b596c31b67f (diff) | |
download | cpython-9a456383bed52010b90bd491277ea855626a7bba.zip cpython-9a456383bed52010b90bd491277ea855626a7bba.tar.gz cpython-9a456383bed52010b90bd491277ea855626a7bba.tar.bz2 |
gh-126807: pygettext: Do not attempt to extract messages from function definitions. (GH-126808)
Fixes a bug where pygettext would attempt
to extract a message from a code like this:
def _(x): pass
This is because pygettext only looks at one
token at a time and '_(x)' looks like a
function call.
However, since 'x' is not a string literal,
it would erroneously issue a warning.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Tools-Demos/2024-11-13-22-23-36.gh-issue-126807.vpaWuN.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Tools-Demos/2024-11-13-22-23-36.gh-issue-126807.vpaWuN.rst b/Misc/NEWS.d/next/Tools-Demos/2024-11-13-22-23-36.gh-issue-126807.vpaWuN.rst new file mode 100644 index 0000000..310286c --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2024-11-13-22-23-36.gh-issue-126807.vpaWuN.rst @@ -0,0 +1,2 @@ +Fix extraction warnings in :program:`pygettext.py` caused by mistaking +function definitions for function calls. |