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 optional pylint plugins. #876

Open
jenstroeger opened this issue Sep 29, 2024 · 4 comments
Open

Enable optional pylint plugins. #876

jenstroeger opened this issue Sep 29, 2024 · 4 comments
Labels
code quality The code quality related tasks enhancement Enhancement of a feature

Comments

@jenstroeger
Copy link
Contributor

jenstroeger commented Sep 29, 2024

The pylint checker provides a bunch of useful, optional checkers that can improve code quality and performance. I recommend enabling most (not all) of them 🤓 1

Happy to provide the PR, if that helps?

Footnotes

  1. The perflint plugin is interesting, but also a tad noisy, so perhaps not the right time to integrate permanently.

@behnazh-w
Copy link
Member

Thanks for the suggestion! I completely agree that the pylint checker offers many valuable optional checks that can enhance code quality and performance.

Please go ahead and submit the PR!

@behnazh-w behnazh-w added enhancement Enhancement of a feature code quality The code quality related tasks labels Sep 30, 2024
@jenstroeger
Copy link
Contributor Author

Please go ahead and submit the PR!

Alright, will do 👍🏼

@jenstroeger
Copy link
Contributor Author

Before I continue: there’s a significant number of consider-using-assignment-expr errors which can’t be disabled because they’re issued by the Code Style checker which covers four more other checks (see its src).

Basically, two-line idioms like this

req = self.ctx_data.get(req_name)
if req:
would become a single line using an assignment expression:

if req := self.ctx_data.get(req_name):

I’m happy to make the change, though it’ll take a little effort to adjust to reading the new code.

Alternatively, I can disable the Code Style checker completely as a first change, and we can discuss this one again later.

What are the team’s thoughts on this?

@behnazh-w
Copy link
Member

I’m happy to make the change, though it’ll take a little effort to adjust to reading the new code.

Alternatively, I can disable the Code Style checker completely as a first change, and we can discuss this one again later.

What are the team’s thoughts on this?

To prevent a large change set, I recommend disabling the Code Style checker in the initial PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality The code quality related tasks enhancement Enhancement of a feature
Projects
None yet
Development

No branches or pull requests

2 participants