Simplify utils.qualname.
This commit is contained in:
parent
c4183bc34d
commit
c67f7b6b21
@ -555,10 +555,8 @@ def qualname(obj):
|
||||
else:
|
||||
name = repr(obj)
|
||||
|
||||
if inspect.isclass(obj) or inspect.isfunction(obj):
|
||||
module = obj.__module__
|
||||
return "{}.{}".format(module, name)
|
||||
elif inspect.ismethod(obj):
|
||||
if (inspect.isclass(obj) or inspect.isfunction(obj) or
|
||||
inspect.ismethod(obj)):
|
||||
return "{}.{}".format(obj.__module__, name)
|
||||
else:
|
||||
return name
|
||||
|
Loading…
Reference in New Issue
Block a user