From 30266107979ff247e05108e2cef0eef6d2e77aff Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Tue, 22 Nov 2022 13:18:49 +0300 Subject: [PATCH] Mark `polib` as complete (#9244) --- stubs/polib/@tests/stubtest_allowlist.txt | 2 -- stubs/polib/METADATA.toml | 3 +++ stubs/polib/polib.pyi | 9 +++------ 3 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 stubs/polib/@tests/stubtest_allowlist.txt diff --git a/stubs/polib/@tests/stubtest_allowlist.txt b/stubs/polib/@tests/stubtest_allowlist.txt deleted file mode 100644 index 885e8a53b..000000000 --- a/stubs/polib/@tests/stubtest_allowlist.txt +++ /dev/null @@ -1,2 +0,0 @@ -polib.TextWrapper -polib._BaseFile.save diff --git a/stubs/polib/METADATA.toml b/stubs/polib/METADATA.toml index c9f594bd7..3706c3339 100644 --- a/stubs/polib/METADATA.toml +++ b/stubs/polib/METADATA.toml @@ -1 +1,4 @@ version = "1.1.*" + +[tool.stubtest] +ignore_missing_stub = false diff --git a/stubs/polib/polib.pyi b/stubs/polib/polib.pyi index 034db5849..03a0338b4 100644 --- a/stubs/polib/polib.pyi +++ b/stubs/polib/polib.pyi @@ -1,4 +1,3 @@ -import textwrap from collections.abc import Callable from typing import IO, Any, Generic, TypeVar, overload from typing_extensions import SupportsIndex @@ -39,7 +38,7 @@ class _BaseFile(list[_TB]): def append(self, entry: _TB) -> None: ... def insert(self, index: SupportsIndex, entry: _TB) -> None: ... def metadata_as_entry(self) -> POEntry: ... - def save(self, fpath: str | None = ..., repr_method: str = ...) -> None: ... + def save(self, fpath: str | None = ..., repr_method: str = ..., newline: str | None = ...) -> None: ... def find(self, st: str, by: str = ..., include_obsolete_entries: bool = ..., msgctxt: bool = ...) -> _TB | None: ... def ordered_metadata(self) -> list[tuple[str, str]]: ... def to_binary(self) -> bytes: ... @@ -79,6 +78,8 @@ class _BaseEntry: def __init__(self, *args: Any, **kwargs: Any) -> None: ... def __unicode__(self, wrapwidth: int = ...) -> str: ... def __eq__(self, other: object) -> bool: ... + @property + def msgid_with_context(self) -> str: ... class POEntry(_BaseEntry): comment: str @@ -152,7 +153,3 @@ class _MOFileParser(Generic[_TM]): def __init__(self, mofile: str, *args: Any, **kwargs: Any) -> None: ... def __del__(self) -> None: ... def parse(self) -> _TM: ... - -class TextWrapper(textwrap.TextWrapper): - drop_whitespace: bool - def __init__(self, *args: Any, **kwargs: Any) -> None: ...