Skip to content

Commit

Permalink
Add a key/value pairs parameter type
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewryanscott committed Feb 5, 2017
1 parent d4f0eea commit 4823b42
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sf/mmck/parameters.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from collections import OrderedDict

from sf.lib.orderedattrdict import OrderedAttrDict


Expand All @@ -24,6 +26,13 @@ def __init__(self, default=None, label=None, range=None, step=1):
self.step = step


class KeyValuePairs(Parameter):

def __init__(self, default=None, label=None):
default = default if default is not None else OrderedDict()
super().__init__(default, label)


class PathList(Parameter):

def __init__(self, default=None, label=None):
Expand Down

0 comments on commit 4823b42

Please sign in to comment.