code quality improvements

This commit is contained in:
Ace
2024-05-11 23:25:40 +02:00
parent 6a825d431c
commit 9346fcf750
6 changed files with 14 additions and 15 deletions

View File

@@ -2,13 +2,11 @@
Inkycal ePaper driving functions
Copyright by aceisace
"""
import os
from importlib import import_module
import PIL
from PIL import Image
from inkycal.custom import top_level
from inkycal.display.supported_models import supported_models
@@ -199,9 +197,7 @@ class Display:
>>> Display.get_display_names()
"""
driver_files = top_level + '/inkycal/display/drivers/'
drivers = [i for i in os.listdir(driver_files) if i.endswith(".py") and not i.startswith("__") and "_" in i]
return drivers
return supported_models.keys()
if __name__ == '__main__':

View File

@@ -28,8 +28,6 @@ THE SOFTWARE.
"""
import logging
import os
import subprocess
import sys
import time
@@ -128,4 +126,3 @@ implementation = RaspberryPi()
for func in [x for x in dir(implementation) if not x.startswith('_')]:
setattr(sys.modules[__name__], func, getattr(implementation, func))