bs4: NavigableString accepts ReadableBuffer (#10106)

It delegates to str.__new__.
This commit is contained in:
Jelle Zijlstra
2023-04-29 07:54:09 -07:00
committed by GitHub
parent 17edf76275
commit 4e52cf1b71

View File

@@ -1,4 +1,4 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, ReadableBuffer
from collections.abc import Callable, Iterable, Iterator
from re import Pattern
from typing import Any, Generic, TypeVar, overload
@@ -182,7 +182,7 @@ class NavigableString(str, PageElement):
PREFIX: str
SUFFIX: str
known_xml: bool | None
def __new__(cls, value: str | bytes) -> Self: ...
def __new__(cls, value: str | ReadableBuffer) -> Self: ...
def __copy__(self) -> Self: ...
def __getnewargs__(self) -> tuple[str]: ...
def output_ready(self, formatter: Formatter | str | None = "minimal") -> str: ...