| priority | important |
|---|---|
| type | bug |
| appeared in | <not specified> |
| done in | 0.24.1 |
| load | 0.500 |
| load left | 0.000 |
| closed by | #984:31dd11229614 |
| Logilab.org | anonymous [register] [login]
|
logilab-astng #46273 wrong type inference for subprocess.Popen(...).communicate(...) [validation pending]
|
Comments
Test case:
#!/usr/bin/env python
import subprocess
a, b = subprocess.Popen('true', stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
print a.strip()
E1103: 4: Instance of 'list' has no 'strip' member (but some types could not be inferred)
Test case:
#!/usr/bin/env python
import subprocess
a, b = subprocess.Popen('true', stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
print a.strip()
E1103: 4: Instance of 'list' has no 'strip' member (but some types could not be inferred)
I have this issue to
+1
I have this issue as well.
+1
for those to which this matters: this is a good opportunity to contribute to the pylint-brain :)
more info here: http://www.logilab.org/blogentry/100364
This bug is corrected by a functionnality implemented in pylint-brain
Since the bug fix we now get:
#!/usr/bin/env python
import subprocess
a = subprocess.Popen('true').wait()
E1101: 3,4: Instance of 'Popen' has no 'wait' member
I have the same problem with Popen - wait, returncode and stdin yield E1101
Me 2.
The bugfix didn't completely fix the issues, I'm still getting :
Instance of 'Popen' has no 'wait' member
Instance of 'Popen' has no 'returncode' member