8000 Satisfy pytype · randomprin/python-fire@86ac268 · GitHub
[go: up one dir, main page]

Skip to content

Commit 86ac268

Browse files
dbiebercopybara-github
authored andcommitted
Satisfy pytype
PiperOrigin-RevId: 297916197 Change-Id: I718ce9ffa5a4c137d2d111eaf3ca842287cef114
1 parent c830177 commit 86ac268

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fire/completion.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ def MemberVisible(component, name, member, class_attrs=None, verbose=False):
298298
name: The name of the member.
299299
member: The member itself.
300300
class_attrs: (optional) If component is a class, provide this as:
301-
GetClassAttrsDict(component). If not provided, it will be computed.
301+
inspectutils.GetClassAttrsDict(component). If not provided, it will be
302+
computed.
302303
verbose: Whether to include private members.
303304
Returns
304305
A boolean value indicating whether the member should be included.
@@ -317,7 +318,7 @@ def MemberVisible(component, name, member, class_attrs=None, verbose=False):
317318
if inspect.isclass(component):
318319
# If class_attrs has not been provided, compute it.
319320
if class_attrs is None:
320-
class_attrs = inspectutils.GetClassAttrsDict(class_attrs)
321+
class_attrs = inspectutils.GetClassAttrsDict(class_attrs) or {}
321322
class_attr = class_attrs.get(name)
322323
if class_attr and class_attr.kind in ('method', 'property'):
323324
# methods and properties should be accessed on instantiated objects,

0 commit comments

Comments
 (0)
0