Skip to content

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 14, 2024

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.
(cherry picked from commit 9a45638)

Co-authored-by: Tomas R. [email protected]

…unction definitions. (pythonGH-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.
(cherry picked from commit 9a45638)

Co-authored-by: Tomas R. <[email protected]>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) November 14, 2024 22:27
@serhiy-storchaka serhiy-storchaka merged commit 306db14 into python:3.12 Nov 14, 2024
30 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