diff --git a/stubs/boltons/METADATA.toml b/stubs/boltons/METADATA.toml index 9c5868f7d067..7a5f5eb62b1f 100644 --- a/stubs/boltons/METADATA.toml +++ b/stubs/boltons/METADATA.toml @@ -1,2 +1,2 @@ -version = "26.1.*" +version = "26.2.*" upstream-repository = "https://github.com/mahmoud/boltons" diff --git a/stubs/boltons/boltons/cacheutils.pyi b/stubs/boltons/boltons/cacheutils.pyi index 978da569d563..8067421667ff 100644 --- a/stubs/boltons/boltons/cacheutils.pyi +++ b/stubs/boltons/boltons/cacheutils.pyi @@ -47,7 +47,7 @@ class LRI(dict[_KT, _VT]): @overload def setdefault(self, key: _KT, default: _VT) -> _VT: ... - def update(self, E: SupportsKeysAndGetItem[_KT, _VT] | Iterable[tuple[_KT, _VT]], **F: _VT) -> None: ... # type: ignore[override] + def update(self, E: SupportsKeysAndGetItem[_KT, _VT] | Iterable[tuple[_KT, _VT]] = (), **F: _VT) -> None: ... # type: ignore[override] class LRU(LRI[_KT, _VT]): def __getitem__(self, key: _KT) -> _VT: ... diff --git a/stubs/boltons/boltons/funcutils.pyi b/stubs/boltons/boltons/funcutils.pyi index 1a964c7d8abc..96ec5b410cec 100644 --- a/stubs/boltons/boltons/funcutils.pyi +++ b/stubs/boltons/boltons/funcutils.pyi @@ -51,7 +51,7 @@ class FunctionBuilder: name: Incomplete def __init__(self, name, **kw) -> None: ... def get_sig_str(self, with_annotations: bool = True): ... - def get_invocation_str(self): ... + def get_invocation_str(self, target: Callable[..., object] | None = None) -> str: ... @classmethod def from_func(cls, func): ... def get_func(self, execdict=None, add_source: bool = True, with_dict: bool = True): ... diff --git a/stubs/boltons/boltons/jsonutils.pyi b/stubs/boltons/boltons/jsonutils.pyi index 276db26ef881..7352d3ad4030 100644 --- a/stubs/boltons/boltons/jsonutils.pyi +++ b/stubs/boltons/boltons/jsonutils.pyi @@ -7,9 +7,13 @@ def reverse_iter_lines( file_obj: IO[bytes], blocksize: int = 4096, preseek: bool = True, encoding: None = None ) -> Generator[bytes]: ... @overload -def reverse_iter_lines(file_obj: IO[str], blocksize: int = 4096, preseek: bool = True, *, encoding: str) -> Generator[str]: ... +def reverse_iter_lines( + file_obj: IO[str], blocksize: int = 4096, preseek: bool = True, encoding: str | None = None +) -> Generator[str]: ... +@overload +def reverse_iter_lines(file_obj: IO[bytes], blocksize: int = 4096, preseek: bool = True, *, encoding: str) -> Generator[str]: ... @overload -def reverse_iter_lines(file_obj: IO[str], blocksize: int, preseek: bool, encoding: str) -> Generator[str]: ... +def reverse_iter_lines(file_obj: IO[bytes], blocksize: int, preseek: bool, encoding: str) -> Generator[str]: ... class JSONLIterator: ignore_errors: bool diff --git a/stubs/boltons/boltons/statsutils.pyi b/stubs/boltons/boltons/statsutils.pyi index 4165b8a16373..525569e1fbce 100644 --- a/stubs/boltons/boltons/statsutils.pyi +++ b/stubs/boltons/boltons/statsutils.pyi @@ -35,6 +35,7 @@ class Stats: mean: _StatsProperty max: _StatsProperty min: _StatsProperty + mode: _StatsProperty median: _StatsProperty iqr: _StatsProperty trimean: _StatsProperty @@ -61,6 +62,7 @@ def describe( mean: Incomplete median: Incomplete +mode: Incomplete iqr: Incomplete trimean: Incomplete variance: Incomplete diff --git a/stubs/boltons/boltons/strutils.pyi b/stubs/boltons/boltons/strutils.pyi index 2eae46714980..71b94cbcd22a 100644 --- a/stubs/boltons/boltons/strutils.pyi +++ b/stubs/boltons/boltons/strutils.pyi @@ -65,8 +65,10 @@ def multi_replace(text: str, sub_map: dict[str, str], **kwargs) -> str: ... def unwrap_text(text: str, ending: str | None = "\n\n") -> str: ... def removeprefix(text: str, prefix: str) -> str: ... def human_readable_list(items: Sequence[str], delimiter: str = ",", conjunction: str = "and", *, oxford: bool = True) -> str: ... +def ellipsize(text: str, max_len: int = 160, *, ellipsis: str = "…") -> str: ... __all__ = [ + "ellipsize", "camel2under", "under2camel", "slugify", diff --git a/stubs/boltons/boltons/timeutils.pyi b/stubs/boltons/boltons/timeutils.pyi index 7416be362361..35971a434041 100644 --- a/stubs/boltons/boltons/timeutils.pyi +++ b/stubs/boltons/boltons/timeutils.pyi @@ -55,6 +55,7 @@ class USTimeZone(tzinfo): def tzname(self, dt: datetime | None) -> str: ... def utcoffset(self, dt: datetime | None) -> timedelta: ... def dst(self, dt: datetime | None) -> timedelta: ... + def fromutc(self, dt: datetime) -> datetime: ... Eastern: USTimeZone Central: USTimeZone