Skip to content
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

Python: see false positive "too many arguments" #3617

Closed
Junchao-Mellanox opened this issue Jun 4, 2020 · 2 comments
Closed

Python: see false positive "too many arguments" #3617

Junchao-Mellanox opened this issue Jun 4, 2020 · 2 comments

Comments

@Junchao-Mellanox
Copy link

I have a Fan class which takes 2 mandatory args and 3 optional args, but LGTM report 3 errors for oneline:
Call to 2 Values with too many arguments; should be no more than 2.
Call to 4 Values with too many arguments; should be no more than 3.
Call to 3 Values with too many arguments; should be no more than 4.

https://lgtm.com/projects/g/Azure/sonic-buildimage/snapshot/e5fa9e1f0332301bd2543f9cda87c0f676acab6d/files/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py?sort=name&dir=ASC&mode=heatmap#xd37274ac53a618c6:1

@RasmusWL
Copy link
Member

RasmusWL commented Jun 4, 2020

Agreed that this looks odd, thanks for reporting 👍

There seems to be a lot of definitions of class Fan residing in multiple sonic_platform/fan.py files in different subfolders. For example:

@tausbn, think it makes most sense that you look at this in regard to the work you're doing on the module resolution? 😊

@tausbn
Copy link
Contributor

tausbn commented Jun 4, 2020

Yeah, this looks like a bug in the module resolution. I will investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants