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

False positive "Not enough arguments for format string" with starred expression #957

Closed
jwilk opened this issue Jun 26, 2016 · 4 comments
Closed
Assignees
Labels
Bug 🪲 Minor 💅 Polishing pylint is always nice

Comments

@jwilk
Copy link
Contributor

jwilk commented Jun 26, 2016

Current behavior

pylint emits "Not enough arguments for format string" for this valid program:

meat = ['spam', 'ham']
print('%s%s%s' % ('eggs', *meat))

pylint --version output

No config file found, using default configuration
pylint 1.5.6, 
astroid 1.4.6
Python 3.5.2rc1 (default, Jun 13 2016, 09:33:26) 
[GCC 5.4.0 20160609]
@PCManticore
Copy link
Contributor

Thanks, looking into it!

@wolfy1339
Copy link

Seeing the same issue when referencing a function from self.
Example code:

class foo(object):
    def la(self, arg1):
        [...]

    def ma(self):
        self.la(arg1)

@PCManticore
Copy link
Contributor

@wolfy1339 I don't know what you mean, that snippet of code does not emit the error we are talking about in this issue.

@wolfy1339
Copy link

Oops, you're right

@PCManticore PCManticore added Bug 🪲 Minor 💅 Polishing pylint is always nice labels Jan 22, 2017
rogalski added a commit to rogalski/pylint that referenced this issue Jan 26, 2017
@rogalski rogalski self-assigned this Jan 26, 2017
rogalski added a commit to rogalski/astroid that referenced this issue Jan 30, 2017
Just a POC, needs:

1) Guidance on if it’s a correct way to solve a problem
2) Extra tests
3) Docs entries

Aims to solve pylint-dev/pylint#957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 Minor 💅 Polishing pylint is always nice
Projects
None yet
Development

No branches or pull requests

4 participants