mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-27 14:21:13 +08:00
Fix type hint for msgctxt parameter in polib (#12506)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from collections.abc import Callable
|
||||
from typing import IO, Any, Generic, SupportsIndex, TypeVar, overload
|
||||
from typing import IO, Any, Generic, Literal, SupportsIndex, TypeVar, overload
|
||||
|
||||
_TB = TypeVar("_TB", bound=_BaseEntry)
|
||||
_TP = TypeVar("_TP", bound=POFile)
|
||||
@@ -38,7 +38,9 @@ class _BaseFile(list[_TB]):
|
||||
def insert(self, index: SupportsIndex, entry: _TB) -> None: ...
|
||||
def metadata_as_entry(self) -> POEntry: ...
|
||||
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 find(
|
||||
self, st: str, by: str = ..., include_obsolete_entries: bool = ..., msgctxt: str | Literal[False] = ...
|
||||
) -> _TB | None: ...
|
||||
def ordered_metadata(self) -> list[tuple[str, str]]: ...
|
||||
def to_binary(self) -> bytes: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user