From c7627822847f9c5a45ea0d0a30e91347df6a9a5e Mon Sep 17 00:00:00 2001 From: Anderson Mesquita Date: Tue, 16 Dec 2014 14:39:37 -0800 Subject: [PATCH] Remove warnings when generating docs Improve docstrings so that syntax warnings are no longer displayed when generating docs. Related-Bug: 1403897 Change-Id: I0163bc7f83e00f9077fc78e638173df2124580dd --- doc/source/template_guide/hot_spec.rst | 2 +- heat/engine/properties.py | 15 ++++++--------- heat/engine/stack_resource.py | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/doc/source/template_guide/hot_spec.rst b/doc/source/template_guide/hot_spec.rst index 702083274..59ef937db 100644 --- a/doc/source/template_guide/hot_spec.rst +++ b/doc/source/template_guide/hot_spec.rst @@ -890,6 +890,6 @@ provided parameter. The script for doing this is provided as userdata to the compute instance, leveraging the str_replace function. Fn::Select ---------- +---------- *Fn::Select* is a function borrowed from CFN template. Please check the CFN template guide for a description. diff --git a/heat/engine/properties.py b/heat/engine/properties.py index 49665cf70..c342d3b94 100644 --- a/heat/engine/properties.py +++ b/heat/engine/properties.py @@ -481,16 +481,13 @@ class Properties(collections.Mapping): :param schema: A resource type's properties_schema :returns: A tuple of params and properties dicts - ex: input: {'foo': {'Type': 'String'}} - output: {'foo': {'Type': 'String'}}, - {'foo': {'Ref': 'foo'}} - - ex: input: {'foo': {'Type': 'List'}, 'bar': {'Type': 'Map'}} - output: {'foo': {'Type': 'CommaDelimitedList'} - 'bar': {'Type': 'Json'}}, - {'foo': {'Fn::Split': {'Ref': 'foo'}}, - 'bar': {'Ref': 'bar'}} + ex: input: {'foo': {'Type': 'List'}} + output: {'foo': {'Type': 'CommaDelimitedList'}}, + {'foo': {'Fn::Split': {'Ref': 'foo'}}} + ex: input: {'foo': {'Type': 'String'}, 'bar': {'Type': 'Map'}} + output: {'foo': {'Type': 'String'}, 'bar': {'Type': 'Json'}}, + {'foo': {'Ref': 'foo'}, 'bar': {'Ref': 'bar'}} """ def param_prop_def_items(name, schema): param_def = cls._param_def_from_prop(schema) diff --git a/heat/engine/stack_resource.py b/heat/engine/stack_resource.py index ea4290c66..0cb0718e5 100644 --- a/heat/engine/stack_resource.py +++ b/heat/engine/stack_resource.py @@ -76,8 +76,8 @@ class StackResource(resource.Resource): return True def nested(self, force_reload=False, show_deleted=False): - ''' - Return a Stack object representing the nested (child) stack. + '''Return a Stack object representing the nested (child) stack. + :param force_reload: Forces reloading from the DB instead of returning the locally cached Stack object :param show_deleted: Returns the stack even if it's been deleted