Skip to content

Commit 995f3de

Browse files
author
Margaret Matocha
committed
ran black
1 parent e60fb65 commit 995f3de

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

adafruit_display_text/label.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,27 @@ def anchored_position(self):
259259
"""Position relative to the anchor_point. Tuple containing x,y
260260
pixel coordinates."""
261261
return (
262-
int(self.x + self._boundingbox[0] + self._anchor_point[0] * self._boundingbox[2]),
263-
int(self.y + self._boundingbox[1] + self._anchor_point[1] * self._boundingbox[3]),
262+
int(
263+
self.x
264+
+ self._boundingbox[0]
265+
+ self._anchor_point[0] * self._boundingbox[2]
266+
),
267+
int(
268+
self.y
269+
+ self._boundingbox[1]
270+
+ self._anchor_point[1] * self._boundingbox[3]
271+
),
264272
)
265273

266274
@anchored_position.setter
267275
def anchored_position(self, new_position):
268-
self.x = int(new_position[0] - self._boundingbox[0] - self._anchor_point[0] * self._boundingbox[2])
269-
self.y = int(new_position[1] - self._boundingbox[1] - self._anchor_point[1] * self._boundingbox[3])
276+
self.x = int(
277+
new_position[0]
278+
- self._boundingbox[0]
279+
- self._anchor_point[0] * self._boundingbox[2]
280+
)
281+
self.y = int(
282+
new_position[1]
283+
- self._boundingbox[1]
284+
- self._anchor_point[1] * self._boundingbox[3]
285+
)

0 commit comments

Comments
 (0)