You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The alias _AnyStr has been traditionally used inside lxml-stubs to mean str | bytes, even before being cut off from typeshed. There isn't a big motivation yet to eliminate its usage so far, despite being easily confusable with typing.AnyStr.
Now that typing.AnyStr has been officially deprecated, and types-lxml is trying to update arguments where bytearray is applicable, the time might be appropriate to have _AnyStr gone for good. Even if an alias is desired, something like TextArg makes more sense and less likely mistaken as the deprecated TypeVar.
Tasks ahead
Search for places where _AnyStr is used for single purpose
attribute value comes to mind, especially inside SupportsLaxedItems mapping (233adc9)
For remaining usages, slowly test for bytearray and replace arguments
Maybe really create a TextArg alias for this purpose
The text was updated successfully, but these errors were encountered:
The alias
_AnyStr
has been traditionally used insidelxml-stubs
to meanstr | bytes
, even before being cut off fromtypeshed
. There isn't a big motivation yet to eliminate its usage so far, despite being easily confusable withtyping.AnyStr
.Now that
typing.AnyStr
has been officially deprecated, andtypes-lxml
is trying to update arguments wherebytearray
is applicable, the time might be appropriate to have_AnyStr
gone for good. Even if an alias is desired, something likeTextArg
makes more sense and less likely mistaken as the deprecatedTypeVar
.Tasks ahead
_AnyStr
is used for single purposeSupportsLaxedItems
mapping (233adc9)bytearray
and replace argumentsTextArg
alias for this purposeThe text was updated successfully, but these errors were encountered: