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:
Bénédikt Tran 2025-04-20 11:21:41 +02:00 committed by GitHub
parent 246ed23456
commit 5d8e432d9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 109 additions and 99 deletions

View file

@ -3,15 +3,14 @@
See the notes at the top of Python/frozen.c for more info.
"""
from collections import namedtuple
import hashlib
import ntpath
import os
import posixpath
from collections import namedtuple
from update_file import updating_file_with_tmpfile
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
ROOT_DIR = os.path.abspath(ROOT_DIR)
FROZEN_ONLY = os.path.join(ROOT_DIR, 'Tools', 'freeze', 'flag.py')
@ -482,7 +481,6 @@ def regen_frozen(modules):
header = relpath_for_posix_display(src.frozenfile, parentdir)
headerlines.append(f'#include "{header}"')
externlines = UniqueList()
bootstraplines = []
stdliblines = []
testlines = []
@ -625,7 +623,6 @@ def regen_makefile(modules):
def regen_pcbuild(modules):
projlines = []
filterlines = []
corelines = []
for src in _iter_sources(modules):
pyfile = relpath_for_windows_display(src.pyfile, ROOT_DIR)
header = relpath_for_windows_display(src.frozenfile, ROOT_DIR)