mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2025-06-05 05:02:23 +00:00
Fix some IDE warnings and suggestions
This commit is contained in:
parent
5613bf5acb
commit
8d961b8320
4 changed files with 20 additions and 18 deletions
|
@ -78,13 +78,15 @@ class VoctomixLowerThirdsExporter:
|
|||
encoding="unic",
|
||||
)
|
||||
|
||||
def _hex2rgb(self, hex_value):
|
||||
@staticmethod
|
||||
def _hex2rgb(hex_value):
|
||||
hex_value = hex_value.lstrip("#")
|
||||
# black insists this should have spaces around the :, but flake8
|
||||
# complains about spaces around the :, soooooo ....
|
||||
return tuple(int(hex_value[i : i + 2], 16) for i in (0, 2, 4)) # NOQA
|
||||
|
||||
def _fit_text(self, input_text, font, max_width):
|
||||
@staticmethod
|
||||
def _fit_text(input_text, font, max_width):
|
||||
words = [i.strip() for i in input_text.split()]
|
||||
lines = []
|
||||
line = []
|
||||
|
@ -177,7 +179,7 @@ class VoctomixLowerThirdsExporter:
|
|||
img.save(filename)
|
||||
self.log.debug(
|
||||
f"Generated single-speaker image for {speaker.get_display_name()!r} "
|
||||
"of talk {talk.submission.title!r}, saved as {filename}"
|
||||
f"of talk {talk.submission.title!r}, saved as {filename}"
|
||||
)
|
||||
return filename
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue