Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected-keyword-arg false positive for subprocess.Popen in Python 3.6 #1393

Closed
eight04 opened this issue Mar 22, 2017 · 1 comment
Closed
Labels
Good first issue Friendly and approachable by new contributors Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade)
Milestone

Comments

@eight04
Copy link

eight04 commented Mar 22, 2017

Steps to reproduce

When linting following snippet

from subprocess import Popen, PIPE

Popen("foo", stdin=PIPE, stdout=PIPE, encoding="utf-8")

Current behavior

No config file found, using default configuration
************* Module test
C:  1, 0: Missing module docstring (missing-docstring)
C:  3, 0: Invalid constant name "p" (invalid-name)
E:  3, 4: Unexpected keyword argument 'encoding' in constructor call (unexpected
-keyword-arg)

----------------------------------------------------------------------
Your code has been rated at -25.00/10 (previous run: -25.00/10, +0.00)

Expected behavior

encoding and errors are new in python 3.6 and shouldn't raise unexpected-keyword-arg.

I think there are other functions under subprocess also affect by this.

pylint --version output

No config file found, using default configuration
pylint 1.7.0,
astroid 1.5.0
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (In
tel)]
@rogalski rogalski added Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Good first issue Friendly and approachable by new contributors labels Mar 23, 2017
@rogalski
Copy link
Contributor

Thank you for submitting a bug!

Root cause is an incomplete definition in astroid.brain module.

Pull requests are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Friendly and approachable by new contributors Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade)
Projects
None yet
Development

No branches or pull requests

2 participants