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

Globally disable a new pylint check: too-many-positional-arguments #6909

Closed
janezd opened this issue Oct 7, 2024 · 0 comments · Fixed by #6925
Closed

Globally disable a new pylint check: too-many-positional-arguments #6909

janezd opened this issue Oct 7, 2024 · 0 comments · Fixed by #6925
Assignees

Comments

@janezd
Copy link
Contributor

janezd commented Oct 7, 2024

A new pylint check is going to bite us in Pylint 3.3 (2024-09-20): by default, pylint now complains about functions that have more then five (positional) arguments (pylint-dev/pylint#9099). That is, it warns when it encounters a function like def f(a=1, b=2, c=3, d=4, e=5, f=6).

I suggest globally disabling this check in Orange and related projects.

  1. There was a dissenting opinion that there is "no obvious refactoring path for reasonable number of positional-only arguments" (unfortunately the comment was too late to be taken into consideration).
  2. I don't think this is something we need to worry about in our code base. Our functions with many arguments usually have default values and we use named arguments in function calls, so these arguments are effectively keyword-only, although not marked as such.
  3. We relatively rarely specify arguments as keywords-only (by putting a * in the argument list), so fixing this could take us a person-week -- and it wouldn't be time well-spent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant