Skip to content

Migrate linting to prek, bump Python to 3.14#406

Merged
Snuffy2 merged 1 commit intocustom-components:masterfrom
Snuffy2:Change-from-pre-commit-to-prek
Apr 2, 2026
Merged

Migrate linting to prek, bump Python to 3.14#406
Snuffy2 merged 1 commit intocustom-components:masterfrom
Snuffy2:Change-from-pre-commit-to-prek

Conversation

@Snuffy2
Copy link
Copy Markdown
Collaborator

@Snuffy2 Snuffy2 commented Apr 2, 2026

Migrate CI and local tooling from pre-commit to prek and update project tooling for Python 3.14. Changes include:

  • CI: simplified .github/workflows/linters.yml to checkout and run the prek action (removed detailed setup/cache/install steps).
  • Local tooling docs: AGENTS.md updated to instruct use of prek and prek run -a.
  • Pre-commit config: .pre-commit-config.yaml updated with additional shellcheck dependency, added a mypy hook and extra dependencies, removed pre-commit.ci config blocks.
  • pyproject.toml: requires-python set to >=3.14, lint tooling updated to use prek, mypy/ruff configuration adjusted (python_version, target-version, required-version, pydocstyle convention and property-decorators).
  • Code/tests: small refactors in tests to replace inline lambdas with named helper functions for is_attr_blank/set_attr; several exception handling lines edited in helpers.py, sensor.py and tests (exception clause formatting changed).

These changes modernize the lint/test workflow and align tooling with Python 3.14 and the chosen prek-based tooling.

Migrate CI and local tooling from pre-commit to prek and update project tooling for Python 3.14. Changes include:

- CI: simplified .github/workflows/linters.yml to checkout and run the prek action (removed detailed setup/cache/install steps).
- Local tooling docs: AGENTS.md updated to instruct use of prek and prek run -a.
- Pre-commit config: .pre-commit-config.yaml updated with additional shellcheck dependency, added a mypy hook and extra dependencies, removed pre-commit.ci config blocks.
- pyproject.toml: requires-python set to >=3.14, lint tooling updated to use prek, mypy/ruff configuration adjusted (python_version, target-version, required-version, pydocstyle convention and property-decorators).
- Code/tests: small refactors in tests to replace inline lambdas with named helper functions for is_attr_blank/set_attr; several exception handling lines edited in helpers.py, sensor.py and tests (exception clause formatting changed).

These changes modernize the lint/test workflow and align tooling with Python 3.14 and the chosen prek-based tooling.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  custom_components/places
  helpers.py
  sensor.py
Project Total  

This report was generated by python-coverage-comment-action

@Snuffy2 Snuffy2 merged commit 25c5d31 into custom-components:master Apr 2, 2026
6 of 7 checks passed
@Snuffy2 Snuffy2 deleted the Change-from-pre-commit-to-prek branch April 2, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant