Skip to content

Commit 8d7c279

Browse files
djareckacmungall
andauthored
fixing option use_attributes: removing attributes from schema.slots (#133)
Co-authored-by: Chris Mungall <cjm@berkeleybop.org>
1 parent 2502b99 commit 8d7c279

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

schemasheets/schemamaker.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import logging
77
import tempfile
88
from urllib.request import urlopen
9+
from copy import copy
910

1011
import click
1112
import yaml
@@ -236,7 +237,10 @@ def get_current_element(self, elt: Element) -> Union[Element, PermissibleValue]:
236237
if isinstance(elt, ClassDefinition):
237238
ix = sc.classes
238239
elif isinstance(elt, SlotDefinition):
239-
ix = sc.slots
240+
if self.use_attributes:
241+
ix = copy(sc.slots)
242+
else:
243+
ix = sc.slots
240244
elif isinstance(elt, EnumDefinition):
241245
ix = sc.enums
242246
elif isinstance(elt, TypeDefinition):

0 commit comments

Comments
 (0)