- commit
- fcff1de6366f66d6ebc3160cef7f9b00edff7052
- parent
- abb0ecad618bcdc1ebe53e517bbb285e8a3ae38e
- Author
- Tobias Bengfort <tobias.bengfort@gmx.net>
- Date
- 2014-10-11 10:52
use absolute imports
Diffstat
| M | dirtywords/__init__.py | 12 | +++++++----- |
| M | dirtywords/base.py | 3 | ++- |
| M | dirtywords/curses_core.py | 10 | ++++++---- |
| M | dirtywords/pygame_core.py | 6 | ++++-- |
| M | dirtywords/stupid_core.py | 6 | ++++-- |
| M | tests/shared_core.py | 6 | ++++-- |
| M | tests/test_curses.py | 8 | +++++--- |
| M | tests/test_pygame.py | 8 | +++++--- |
| M | tests/test_stupid.py | 8 | +++++--- |
9 files changed, 42 insertions, 25 deletions
diff --git a/dirtywords/__init__.py b/dirtywords/__init__.py
@@ -1,12 +1,14 @@ 1 1 # flake8: noqa 2 2 -1 3 from __future__ import absolute_import -1 4 3 5 try:4 -1 from curses_core import Screen-1 6 from .curses_core import Screen 5 7 except ImportError: 6 8 try:7 -1 from pygame_core import Screen-1 9 from .pygame_core import Screen 8 10 except ImportError:9 -1 from stupid_core import Screen-1 11 from .stupid_core import Screen 10 1211 -1 from base import Window12 -1 from base import AttrString-1 13 from .base import Window -1 14 from .base import AttrString
diff --git a/dirtywords/base.py b/dirtywords/base.py
@@ -16,11 +16,12 @@ implementation is chosen. 16 16 17 17 """ 18 18 -1 19 from __future__ import absolute_import 19 20 20 21 from time import time 21 22 import string 22 2323 -1 from constants import KEYS-1 24 from .constants import KEYS 24 25 25 26 26 27 class AttrString(unicode):
diff --git a/dirtywords/curses_core.py b/dirtywords/curses_core.py
@@ -1,12 +1,14 @@ -1 1 from __future__ import absolute_import -1 2 -1 3 import locale -1 4 1 5 try: 2 6 from ncurses import curses 3 7 except ImportError: 4 8 import curses 5 96 -1 import base7 -1 import locale8 -19 -1 from constants import KEYS-1 10 from . import base -1 11 from .constants import KEYS 10 12 11 13 12 14 class Screen(base.Screen):
diff --git a/dirtywords/pygame_core.py b/dirtywords/pygame_core.py
@@ -1,10 +1,12 @@ -1 1 from __future__ import absolute_import -1 2 1 3 import string 2 4 3 5 import pygame 4 6 from pygame.locals import KEYDOWN, KEYUP 5 76 -1 import base7 -1 from constants import KEYS-1 8 from . import base -1 9 from .constants import KEYS 8 10 9 11 10 12 class Screen(base.Screen):
diff --git a/dirtywords/stupid_core.py b/dirtywords/stupid_core.py
@@ -7,8 +7,10 @@ cross-platform. 7 7 8 8 """ 9 910 -1 import base11 -1 from constants import KEYS-1 10 from __future__ import absolute_import -1 11 -1 12 from . import base -1 13 from .constants import KEYS 12 14 13 15 14 16 class Screen(base.Screen):
diff --git a/tests/shared_core.py b/tests/shared_core.py
@@ -1,8 +1,10 @@ -1 1 from __future__ import absolute_import -1 2 1 3 import threading 2 4 from time import sleep 3 54 -1 from shared import unittest5 -1 from shared import PyKeyboard-1 6 from .shared import unittest -1 7 from .shared import PyKeyboard 6 8 7 9 from dirtywords.constants import KEYS 8 10
diff --git a/tests/test_curses.py b/tests/test_curses.py
@@ -1,6 +1,8 @@1 -1 from shared import unittest2 -1 from shared import PyKeyboard3 -1 import shared_core-1 1 from __future__ import absolute_import -1 2 -1 3 from .shared import unittest -1 4 from .shared import PyKeyboard -1 5 from . import shared_core 4 6 5 7 try: 6 8 from dirtywords.curses_core import Screen
diff --git a/tests/test_pygame.py b/tests/test_pygame.py
@@ -1,6 +1,8 @@1 -1 from shared import unittest2 -1 from shared import PyKeyboard3 -1 import shared_core-1 1 from __future__ import absolute_import -1 2 -1 3 from .shared import unittest -1 4 from .shared import PyKeyboard -1 5 from . import shared_core 4 6 5 7 try: 6 8 from dirtywords.pygame_core import Screen
diff --git a/tests/test_stupid.py b/tests/test_stupid.py
@@ -1,6 +1,8 @@1 -1 from shared import unittest2 -1 from shared import PyKeyboard3 -1 import shared_core-1 1 from __future__ import absolute_import -1 2 -1 3 from .shared import unittest -1 4 from .shared import PyKeyboard -1 5 from . import shared_core 4 6 5 7 try: 6 8 from dirtywords.stupid_core import Screen