-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Does not detect arguments supplied by decorator function #3108
Comments
Me too. Reproduce code:
Lint result:{
"resource": "/home/test.py",
"owner": "python",
"code": "no-value-for-parameter",
"severity": 8,
"message": "No value for argument 'program' in function call",
"source": "pylint",
"startLineNumber": 9,
"startColumn": 15,
"endLineNumber": 9,
"endColumn": 15
}
{
"resource": "/home/test.py",
"owner": "python",
"code": "no-value-for-parameter",
"severity": 8,
"message": "No value for argument 'name' in function call",
"source": "pylint",
"startLineNumber": 19,
"startColumn": 15,
"endLineNumber": 19,
"endColumn": 15
}
{
"resource": "/home/test.py",
"owner": "python",
"code": "no-value-for-parameter",
"severity": 8,
"message": "No value for argument 'delay' in function call",
"source": "pylint",
"startLineNumber": 19,
"startColumn": 15,
"endLineNumber": 19,
"endColumn": 15
} Version info:pylint 2.3.1 |
Right, this kind of analysis is not easily understood by |
Pylint does not detect arguments supplied by a decorator function. This is important for us as we use a decorator function to simplify our interface with our Postgres DB, and make it easy for us to mock all DB interaction logic using test data. I've created a simplified example below that shows the error.
Steps to reproduce
Run pylint on this code.
Current behavior
For the code above, pylint gives the following error message:
No value for argument 'db_data' in function call
despite that value always being provided.Expected behavior
No error message as the generator function will always ensure that the
get_users_created_at
function is called with a non-nulldb_data
argument.pylint --version output
The text was updated successfully, but these errors were encountered: