pyupgrade: drop a usage of `typing.Text`
This is the `typing_text` fixer in `pyupgrade`. This type was meant to be for
py2/py3 interoperability, being bytes on py2 and str on py3.
--- a/mercurial/encoding.py Mon Jan 06 00:30:55 2025 -0500
+++ b/mercurial/encoding.py Mon Jan 06 00:38:32 2025 -0500
@@ -16,7 +16,6 @@
from typing import (
Any,
Callable,
- Text,
TypeVar,
)
@@ -386,7 +385,7 @@
return ucolwidth(s.decode(_sysstr(encoding), 'replace'))
-def ucolwidth(d: Text) -> int:
+def ucolwidth(d: str) -> int:
"""Find the column width of a Unicode string for display"""
eaw = getattr(unicodedata, 'east_asian_width', None)
if eaw is not None: