Skip to content

Commit

Permalink
fixing option use_attributes: removing attributes from schema.slots (#…
Browse files Browse the repository at this point in the history
…133)

Co-authored-by: Chris Mungall <cjm@berkeleybop.org>
  • Loading branch information
djarecka and cmungall committed Mar 4, 2024
1 parent 2502b99 commit 8d7c279
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion schemasheets/schemamaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import logging
import tempfile
from urllib.request import urlopen
from copy import copy

import click
import yaml
Expand Down Expand Up @@ -236,7 +237,10 @@ def get_current_element(self, elt: Element) -> Union[Element, PermissibleValue]:
if isinstance(elt, ClassDefinition):
ix = sc.classes
elif isinstance(elt, SlotDefinition):
ix = sc.slots
if self.use_attributes:
ix = copy(sc.slots)
else:
ix = sc.slots
elif isinstance(elt, EnumDefinition):
ix = sc.enums
elif isinstance(elt, TypeDefinition):
Expand Down

0 comments on commit 8d7c279

Please sign in to comment.