Skip to content

Readd ruff check for scripts, but allow print and missing docstring#316

Merged
sveinse merged 2 commits intocustom-components:masterfrom
steinmn:relaxed-ruff-for-scripts
Aug 31, 2025
Merged

Readd ruff check for scripts, but allow print and missing docstring#316
sveinse merged 2 commits intocustom-components:masterfrom
steinmn:relaxed-ruff-for-scripts

Conversation

@steinmn
Copy link
Contributor

@steinmn steinmn commented Aug 31, 2025

No description provided.

.ruff.toml Outdated
Comment on lines 11 to 14
"scripts/*" = [
"D103", # Don't complain over missing docstrings in scripts
"T201", # Allow for scripts to write to stdout
]
Copy link
Collaborator

@sveinse sveinse Aug 31, 2025

Choose a reason for hiding this comment

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

I regret placing the [lint.per-file-ignores] above the general [lint] section. Would you be so kind to move this entire section to below ´[lint]` please? I think it's best to have the main rules first in the files.

Copy link
Contributor Author

@steinmn steinmn Aug 31, 2025

Choose a reason for hiding this comment

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

I ended up reordering the sections to match the order in https://github.com/home-assistant/core/blob/dev/pyproject.toml.

I also added the pydocstyle section from HA-pyproject, which apparently disables the D401 First line of docstring should be in imperative mood-ruff-error (which I think we have discussed ignoring before at some point)

Also adds the pydocstyle and pytest-style-mark-parentheses = false (both from HA)
Copy link
Collaborator

@sveinse sveinse left a comment

Choose a reason for hiding this comment

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

I think this looks good. Are we ready to merge?

@sveinse sveinse added this to the v0.8.3 milestone Aug 31, 2025
@steinmn
Copy link
Contributor Author

steinmn commented Aug 31, 2025

Yep 👍

@sveinse sveinse merged commit 0a99a5d into custom-components:master Aug 31, 2025
6 checks passed
@steinmn steinmn deleted the relaxed-ruff-for-scripts branch September 1, 2025 08:53
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