Skip to content

Commit

Permalink
Add back Sandbox.remove_type.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed May 22, 2024
1 parent ab5bb48 commit 66abc93
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions law/sandbox/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ def join_key(cls, _type, name):
"""
return str(_type) + cls.delimiter + str(name)

@classmethod
def remove_type(cls, key):
# check for key format
cls.check_key(key)

# remove leading type if present
return key.split(cls.delimiter, 1)[-1]

@classmethod
def create_variables(cls, name):
return cls.variable_cls.from_name(name)
Expand Down

0 comments on commit 66abc93

Please sign in to comment.