Skip to content

Commit 12f9b50

Browse files
jbamptonchriddyp
authored andcommitted
Fix one line docstrings https://www.python.org/dev/peps/pep-0257/#one-line-docstrings One line docstrings should fit on one line and end with a period
1 parent d2e27bf commit 12f9b50

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Diff for: dash/development/base_component.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,15 @@ def __getitem__(self, id):
120120
return self._get_set_or_delete(id, 'get')
121121

122122
def __setitem__(self, id, item):
123-
"""Set an element by its ID
124-
"""
123+
"""Set an element by its ID."""
125124
return self._get_set_or_delete(id, 'set', item)
126125

127126
def __delitem__(self, id):
128-
"""Delete items by ID in the tree of children
129-
"""
127+
"""Delete items by ID in the tree of children."""
130128
return self._get_set_or_delete(id, 'delete')
131129

132130
def traverse(self):
133-
"""Yield each item in the tree"""
131+
"""Yield each item in the tree."""
134132
children = getattr(self, 'children', None)
135133

136134
# children is just a component
@@ -149,17 +147,15 @@ def traverse(self):
149147
yield t
150148

151149
def __iter__(self):
152-
"""Yield IDs in the tree of children
153-
"""
150+
"""Yield IDs in the tree of children."""
154151
for t in self.traverse():
155152
if (isinstance(t, Component) and
156153
getattr(t, 'id', None) is not None):
157154

158155
yield t.id
159156

160157
def __len__(self):
161-
"""Return the number of items in the tree
162-
"""
158+
"""Return the number of items in the tree."""
163159
# TODO - Should we return the number of items that have IDs
164160
# or just the number of items?
165161
# The number of items is more intuitive but returning the number

0 commit comments

Comments
 (0)