zaptec icon indicating copy to clipboard operation
zaptec copied to clipboard

Fix all ruff-issues and enable automatic linting

Open steinmn opened this issue 6 months ago • 4 comments

Automatic linting is currently disabled because there are over 300 code quality issues that need to be resolved before the test would pass.

steinmn avatar Jul 29 '25 18:07 steinmn

@sveinse Should we add a "Code Quality" label or something similar to distinguish this type of issue from the enhancements concerning user-facing functionality?

steinmn avatar Jul 29 '25 19:07 steinmn

Code quality created. The function "sub-issue" is also good thing to catch them under one (this?) umbrella.

Edit

I wonder, is pass all ruff-issues a milestone of its own? We could create one for that if that makes sense.

sveinse avatar Jul 29 '25 19:07 sveinse

When looking at the lint errors ruff provides, I think we shouldn't blindly start changing to code to pass the lint error. We also need to evaluate if that particular rule makes sense for us. HA has a very long list of exceptions and we've just adopted a few. So we should also update the exception rules where it makes sense.

sveinse avatar Jul 29 '25 19:07 sveinse

The function "sub-issue" is also good thing to catch them under one (this?) umbrella.

You need at least triage permissions for a repository to add sub-issues, so I don't have that option here.

I wonder, is pass all ruff-issues a milestone of its own?

One milestone for linting and one for testing maybe?

steinmn avatar Jul 29 '25 19:07 steinmn