aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-06-14 17:46:04 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-06-14 18:00:06 +0300
commit85f6451860166545196ffa2950aa68be2363733b (patch)
tree4443b7b2465bda4bdc3589314f258329ecaedb38 /contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py
parentfa297dd4855aef4bd79faebb48120708d2f9249d (diff)
downloadydb-85f6451860166545196ffa2950aa68be2363733b.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py')
-rw-r--r--contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py
index c1f05f9439..2e6f5dd4eb 100644
--- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py
+++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/dimension.py
@@ -2,6 +2,7 @@
Layout dimensions are used to give the minimum, maximum and preferred
dimensions for containers and controls.
"""
+
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Callable, Union
@@ -105,15 +106,15 @@ class Dimension:
def __repr__(self) -> str:
fields = []
if self.min_specified:
- fields.append("min=%r" % self.min)
+ fields.append(f"min={self.min!r}")
if self.max_specified:
- fields.append("max=%r" % self.max)
+ fields.append(f"max={self.max!r}")
if self.preferred_specified:
- fields.append("preferred=%r" % self.preferred)
+ fields.append(f"preferred={self.preferred!r}")
if self.weight_specified:
- fields.append("weight=%r" % self.weight)
+ fields.append(f"weight={self.weight!r}")
- return "Dimension(%s)" % ", ".join(fields)
+ return "Dimension({})".format(", ".join(fields))
def sum_layout_dimensions(dimensions: list[Dimension]) -> Dimension: