Skip to content

Commit c191ca3

Browse files
committed
Add flake8-comprehensions
1 parent 69bd202 commit c191ca3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cpython-windows/build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ def collect_python_build_artifacts(
961961
# Projects that provide extensions.
962962
extension_projects = set()
963963

964-
dirs = {p for p in os.listdir(intermediates_path)}
964+
dirs = set(os.listdir(intermediates_path))
965965

966966
for extension, entry in CONVERT_TO_BUILTIN_EXTENSIONS.items():
967967
if extension not in dirs:
@@ -1135,8 +1135,8 @@ def find_additional_dependencies(project: pathlib.Path):
11351135
license_paths.add(f"licenses/{download_entry['license_file']}")
11361136
license_public_domain = download_entry.get("license_public_domain")
11371137

1138-
entry["licenses"] = list(sorted(licenses))
1139-
entry["license_paths"] = list(sorted(license_paths))
1138+
entry["licenses"] = sorted(licenses)
1139+
entry["license_paths"] = sorted(license_paths)
11401140
entry["license_public_domain"] = license_public_domain
11411141

11421142
res["extensions"][ext] = [entry]

ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ fix = true
33
[lint]
44
select = [
55
"B", # flake8-bugbear
6+
"C4",# flake8-comprehensions
67
"F", # Pyflakes (F)
78
"I", # isort
89
"UP", # pyupgrade

0 commit comments

Comments
 (0)