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

Enable additional pylint checks #545

Open
11 tasks
garrison opened this issue Apr 12, 2024 · 1 comment
Open
11 tasks

Enable additional pylint checks #545

garrison opened this issue Apr 12, 2024 · 1 comment
Labels
code quality Related to style, linters, etc. low priority

Comments

@garrison
Copy link
Member

I ran pylint in its default configuration, and I noticed some additional checks that might be useful to us. We should investigate whether turning each of these on will benefit us. There is currently at least one example of each of the following violations in the code base.

  • consider-using-generator
  • consider-using-f-string
  • unidiomatic-typecheck
  • wrong-import-order
  • wrong-import-position
  • unnecessary-comprehension
  • no-else-return
  • arguments-renamed
  • consider-using-enumerate
  • unnecessary-lambda
  • consider-merging-isinstance
@garrison garrison added low priority code quality Related to style, linters, etc. labels Apr 12, 2024
@garrison
Copy link
Member Author

We'll need to disable wrong-import-order and wrong-import-position on the notebooks, as we deliberately import things right before we use them in the docs. But that will be easy because they are actually processed in a separate call to pylint:

https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/67f24cb4e8e067eebad1f351ce971df8dc115f61/tox.ini#L33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Related to style, linters, etc. low priority
Projects
None yet
Development

No branches or pull requests

1 participant