python 3.11 & code quality improvements

This commit is contained in:
Ace
2023-11-07 22:49:48 +01:00
parent 4f2dacc35a
commit 93c968da53
24 changed files with 243 additions and 151 deletions

View File

@@ -96,9 +96,10 @@ class Stocks(inkycal_module):
# Set some parameters for formatting feeds
line_spacing = 1
line_height = self.font.getsize('hg')[1] + line_spacing
text_bbox_height = self.font.getbbox("hg")
line_height = text_bbox_height[3] - text_bbox_height[1] + line_spacing
line_width = im_width
max_lines = (im_height // (self.font.getsize('hg')[1] + line_spacing))
max_lines = (im_height // line_height)
logger.debug(f"max_lines: {max_lines}")