diff options
| author | Bryce Guinta <bryce.paul.guinta@gmail.com> | 2018-07-07 13:30:32 -0600 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-07-08 11:33:20 +0200 |
| commit | 87137def3e157909bfa571ce8a4c57a20f02d91c (patch) | |
| tree | 8625251179b60ce1e1350f09ecab4620f17a764b /astroid/bases.py | |
| parent | 6c742097b12df9491f90b1ceddf694c55281d17d (diff) | |
| download | astroid-git-87137def3e157909bfa571ce8a4c57a20f02d91c.tar.gz | |
Fix type.__new__ calls with incorrect arguments creating instances
Diffstat (limited to 'astroid/bases.py')
| -rw-r--r-- | astroid/bases.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/bases.py b/astroid/bases.py index 277ad316..c7b0cbc3 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -345,7 +345,7 @@ class UnboundMethod(Proxy): self._proxied.parent.frame().qname() == '%s.object' % BUILTINS): # XXX Avoid issue with type.__new__ inference. # https://github.com/PyCQA/astroid/issues/581 - if caller.args and len(caller.args) != 4: + if caller.args and len(caller.args) == 1: node_context = context.extra_context.get(caller.args[0]) infer = caller.args[0].infer(context=node_context) else: |
