diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-06-12 09:55:57 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-06-15 17:15:53 -0400 |
commit | f931da1b87f1896660ec58c0e2434125c6306080 (patch) | |
tree | 52cd764d040dcab4ff1c32e1111a03e02503aeca /klippy/extras/display | |
parent | 6edc2946db9758b4a77a72ad8818240f3a7ae096 (diff) | |
download | kutter-f931da1b87f1896660ec58c0e2434125c6306080.tar.gz kutter-f931da1b87f1896660ec58c0e2434125c6306080.tar.xz kutter-f931da1b87f1896660ec58c0e2434125c6306080.zip |
extras: Use "from . import module" for relative imports
Use alternate import syntax to improve Python3 compatibility.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/display')
-rw-r--r-- | klippy/extras/display/__init__.py | 2 | ||||
-rw-r--r-- | klippy/extras/display/display.py | 2 | ||||
-rw-r--r-- | klippy/extras/display/st7920.py | 2 | ||||
-rw-r--r-- | klippy/extras/display/uc1701.py | 3 |
4 files changed, 5 insertions, 4 deletions
diff --git a/klippy/extras/display/__init__.py b/klippy/extras/display/__init__.py index c839b098..1cea00e0 100644 --- a/klippy/extras/display/__init__.py +++ b/klippy/extras/display/__init__.py @@ -3,7 +3,7 @@ # Copyright (C) 2018 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. -import display +from . import display def load_config(config): return display.load_config(config) diff --git a/klippy/extras/display/display.py b/klippy/extras/display/display.py index fdeb3e4c..3bdc47ea 100644 --- a/klippy/extras/display/display.py +++ b/klippy/extras/display/display.py @@ -6,7 +6,7 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import logging, os, ast -import hd44780, st7920, uc1701, menu +from . import hd44780, st7920, uc1701, menu LCD_chips = { 'st7920': st7920.ST7920, 'hd44780': hd44780.HD44780, diff --git a/klippy/extras/display/st7920.py b/klippy/extras/display/st7920.py index 19828943..c0810378 100644 --- a/klippy/extras/display/st7920.py +++ b/klippy/extras/display/st7920.py @@ -4,7 +4,7 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import logging -import font8x14 +from . import font8x14 BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000 diff --git a/klippy/extras/display/uc1701.py b/klippy/extras/display/uc1701.py index 921d3be4..b3157607 100644 --- a/klippy/extras/display/uc1701.py +++ b/klippy/extras/display/uc1701.py @@ -5,7 +5,8 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import logging -import font8x14, extras.bus +import extras.bus +from . import font8x14 BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000 |