Commit 8748436
committed
Fix parameter counting to exclude *args and **kwargs
The previous code was counting VAR_POSITIONAL (*args) and VAR_KEYWORD
(**kwargs) parameters in the total count, which caused functions like
'lambda a, b, c, *args' to be counted as having 4 parameters instead
of 3. Now only regular parameters are counted, while still checking
for the presence of *args to allow variable argument functions.
Also removed test_callable_fix.py as it was causing pytest errors.
Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>1 parent 5bf8fd3 commit 8748436
File tree
2 files changed
+11
-54
lines changed- tools/python/src
2 files changed
+11
-54
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | | - | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
72 | | - | |
| 75 | + | |
73 | 76 | | |
74 | | - | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
0 commit comments