qiskit-community / qiskit-optimization

Quantum Optimization
https://qiskit-community.github.io/qiskit-optimization/
Apache License 2.0
230 stars 141 forks source link

Add `max-positional-arguments` config #637

Closed t-imamichi closed 1 month ago

t-imamichi commented 1 month ago

Summary

Pylint 3.3 introduced a new check too-many-positional-arguments. https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/too-many-positional-arguments.html

This PR adds a config for the check.

Details and comments

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 11342429555

Details


Totals Coverage Status
Change from base Build 10312432197: 0.0%
Covered Lines: 4446
Relevant Lines: 4788

💛 - Coveralls
woodsp-ibm commented 1 month ago

On other apps we disabled the too many positional on the line it occurred. Any new code that was done with so many positional args, would get warned against so it could be improved - while setting the config this way it would just be accepted. I know in newer code we had tried to do better with some pos args and then using * to enforce keyword only. But yes it does have an issue with the older lint that is only supported in 3.8. For that one needs to add "unknown-option-value" to the list of lint errors in teh config that is ignored. Soon qiskit will drop support for 3.8 anyway and that then would be unnecessary.

t-imamichi commented 1 month ago

Thank you for your feedback, @woodsp-ibm. I then close this PR and review #635 so that we merge it soon.