This commit is contained in:
parent
f070121e5c
commit
8dce1569c0
@ -72,8 +72,7 @@ class Word:
|
||||
style = container.style
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {
|
||||
type(container).__name__} must have a 'style' property")
|
||||
f"Container {type(container).__name__} must have a 'style' property")
|
||||
|
||||
# Inherit background from container if not provided
|
||||
if background is None and hasattr(container, 'background'):
|
||||
@ -128,8 +127,7 @@ class Word:
|
||||
container.add_word(word)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_word' method")
|
||||
f"Container {type(container).__name__} must have an 'add_word' method")
|
||||
|
||||
return word
|
||||
|
||||
@ -228,8 +226,7 @@ class FormattedSpan:
|
||||
style = container.style
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {
|
||||
type(container).__name__} must have a 'style' property")
|
||||
f"Container {type(container).__name__} must have a 'style' property")
|
||||
|
||||
# Inherit background from container if not provided
|
||||
if background is None and hasattr(container, 'background'):
|
||||
@ -243,8 +240,7 @@ class FormattedSpan:
|
||||
container.add_span(span)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_span' method")
|
||||
f"Container {type(container).__name__} must have an 'add_span' method")
|
||||
|
||||
return span
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user