diff --git a/stubs/xxhash/METADATA.toml b/stubs/xxhash/METADATA.toml index 4a8e90c0c..d9f5a3241 100644 --- a/stubs/xxhash/METADATA.toml +++ b/stubs/xxhash/METADATA.toml @@ -1 +1,4 @@ version = "3.0.*" + +[tool.stubtest] +ignore_missing_stub = false diff --git a/stubs/xxhash/xxhash.pyi b/stubs/xxhash/xxhash.pyi index ff9b4446c..a98e66caf 100644 --- a/stubs/xxhash/xxhash.pyi +++ b/stubs/xxhash/xxhash.pyi @@ -4,6 +4,9 @@ from typing_extensions import SupportsIndex, final VERSION: str XXHASH_VERSION: str +VERSION_TUPLE: tuple[int, ...] + +algorithms_available: set[str] class _IntDigestHash(_Hash): @property diff --git a/tests/check_consistent.py b/tests/check_consistent.py index 3d006f9f3..1b06b5db9 100755 --- a/tests/check_consistent.py +++ b/tests/check_consistent.py @@ -20,7 +20,7 @@ import tomli consistent_files = [{"stdlib/@python2/builtins.pyi", "stdlib/@python2/__builtin__.pyi"}] metadata_keys = {"version", "requires", "extra_description", "obsolete_since", "no_longer_updated", "tool"} -tool_keys = {"stubtest": {"skip", "apt_dependencies"}} +tool_keys = {"stubtest": {"skip", "apt_dependencies", "ignore_missing_stub"}} allowed_files = {"README.md"} diff --git a/tests/stubtest_third_party.py b/tests/stubtest_third_party.py index 16a904c25..ad76fb948 100755 --- a/tests/stubtest_third_party.py +++ b/tests/stubtest_third_party.py @@ -66,19 +66,17 @@ def run_stubtest(dist: Path, *, verbose: bool = False) -> bool: print_command_failure("Failed to install", e) return False + ignore_missing_stub = ["--ignore-missing-stub"] if stubtest_meta.get("ignore_missing_stub", True) else [] packages_to_check = [d.name for d in dist.iterdir() if d.is_dir() and d.name.isidentifier()] modules_to_check = [d.stem for d in dist.iterdir() if d.is_file() and d.suffix == ".pyi"] stubtest_cmd = [ python_exe, "-m", "mypy.stubtest", - # Use --ignore-missing-stub, because if someone makes a correct addition, they'll need to - # also make a allowlist change and if someone makes an incorrect addition, they'll run into - # false negatives. - "--ignore-missing-stub", # Use --custom-typeshed-dir in case we make linked changes to stdlib or _typeshed "--custom-typeshed-dir", str(dist.parent.parent), + *ignore_missing_stub, *packages_to_check, *modules_to_check, ]