attrs & enum based replacement for devicedependent

This change replaces the simple lists and dictionaries
defined in brother_ql/devicedependent.py with data class
definitions based on attrs. They are split into two
new modules:

* brother_ql/models.py and
* brother_ql/labels.py.

To keep the compatibility with other software relying on
this package, the old brother_ql/devicedependent.py module
can still be imported. Its content is recreated with the
help of the new modules in some _populate_legacy_structures()
functions.
This commit is contained in:
Philipp Klaus
2019-01-13 01:24:18 +01:00
parent df31020d4d
commit 1cfc7e7302
5 changed files with 293 additions and 163 deletions
+3
View File
@@ -43,6 +43,9 @@ setup(name='brother_ql',
"packbits",
"pillow>=3.3.0",
"pyusb",
'attrs',
'typing;python_version<"3.5"',
'enum34;python_version<"3.4"',
],
extras_require = {
#'brother_ql_analyse': ["matplotlib",],