Skip to content

Commit

Permalink
no abbreviations
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Oct 28, 2024
1 parent e274cad commit e90d6d2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/textual/_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit e90d6d2

Please sign in to comment.