I have a script where I unpack sys.argv into a function, like so:
import sys
def do_something(a, b):
"""
It doesn't matter what this function does.
"""
print(a + b)
if __name__ == "__main__":
do_something(*sys.argv[1:])
When I execute the script, everything works fine (of course, in my real script I make sure that there are enough args).
The problem is when I run this script through pylint version 2.6.0, with python 3.8.1, I get the following error:
************* Module script
script.py:12:4: E1120: No value for argument 'a' in function call (no-value-for-parameter)
script.py:12:4: E1120: No value for argument 'b' in function call (no-value-for-parameter)
Which is an error that does not appear when using a lower version of pylint (1.9.5) with python 2.7.18
I have tried unpacking sys.argv in an intermediary variable, but the pylint error did not change.
Does anybody know if there is a way for me to fix this ?
Thanks in advance.