mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Deprecate pallets stubs (#5424)
Part of #5423 * Support new metadata fields in check_consistent
This commit is contained in:
@@ -21,6 +21,7 @@ consistent_files = [
|
||||
{"stdlib/@python2/builtins.pyi", "stdlib/@python2/__builtin__.pyi"},
|
||||
{"stdlib/threading.pyi", "stdlib/_dummy_threading.pyi"},
|
||||
]
|
||||
metadata_keys = {"version", "python2", "python3", "requires", "extra_description", "obsolete_since"}
|
||||
|
||||
|
||||
def assert_stubs_only(directory):
|
||||
@@ -161,9 +162,7 @@ def check_metadata():
|
||||
major, minor = version.split(".")
|
||||
assert major.isdigit() and minor.isdigit(), msg
|
||||
for key in data:
|
||||
assert key in {
|
||||
"version", "python2", "python3", "requires"
|
||||
}, f"Unexpected key {key} for {distribution}"
|
||||
assert key in metadata_keys, f"Unexpected key {key} for {distribution}"
|
||||
assert isinstance(data.get("python2", False), bool), f"Invalid python2 value for {distribution}"
|
||||
assert isinstance(data.get("python3", True), bool), f"Invalid python3 value for {distribution}"
|
||||
assert isinstance(data.get("requires", []), list), f"Invalid requires value for {distribution}"
|
||||
|
||||
Reference in New Issue
Block a user