Skip to content

Disable ruff errors that HA core is also ignoring#298

Merged
sveinse merged 2 commits intocustom-components:masterfrom
steinmn:ruff-lint-3
Aug 22, 2025
Merged

Disable ruff errors that HA core is also ignoring#298
sveinse merged 2 commits intocustom-components:masterfrom
steinmn:ruff-lint-3

Conversation

@steinmn
Copy link
Contributor

@steinmn steinmn commented Aug 22, 2025

@sveinse
Copy link
Collaborator

sveinse commented Aug 22, 2025

LGTM

@sveinse sveinse merged commit 232b182 into custom-components:master Aug 22, 2025
4 checks passed
@steinmn steinmn deleted the ruff-lint-3 branch August 22, 2025 17:28
Comment on lines +32 to +36
# definitely skipped in HA, not obvious how
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
Copy link
Collaborator

Choose a reason for hiding this comment

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

HA is not only doing exclusion of rules, but also inclusion (selection). This means that there might be rules that aren't selected https://github.com/sveinse/ha-core/blob/facf217b995982ff5c504bd59d419a59c31ee068/pyproject.toml#L645

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It also looks like there's some separate rules for pylint as well. Not sure how everything is set up on the HA side, but I'm thinking we focus on fixing/excluding the errors we currently have until we can turn off --exit-zero, and then we can start considering adding more rules.

@sveinse sveinse added this to the v0.8.3 milestone Aug 23, 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