diff options
author | Aaron Iles <aaron.iles@gmail.com> | 2013-01-07 21:07:11 +1100 |
---|---|---|
committer | Aaron Iles <aaron.iles@gmail.com> | 2013-01-07 21:07:11 +1100 |
commit | 7c028773209651a50c77e6d36a935bcf3ee837b7 (patch) | |
tree | 5c29ae09e408e50914c89caec3fdbcde7c77ba29 /funcsigs | |
parent | 4ea7e19b8dd9a0a42c4e574f88ea6f432bf5392c (diff) | |
download | funcsigs-7c028773209651a50c77e6d36a935bcf3ee837b7.tar.gz |
Special case the type object fail
Due to differences between PyPy and CPython the type object needs to be
special cased to raise a ValueError on PyPy as well as CPython.
Diffstat (limited to 'funcsigs')
-rw-r--r-- | funcsigs/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/funcsigs/__init__.py b/funcsigs/__init__.py index 82d868d..f2924c3 100644 --- a/funcsigs/__init__.py +++ b/funcsigs/__init__.py @@ -38,6 +38,8 @@ def formatannotation(annotation, base_module=None): def _get_user_defined_method(cls, method_name, *nested): try: + if cls is type: + return meth = getattr(cls, method_name) for name in nested: meth = getattr(meth, name, meth) |