Move exceptions to their own sub-module

This removes the circular dependency introduced in PR#137. This also
fixes up an issue in the base meta-class which meant it wasn't working
in Python 3 (only Python 2), and adds a bit to the meta-class to allow
docstrings to be inherited (taken from the rest-docs branch).
This commit is contained in:
Dave Jones
2016-01-07 10:54:17 +00:00
parent 7976966d38
commit 59ba7154c5
6 changed files with 57 additions and 45 deletions

View File

@@ -12,18 +12,8 @@ from itertools import repeat
from RPi import GPIO
from .devices import (
GPIODeviceError,
GPIODeviceClosed,
GPIODevice,
GPIOThread,
CompositeDevice,
SourceMixin,
)
class OutputDeviceError(GPIODeviceError):
pass
from .exc import OutputDeviceError, GPIODeviceError, GPIODeviceClosed
from .devices import GPIODevice, GPIOThread, CompositeDevice, SourceMixin
class OutputDevice(SourceMixin, GPIODevice):