pylint-bot / test

0 stars 0 forks source link

Check for Starred when checking the number of arguments passed to functions #186

Open pylint-bot opened 9 years ago

pylint-bot commented 9 years ago

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?)


There are a lot of places, especially in astroid.brain.builtin_transform, where we're checking the number of arguments the given builtin received, giving up the custom inference if the arguments mismatches.

Recently, since the changes related to Python 3.5 support, in Call.args we can have Starred nodes, which needs to be unpacked before verifying the number of arguments.

#!python

slice(*(1, 2, 3))
getattr(*("a", attr, None))
...