Use dashes instead of underscores for METADATA.toml field names (#15614)

This commit is contained in:
lev-blit
2026-04-07 16:03:53 +03:00
committed by GitHub
parent 7eb0dddd46
commit 563213272e
204 changed files with 365 additions and 362 deletions
+2 -2
View File
@@ -134,11 +134,11 @@ def create_metadata(project: str, stub_dir: Path, version: str) -> None:
if upstream_repo_url is None:
warning = (
f"\nCould not find a URL pointing to the source code for {project!r}.\n"
f"Please add it as `upstream_repository` to `stubs/{project}/METADATA.toml`, if possible!\n"
f"Please add it as `upstream-repository` to `stubs/{project}/METADATA.toml`, if possible!\n"
)
print(termcolor.colored(warning, "red"))
else:
metadata += f'upstream_repository = "{upstream_repo_url}"\n'
metadata += f'upstream-repository = "{upstream_repo_url}"\n'
print(f"Writing {filename}")
filename.write_text(metadata, encoding="UTF-8")
+1 -1
View File
@@ -607,7 +607,7 @@ def parse_no_longer_updated_from_archive(source: zipfile.ZipFile | tarfile.TarFi
with file as f:
toml_data: dict[str, object] = tomllib.load(f)
no_longer_updated = toml_data.get("no_longer_updated", False)
no_longer_updated = toml_data.get("no-longer-updated", False)
assert type(no_longer_updated) is bool
return bool(no_longer_updated)