summaryrefslogtreecommitdiff
path: root/funcsigs
diff options
context:
space:
mode:
authorTripp Lilley <tripplilley@gmail.com>2013-01-18 11:30:42 -0500
committerTripp Lilley <tripplilley@gmail.com>2013-01-18 11:30:42 -0500
commita08e4437a27eefdeb77c00aa09f1f5bf8ac68984 (patch)
tree94d31e1a52c69c281ee46b7eb8ebb5fdc8b54862 /funcsigs
parent130414e246c8236e20c70f7c4558b6d7ce9d6eb2 (diff)
downloadfuncsigs-a08e4437a27eefdeb77c00aa09f1f5bf8ac68984.tar.gz
fix annotation formatting for builtin types in Python 2.x
Diffstat (limited to 'funcsigs')
-rw-r--r--funcsigs/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/funcsigs/__init__.py b/funcsigs/__init__.py
index f2924c3..b9ba326 100644
--- a/funcsigs/__init__.py
+++ b/funcsigs/__init__.py
@@ -30,7 +30,7 @@ _NonUserDefinedCallables = (_WrapperDescriptor,
def formatannotation(annotation, base_module=None):
if isinstance(annotation, type):
- if annotation.__module__ in ('builtins', base_module):
+ if annotation.__module__ in ('builtins', '__builtin__', base_module):
return annotation.__name__
return annotation.__module__+'.'+annotation.__name__
return repr(annotation)