зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1354012 - Fixed nice_type_name function always returning basestring. r=gfritzsche
Changed isinstance function to issubclass function since the nice_type_name function takes a type object as its input
This commit is contained in:
Родитель
11a7bc6f33
Коммит
8838b5602f
|
@ -20,7 +20,7 @@ DATE_PATTERN = r'^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
|
|||
|
||||
|
||||
def nice_type_name(t):
|
||||
if isinstance(t, basestring):
|
||||
if issubclass(t, basestring):
|
||||
return "string"
|
||||
return t.__name__
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче