-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Originally came up here: #126755 (comment)
To summarize, pygettext produces a warning for this code:
def _(x):
pass
The reason is that it confuses the function definition with a function call. I have a PR ready.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-126807: pygettext: Do not attempt to extract messages from function definitions. #126808
- [3.13] gh-126807: pygettext: Do not attempt to extract messages from function definitions. (GH-126808) #126846
- [3.12] gh-126807: pygettext: Do not attempt to extract messages from function definitions. (GH-126808) #126847
serhiy-storchaka
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done