mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-04 19:28:50 +08:00
Fix for _SimpleStrainable type def (#5810)
Modified definitions of _SimpleStrainable and _SimpleNormalizedStrainable to include Callable[[Tag], bool] (see https://www.crummy.com/software/BeautifulSoup/bs4/doc/#a-function)
This commit is contained in:
1 parent
955a3e5d9d
commit
69c56b9496
1 file changed
+2
-2
@@ -27,9 +27,9 @@ class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution):
|
||||
|
||||
_PageElementT = TypeVar("_PageElementT", bound=PageElement)
|
||||
# The wrapping Union[] can be removed once mypy fully supports | in type aliases.
|
||||
_SimpleStrainable = Union[str, bool, None, bytes, Pattern[str], Callable[[str], bool]]
|
||||
_SimpleStrainable = Union[str, bool, None, bytes, Pattern[str], Callable[[str], bool], Callable[[Tag], bool]]
|
||||
_Strainable = Union[_SimpleStrainable, Iterable[_SimpleStrainable]]
|
||||
_SimpleNormalizedStrainable = Union[str, bool, None, Pattern[str], Callable[[str], bool]]
|
||||
_SimpleNormalizedStrainable = Union[str, bool, None, Pattern[str], Callable[[str], bool], Callable[[Tag], bool]]
|
||||
_NormalizedStrainable = Union[_SimpleNormalizedStrainable, Iterable[_SimpleNormalizedStrainable]]
|
||||
|
||||
class PageElement:
|
||||
|
||||
Reference in new issue
Block a user