refactor continues
Python CI / test (push) Successful in 6m35s

This commit is contained in:
2025-11-07 19:26:32 +01:00
parent f72c6015c6
commit b1553f1628
18 changed files with 796 additions and 1433 deletions
+5 -1
View File
@@ -6,7 +6,6 @@ from pyWebLayout.style import Alignment, Font, FontStyle, FontWeight, TextDecora
from pyWebLayout.abstract import Word
from pyWebLayout.abstract.inline import LinkedWord
from pyWebLayout.abstract.functional import Link
from .functional import LinkText, ButtonText
from PIL import Image, ImageDraw, ImageFont
from typing import Tuple, Union, List, Optional, Protocol
import numpy as np
@@ -395,6 +394,8 @@ class Line(Box):
# Try to add the full word - create LinkText for LinkedWord, regular Text otherwise
if isinstance(word, LinkedWord):
# Import here to avoid circular dependency
from .functional import LinkText
# Create a LinkText which includes the link functionality
# LinkText constructor needs: (link, text, font, draw, source, line)
# But LinkedWord itself contains the link properties
@@ -591,6 +592,9 @@ class Line(Box):
int(size[1]) if hasattr(size, '__getitem__') else 0
)
# Import here to avoid circular dependency
from .functional import LinkText, ButtonText
if isinstance(text_obj, LinkText):
result = QueryResult(
object=text_obj,