diff --git a/src/textual/_resolve.py b/src/textual/_resolve.py index f752681986..4c588eefc8 100644 --- a/src/textual/_resolve.py +++ b/src/textual/_resolve.py @@ -104,9 +104,9 @@ def resolve_fraction_unit( Returns: The value of 1fr. """ - F = Fraction + _Fraction = Fraction if not remaining_space or not widget_styles: - return F(1) + return _Fraction(1) initial_space = remaining_space @@ -156,19 +156,19 @@ def resolve_scalar( while remaining_fraction > 0: remaining_space_changed = False - resolve_fraction = F(remaining_space, remaining_fraction) + resolve_fraction = _Fraction(remaining_space, remaining_fraction) for index, (scalar, min_value, max_value) in enumerate(resolve): value = resolved[index] if value is None: resolved_scalar = scalar.resolve(size, viewport_size, resolve_fraction) if min_value is not None and resolved_scalar < min_value: remaining_space -= min_value - remaining_fraction -= F(scalar.value) + remaining_fraction -= _Fraction(scalar.value) resolved[index] = min_value remaining_space_changed = True elif max_value is not None and resolved_scalar > max_value: remaining_space -= max_value - remaining_fraction -= F(scalar.value) + remaining_fraction -= _Fraction(scalar.value) resolved[index] = max_value remaining_space_changed = True