Merge "Don't use default mutable parameter"
This commit is contained in:
commit
7704797493
@ -70,7 +70,7 @@ class OpenStackActionGenerator(action_generator.ActionGenerator):
|
|||||||
base_action_class = None
|
base_action_class = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def prepare_action_inputs(cls, origin_inputs, added=[]):
|
def prepare_action_inputs(cls, origin_inputs, added=()):
|
||||||
"""Modify action input string.
|
"""Modify action input string.
|
||||||
|
|
||||||
Sometimes we need to change the default action input definition for
|
Sometimes we need to change the default action input definition for
|
||||||
|
@ -16,7 +16,7 @@ from pecan import hooks
|
|||||||
|
|
||||||
|
|
||||||
class ContentTypeHook(hooks.PecanHook):
|
class ContentTypeHook(hooks.PecanHook):
|
||||||
def __init__(self, content_type, methods=['GET']):
|
def __init__(self, content_type, methods=('GET',)):
|
||||||
"""Content type hook.
|
"""Content type hook.
|
||||||
|
|
||||||
This hook is needed for changing content type of
|
This hook is needed for changing content type of
|
||||||
|
@ -158,7 +158,7 @@ class BaseSpec(object):
|
|||||||
_version = '2.0'
|
_version = '2.0'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_schema(cls, includes=['meta', 'definitions']):
|
def get_schema(cls, includes=('meta', 'definitions')):
|
||||||
schema = copy.deepcopy(cls._schema)
|
schema = copy.deepcopy(cls._schema)
|
||||||
|
|
||||||
schema['properties'] = utils.merge_dicts(
|
schema['properties'] = utils.merge_dicts(
|
||||||
|
@ -107,7 +107,7 @@ class OnClauseSpec(base.BaseSpec):
|
|||||||
self._next = prepare_next_clause(data.get('next'))
|
self._next = prepare_next_clause(data.get('next'))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_schema(cls, includes=['definitions']):
|
def get_schema(cls, includes=('definitions',)):
|
||||||
return super(OnClauseSpec, cls).get_schema(includes)
|
return super(OnClauseSpec, cls).get_schema(includes)
|
||||||
|
|
||||||
def get_publish(self):
|
def get_publish(self):
|
||||||
|
@ -34,7 +34,7 @@ class PoliciesSpec(base.BaseSpec):
|
|||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_schema(cls, includes=['definitions']):
|
def get_schema(cls, includes=('definitions',)):
|
||||||
return super(PoliciesSpec, cls).get_schema(includes)
|
return super(PoliciesSpec, cls).get_schema(includes)
|
||||||
|
|
||||||
def __init__(self, data, validate):
|
def __init__(self, data, validate):
|
||||||
|
@ -37,7 +37,7 @@ class PublishSpec(base.BaseSpec):
|
|||||||
self._atomic = self._data.get('atomic')
|
self._atomic = self._data.get('atomic')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_schema(cls, includes=['definitions']):
|
def get_schema(cls, includes=('definitions',)):
|
||||||
return super(PublishSpec, cls).get_schema(includes)
|
return super(PublishSpec, cls).get_schema(includes)
|
||||||
|
|
||||||
def validate_semantics(self):
|
def validate_semantics(self):
|
||||||
|
@ -51,7 +51,7 @@ class RetrySpec(base.BaseSpec):
|
|||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_schema(cls, includes=['definitions']):
|
def get_schema(cls, includes=('definitions',)):
|
||||||
return super(RetrySpec, cls).get_schema(includes)
|
return super(RetrySpec, cls).get_schema(includes)
|
||||||
|
|
||||||
def __init__(self, data, validate):
|
def __init__(self, data, validate):
|
||||||
|
@ -50,7 +50,7 @@ class TaskDefaultsSpec(base.BaseSpec):
|
|||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_schema(cls, includes=['definitions']):
|
def get_schema(cls, includes=('definitions',)):
|
||||||
return super(TaskDefaultsSpec, cls).get_schema(includes)
|
return super(TaskDefaultsSpec, cls).get_schema(includes)
|
||||||
|
|
||||||
def __init__(self, data, validate):
|
def __init__(self, data, validate):
|
||||||
|
Loading…
Reference in New Issue
Block a user