Skip to content

Comments

Updated ruff settings and fixed the simplest errors in the code#247

Merged
sveinse merged 2 commits intocustom-components:masterfrom
sveinse:feature-linting-fixes
Jul 27, 2025
Merged

Updated ruff settings and fixed the simplest errors in the code#247
sveinse merged 2 commits intocustom-components:masterfrom
sveinse:feature-linting-fixes

Conversation

@sveinse
Copy link
Collaborator

@sveinse sveinse commented Jul 26, 2025

This PR fixes the most low-hanging fruits of the lint errors in the code. The PR also configures a few exceptions to ruff, that are too strict. I've used HA as a template to guide what settings should be enabled or disabled.

There are more lint errors remaining, and when someone takes a stab at it, we should also continue to evaluate if the rule is valid or not. We should keep looking at the extensive HA setting to see if we should mirror HAs exception.

Copy link
Contributor

@steinmn steinmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running ruff format . also adds updates for number.py and update.py, please include those as well.

Otherwise LGTM

@sveinse
Copy link
Collaborator Author

sveinse commented Jul 27, 2025

This PR changes the number of characters per line, which in turn changes the behavior of the formatter. For the sake of the other PRs, this should be implemented ASAP.

@sveinse sveinse merged commit 921cbdc into custom-components:master Jul 27, 2025
1 of 3 checks passed
@sveinse sveinse deleted the feature-linting-fixes branch July 27, 2025 13:30
@sveinse sveinse added this to the v0.8 milestone Jul 27, 2025
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 this pull request may close these issues.

2 participants