@@ -83,7 +83,7 @@ def __init__(
83
83
anchor_point = None ,
84
84
anchored_position = None ,
85
85
scale = 1 ,
86
- ** kwargs
86
+ ** kwargs ,
87
87
):
88
88
if not max_glyphs and not text :
89
89
raise RuntimeError ("Please provide a max size, or initial text" )
@@ -94,12 +94,10 @@ def __init__(
94
94
# instance the Group
95
95
# self Group will contain a single local_group which contains a Group (self.local_group)
96
96
# which contains a TileGrid
97
- super ().__init__ (
98
- max_size = 1 , scale = 1 , ** kwargs
99
- ) # The self scale should always be 1
100
- self .local_group = displayio .Group (
101
- max_size = max_glyphs + 1 , scale = scale
102
- ) # local_group will set the scale
97
+ # The self scale should always be 1
98
+ super ().__init__ (max_size = 1 , scale = 1 , ** kwargs )
99
+ # local_group will set the scale
100
+ self .local_group = displayio .Group (max_size = max_glyphs + 1 , scale = scale )
103
101
self .append (self .local_group )
104
102
105
103
self .width = max_glyphs
@@ -203,7 +201,7 @@ def _get_ascent(self):
203
201
return self ._get_ascent_descent ()[0 ]
204
202
205
203
def _update_background_color (self , new_color ):
206
- """ Private class function that allows updating the font box background color
204
+ """Private class function that allows updating the font box background color
207
205
:param new_color: int color as an RGB hex number."""
208
206
209
207
if new_color is None :
@@ -230,9 +228,8 @@ def _update_background_color(self, new_color):
230
228
self ._boundingbox [3 ] + self ._padding_top + self ._padding_bottom > 0
231
229
)
232
230
):
233
- if (
234
- len (self .local_group ) > 0
235
- ): # This can be simplified in CP v6.0, when group.append(0) bug is corrected
231
+ # This can be simplified in CP v6.0, when group.append(0) bug is corrected
232
+ if len (self .local_group ) > 0 :
236
233
self .local_group .insert (
237
234
0 , self ._create_background_box (lines , y_offset )
238
235
)
0 commit comments