mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-132777: Fix Error Message for Duplicates in generate_global_scripts.py (gh-132780)
The fstring would actually raise a KeyError, which we fix. We also adjust the text to be correct.
This commit is contained in:
parent
09b624b80f
commit
9be3645688
1 changed files with 1 additions and 1 deletions
|
@ -439,7 +439,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
|
||||||
if string not in strings:
|
if string not in strings:
|
||||||
strings[string] = name
|
strings[string] = name
|
||||||
elif name != strings[string]:
|
elif name != strings[string]:
|
||||||
raise ValueError(f'string mismatch for {name!r} ({string!r} != {strings[name]!r}')
|
raise ValueError(f'name mismatch for string {string!r} ({name!r} != {strings[string]!r}')
|
||||||
overlap = identifiers & set(strings.keys())
|
overlap = identifiers & set(strings.keys())
|
||||||
if overlap:
|
if overlap:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue