diff options
| author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2011-09-07 09:40:21 +0200 |
|---|---|---|
| committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2011-09-07 09:40:21 +0200 |
| commit | 1893abe541c185a4401c6f452a93c1e8cc34ad07 (patch) | |
| tree | f80b3e7e216bd1bafca13bc6b5c50bc29b6c36d6 /test/regrtest_data | |
| parent | 3312c16d1fdb85ce7e3046d10605634a4df6a46a (diff) | |
| download | pylint-1893abe541c185a4401c6f452a93c1e8cc34ad07.tar.gz | |
closes #74087: handle case where inference of a module return YES
This avoid some cases of "TypeError: '_Yes' object does not support indexing"
when conditionally assigning a nonexisting module to intermediate modules in
a dotted name.
This is only a cosmetic fix to avoid the crash, the actual fix probably
needs a lot of work on the inference module to support conditional
assignment and inspection of several places of assignment, rather than just
the latest one. Probably not worth it, either.
patch by Google
Diffstat (limited to 'test/regrtest_data')
| -rw-r--r-- | test/regrtest_data/import_assign.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/regrtest_data/import_assign.py b/test/regrtest_data/import_assign.py new file mode 100644 index 0000000..c01cd52 --- /dev/null +++ b/test/regrtest_data/import_assign.py @@ -0,0 +1,5 @@ +import shmixml.dom.minidom +import xml.dom.minidom + +if 'dom' not in xml.__dict__: + xml.dom = shmixml.dom |
