gh-132491: Rename annotationlib.value_to_string to type_repr (#132492)

This commit is contained in:
Jelle Zijlstra 2025-04-15 13:10:53 -07:00 committed by GitHub
parent 5e80fee41a
commit 11f6603845
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 26 deletions

View file

@ -253,7 +253,7 @@ def _type_repr(obj):
if isinstance(obj, tuple):
# Special case for `repr` of types with `ParamSpec`:
return '[' + ', '.join(_type_repr(t) for t in obj) + ']'
return _lazy_annotationlib.value_to_string(obj)
return _lazy_annotationlib.type_repr(obj)
def _collect_type_parameters(args, *, enforce_default_ordering: bool = True):