mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
gh-132390: Apply Ruff linting to Tools/build (#132391)
--------- Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit is contained in:
parent
246ed23456
commit
5d8e432d9f
16 changed files with 109 additions and 99 deletions
|
|
@ -286,7 +286,8 @@ def generate_runtime_init(identifiers, strings):
|
|||
break
|
||||
else:
|
||||
raise NotImplementedError
|
||||
assert nsmallposints and nsmallnegints
|
||||
assert nsmallposints
|
||||
assert nsmallnegints
|
||||
|
||||
# Then target the runtime initializer.
|
||||
filename = os.path.join(INTERNAL, 'pycore_runtime_init_generated.h')
|
||||
|
|
@ -434,7 +435,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
|
|||
# To cover tricky cases (like "\n") we also generate C asserts.
|
||||
raise ValueError(
|
||||
'do not use &_Py_ID or &_Py_STR for one-character latin-1 '
|
||||
+ f'strings, use _Py_LATIN1_CHR instead: {string!r}')
|
||||
f'strings, use _Py_LATIN1_CHR instead: {string!r}')
|
||||
if string not in strings:
|
||||
strings[string] = name
|
||||
elif name != strings[string]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue