pull/357/head
nyanpasu64 2018-07-28 04:04:30 -07:00
rodzic a096f0ffe9
commit 992702f317
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -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__}')

Wyświetl plik

@ -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(