mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
18 lines
502 B
Python
Executable File
18 lines
502 B
Python
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
import sys
|
|
|
|
import tomli
|
|
from utils import METADATA_MAPPING
|
|
|
|
platform = sys.platform
|
|
distributions = sys.argv[1:]
|
|
if not distributions:
|
|
distributions = os.listdir("stubs")
|
|
|
|
if platform in METADATA_MAPPING:
|
|
for distribution in distributions:
|
|
with open(f"stubs/{distribution}/METADATA.toml", "rb") as file:
|
|
for package in tomli.load(file).get("tool", {}).get("stubtest", {}).get(METADATA_MAPPING[platform], []):
|
|
print(package)
|