terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.84k stars 248 forks source link

Python Hinting causes issues with function parameter count #354

Open lp55 opened 2 years ago

lp55 commented 2 years ago

Hi,

I noticed that when using certain type hinting on function parameters causes issues on the parameter count. Here's an example:

def fun(param: Union[str, List, int], param2: Union[str, List, int]): x = 2 return x

Lizard's output has a PARAM value of 6, when it should be 2.