From d012158e9a6ba18240bbd2a97fbec5153716b098 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Wed, 29 Nov 2017 12:12:58 +1000 Subject: [PATCH] Use """triple double quotes""" around docstrings. https://www.python.org/dev/peps/pep-0257/ --- dash/development/base_component.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dash/development/base_component.py b/dash/development/base_component.py index 72aa027548..808d404b36 100644 --- a/dash/development/base_component.py +++ b/dash/development/base_component.py @@ -111,26 +111,26 @@ def _get_set_or_delete(self, id, operation, new_item=None): # - __len__ def __getitem__(self, id): - '''Recursively find the element with the given ID through the tree + """Recursively find the element with the given ID through the tree of children. - ''' + """ # A component's children can be undefined, a string, another component, # or a list of components. return self._get_set_or_delete(id, 'get') def __setitem__(self, id, item): - '''Set an element by its ID - ''' + """Set an element by its ID + """ return self._get_set_or_delete(id, 'set', item) def __delitem__(self, id): - '''Delete items by ID in the tree of children - ''' + """Delete items by ID in the tree of children + """ return self._get_set_or_delete(id, 'delete') def traverse(self): - '''Yield each item in the tree''' + """Yield each item in the tree""" children = getattr(self, 'children', None) # children is just a component @@ -149,8 +149,8 @@ def traverse(self): yield t def __iter__(self): - '''Yield IDs in the tree of children - ''' + """Yield IDs in the tree of children + """ for t in self.traverse(): if (isinstance(t, Component) and getattr(t, 'id', None) is not None): @@ -158,8 +158,8 @@ def __iter__(self): yield t.id def __len__(self): - '''Return the number of items in the tree - ''' + """Return the number of items in the tree + """ # TODO - Should we return the number of items that have IDs # or just the number of items? # The number of items is more intuitive but returning the number