diff options
| author | robot-piglet <[email protected]> | 2026-04-20 22:42:15 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2026-04-20 23:22:58 +0300 |
| commit | 0a8c2fcdda39cdd0931c10b74b986befd5fdfd4f (patch) | |
| tree | 7fdb8dc855da68764843960869e26de6e5882f8f /contrib/python | |
| parent | a39b14e49a636652f1e9924d723660eca220a8a2 (diff) | |
Intermediate changes
commit_hash:94948f9e6866765fe454accbdc06fb886b67be81
Diffstat (limited to 'contrib/python')
4 files changed, 16 insertions, 3 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA index 0127fccfdec..bba5f25e82a 100644 --- a/contrib/python/hypothesis/py3/.dist-info/METADATA +++ b/contrib/python/hypothesis/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: hypothesis -Version: 6.151.10 +Version: 6.151.11 Summary: The property-based testing library for Python Author-email: "David R. MacIver and Zac Hatfield-Dodds" <[email protected]> License-Expression: MPL-2.0 diff --git a/contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py b/contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py index 5ca1fba3130..57116e8796d 100644 --- a/contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py +++ b/contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py @@ -93,6 +93,15 @@ __all__ = [ "pretty", ] +PRIMITIVE_TYPES_ALWAYS_USE_REPR = ( + int, + float, + str, + bytes, + bool, + type(None), +) + def _safe_getattr(obj: object, attr: str, default: Any | None = None) -> Any: """Safe version of getattr. @@ -195,6 +204,7 @@ class RepresentationPrinter: def pretty(self, obj: object, *, cycle: bool = False) -> None: """Pretty print the given object.""" + obj_id = id(obj) cycle = cycle or obj_id in self.stack self.stack.append(obj_id) @@ -418,6 +428,9 @@ class RepresentationPrinter: kwargs: dict[str, object], arg_labels: ArgLabelsT | None = None, ) -> None: + if isinstance(obj, PRIMITIVE_TYPES_ALWAYS_USE_REPR): + return _repr_pprint(obj, self, cycle) + # pprint this object as a call, _unless_ the call would be invalid syntax # and the repr would be valid and there are not comments on arguments. if cycle: diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py index efaa3fe7fde..64e99a51ccf 100644 --- a/contrib/python/hypothesis/py3/hypothesis/version.py +++ b/contrib/python/hypothesis/py3/hypothesis/version.py @@ -8,5 +8,5 @@ # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. -__version_info__ = (6, 151, 10) +__version_info__ = (6, 151, 11) __version__ = ".".join(map(str, __version_info__)) diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make index f92376ca08f..d5523958061 100644 --- a/contrib/python/hypothesis/py3/ya.make +++ b/contrib/python/hypothesis/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(6.151.10) +VERSION(6.151.11) LICENSE(MPL-2.0) |
