mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-08 19:05:14 +08:00
fixed for loop in exception issue combined with usage of an exception variable
This commit is contained in:
1 parent
401914e91c
commit
e106e4ffc8
2 files changed
+6
-1
No files matched your search
@@ -274,8 +274,9 @@ class NameFinder(object):
|
||||
|
||||
# check for `except X as y` usages, because y needs to be instantiated.
|
||||
p = stmt.parent
|
||||
# TODO this looks really hacky, improve parser representation!
|
||||
if isinstance(p, pr.Flow) and p.command == 'except' \
|
||||
and p.get_defined_names(is_internal_call=True) == [name]:
|
||||
and p.inputs and p.inputs[0].as_names == [name]:
|
||||
# TODO check for types that are not classes and add it to the
|
||||
# static analysis report.
|
||||
types = list(chain.from_iterable(
|
||||
|
||||
Reference in new issue
Block a user