Replace Union with union operator (#7596)

This commit is contained in:
Alex Waygood
2022-04-05 22:07:31 +01:00
committed by GitHub
parent 8ae678129e
commit 1ceb486b75
5 changed files with 19 additions and 22 deletions

View File

@@ -27,7 +27,6 @@ class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution):
def encode(self, encoding: str) -> str: ... # type: ignore[override] # incompatible with str
_PageElementT = TypeVar("_PageElementT", bound=PageElement)
# The wrapping Union[] can be removed once mypy fully supports | in type aliases.
_SimpleStrainable = str | bool | None | bytes | Pattern[str] | Callable[[str], bool] | Callable[[Tag], bool]
_Strainable = _SimpleStrainable | Iterable[_SimpleStrainable]
_SimpleNormalizedStrainable = str | bool | None | Pattern[str] | Callable[[str], bool] | Callable[[Tag], bool]