diff --git a/pozo/drawable.py b/pozo/drawable.py index 0f4d8d2c..3f90f5d9 100644 --- a/pozo/drawable.py +++ b/pozo/drawable.py @@ -12,7 +12,7 @@ class VersionedProperty: def __set_name__(self, owner, name): - if type(owner) == str(Drawable): + if not issubclass(owner, Drawable): raise AttributeError(f"{name} must be a member of a class inheriting pozo.drawable.Drawable, not {owner}. Is type {type(owner)}.") self._private_name = "_" + name self._name = name diff --git a/pozo/themes/__init__.py b/pozo/themes/__init__.py index ad4560dc..b9fea8ff 100644 --- a/pozo/themes/__init__.py +++ b/pozo/themes/__init__.py @@ -1,8 +1,11 @@ import copy -import colour import json -from IPython.display import display, HTML + +import colour +from IPython.display import HTML, display + import pozo.themes.mnemonic_tables as tables +from pozo.themes.theme_tools import ColorWheel, MnemonicDictionary, default_theme ThemeValues = dict(color="Can be a single color value or list of color values from colour package", track_width="A number in pixels", @@ -108,7 +111,6 @@ def get_theme(self): return self._get_theme() # Above are inheritables -from pozo.themes.theme_tools import * # should it be relative? # Below is implementations themes = {'cangrejo': MnemonicDictionary(tables.cangrejo)} cangrejo = MnemonicDictionary(tables.cangrejo) diff --git a/pozo/themes/mnemonic_tables.py b/pozo/themes/mnemonic_tables.py index c1e88efb..a9433bb7 100644 --- a/pozo/themes/mnemonic_tables.py +++ b/pozo/themes/mnemonic_tables.py @@ -32,18 +32,6 @@ "scale": "log", "range_unit": "ohm * meter", }, - "LLD" : { - "color" : "red", - "range": [0.2, 2000], - "scale": "log", - "range_unit": "ohm * meter", - }, - "LLD" : { - "color" : "red", - "range": [0.2, 2000], - "scale": "log", - "range_unit": "ohm * meter", - }, "LLD" : { "color" : "red", "range": [0.2, 2000],