From 38d0f691e6afba8e88347726b7d56ed361ffd7bf Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 15 Oct 2022 17:16:41 +0300 Subject: [PATCH] Mark `entrypoints` as complete (#8901) --- stubs/entrypoints/@tests/stubtest_allowlist.txt | 2 ++ stubs/entrypoints/METADATA.toml | 3 +++ stubs/entrypoints/entrypoints.pyi | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 stubs/entrypoints/@tests/stubtest_allowlist.txt diff --git a/stubs/entrypoints/@tests/stubtest_allowlist.txt b/stubs/entrypoints/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..7bfaa84f2 --- /dev/null +++ b/stubs/entrypoints/@tests/stubtest_allowlist.txt @@ -0,0 +1,2 @@ +# staticmethod weirdness: +entrypoints.CaseSensitiveConfigParser.optionxform diff --git a/stubs/entrypoints/METADATA.toml b/stubs/entrypoints/METADATA.toml index 582104d3a..de6579f75 100644 --- a/stubs/entrypoints/METADATA.toml +++ b/stubs/entrypoints/METADATA.toml @@ -1 +1,4 @@ version = "0.4.*" + +[tool.stubtest] +ignore_missing_stub = false diff --git a/stubs/entrypoints/entrypoints.pyi b/stubs/entrypoints/entrypoints.pyi index 15f19e99c..ce9eb7869 100644 --- a/stubs/entrypoints/entrypoints.pyi +++ b/stubs/entrypoints/entrypoints.pyi @@ -23,6 +23,8 @@ class NoSuchEntryPoint(Exception): name: str def __init__(self, group: str, name: str) -> None: ... +class CaseSensitiveConfigParser(ConfigParser): ... + class EntryPoint: name: str module_name: str @@ -40,6 +42,8 @@ class Distribution: name: str version: str def __init__(self, name: str, version: str) -> None: ... + @classmethod + def from_name_version(cls: type[Self], name: str) -> Self: ... def iter_files_distros( path: Sequence[str] | None = ..., repeated_distro: str = ...