kopia lustrzana https://github.com/corrscope/corrscope
misc
rodzic
a096f0ffe9
commit
992702f317
|
@ -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__}')
|
||||
|
|
|
@ -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(
|
||||
|
|
Ładowanie…
Reference in New Issue