diff options
author | Redoubts <Redoubts@users.noreply.github.com> | 2021-10-23 16:13:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-23 22:13:23 +0200 |
commit | 7c5f8e2c5674dbb7455e40690b7c9df567c400b6 (patch) | |
tree | b580c5a398ec71ba28d260fd32d5032b64cb0cfa | |
parent | 7d668becd784f935ffa12b21bc457efa96e3981c (diff) | |
download | astroid-7c5f8e2c5674dbb7455e40690b7c9df567c400b6.tar.gz |
Update brain_typing.py (#1220)
Solves the specific crash in #1149
-rw-r--r-- | astroid/brain/brain_typing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/brain/brain_typing.py b/astroid/brain/brain_typing.py index 4eabaf0e..d0e30e05 100644 --- a/astroid/brain/brain_typing.py +++ b/astroid/brain/brain_typing.py @@ -394,7 +394,7 @@ def infer_typing_cast( try: func = next(node.func.infer(context=ctx)) - except InferenceError as exc: + except (InferenceError, StopIteration) as exc: raise UseInferenceDefault from exc if ( not isinstance(func, FunctionDef) |