diff --git a/ovgenpy/config.py b/ovgenpy/config.py index 0fdae17..d418745 100644 --- a/ovgenpy/config.py +++ b/ovgenpy/config.py @@ -2,6 +2,7 @@ from io import StringIO from typing import ClassVar from ovgenpy.utils.keyword_dataclasses import dataclass, fields +# from dataclasses import dataclass, fields from ruamel.yaml import yaml_object, YAML @@ -92,6 +93,7 @@ class _ConfigMixin: value = getattr(self, key) typ = field.type + # FIXME crashes on generics, https://github.com/Stewori/pytypes ? if not isinstance(value, typ): name = type(self).__name__ raise OvgenError(f'{name}.{key} was supplied {repr(value)}, should be of type {typ.__name__}') diff --git a/ovgenpy/renderer.py b/ovgenpy/renderer.py index f15c127..ca14a36 100644 --- a/ovgenpy/renderer.py +++ b/ovgenpy/renderer.py @@ -94,7 +94,8 @@ class MatplotlibRenderer: # Create Axes # https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplots.html if self.fig: - plt.close(self.fig) # FIXME + raise Exception("I don't currently expect to call set_layout() twice") + plt.close(self.fig) axes2d: np.ndarray['Axes'] self.fig, axes2d = plt.subplots(