Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions traitlets/utils/descriptions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import inspect
import re
import six
import types
import inspect


def describe(article, value, name=None, verbose=False, capital=False):
Expand Down Expand Up @@ -73,7 +72,7 @@ class name where an object was defined.

if article == "the" or (article is None and not inspect.isclass(value)):
if name is not None:
result = "%s %s" % (typename, name)
result = "{} {}".format(typename, name)
if article is not None:
return add_article(result, True, capital)
else:
Expand Down Expand Up @@ -167,8 +166,5 @@ def repr_type(obj):
error messages.
"""
the_type = type(obj)
if six.PY2 and the_type is types.InstanceType:
# Old-style class.
the_type = obj.__class__
msg = '%r %r' % (obj, the_type)
msg = '{!r} {!r}'.format(obj, the_type)
return msg