Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2
Re-instate tooling and align with Core/Python-plugwise approach#263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a31bab5
Reinstate ruff, align with python-plugwise, skip pre-commit CI
CoMPaTech a554655
Configure in pre-commit configuration
CoMPaTech 856c279
Re-do python-plugwise scripts
CoMPaTech 6051507
Update from python-plugwise script
CoMPaTech 94690c7
Reinstate ruff and align with python-plugwise
CoMPaTech 2de6906
Reinstate ruff and align with python-plugwise
CoMPaTech cc01fc5
Batch-commit including scripts and workflows
CoMPaTech 9f7f3e7
Add fine-grained token for USB (valid 366 days)
CoMPaTech 181ef6d
Redundant, not used for usb
CoMPaTech 28c9d70
Add suggestion
CoMPaTech 4420510
Add more ruff ignores
CoMPaTech afa96a6
Typo ruff ignores
CoMPaTech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,49 @@ | ||
| # For pre-commit.ci | ||
| ci: | ||
| # Defer autoupdate to quarterly (there is no 'off' button) to have renovate pick up first | ||
| autoupdate_schedule: quarterly | ||
| skip: [pylint, markdownlint, testing] | ||
| submodules: true | ||
| default_language_version: | ||
| # force all unspecified python hooks to run python3 | ||
| python: python3.13 | ||
| repos: | ||
| # Run manually in CI skipping the branch checks | ||
| # RUFF disabled, code is not up to par with HA standards | ||
| # - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| # rev: v0.1.7 | ||
| # hooks: | ||
| # - id: ruff | ||
| # args: | ||
| # - --fix | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.11.13 | ||
| hooks: | ||
| - id: ruff | ||
| name: "Ruff check" | ||
| args: | ||
| - --fix | ||
| - id: ruff-format | ||
| name: "Ruff format" | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| hooks: | ||
| - id: check-executables-have-shebangs | ||
| name: "Checking executables" | ||
| stages: [manual] | ||
| - id: no-commit-to-branch | ||
| name: "Verifying branch" | ||
| args: | ||
| - --branch=main | ||
| - repo: https://github.com/asottile/pyupgrade | ||
| rev: v3.20.0 | ||
| hooks: | ||
| - id: pyupgrade | ||
| name: "Checking pyupgrade" | ||
| args: [--py39-plus] | ||
| # Moved codespell configuration to setup.cfg as per 'all-files' issues not reading args | ||
| - repo: https://github.com/codespell-project/codespell | ||
| rev: v2.4.1 | ||
| hooks: | ||
| - id: codespell | ||
| name: "Check Code Spelling" | ||
| args: | ||
| - --ignore-words-list=aiport,astroid,checkin,currenty,hass,iif,incomfort,lookin,nam,NotIn # Previous list, remove before merge # - ignore-words-list = additionals,alle,alot,ba,bre,bund,currenty,datas,dof,dur,ether,farenheit,falsy,fo,haa,hass,hist,iam,iff,iif,incomfort,ines,ist,leeg,lightsensor,mut,nam,nd,pres,pullrequests,referer,resset,rime,ser,serie,sur,te,technik,ue,uint,unsecure,visability,wan,wanna,withing,zar | ||
| - --skip="./.*,*.csv,*.json,*.ambr" | ||
| - --quiet-level=2 | ||
| exclude_types: [csv, json] | ||
| - repo: https://github.com/PyCQA/bandit | ||
| rev: 1.8.5 | ||
| hooks: | ||
| - id: bandit | ||
| name: "Bandit checking" | ||
| args: | ||
| - --quiet | ||
| - --format=custom | ||
| @@ -51,57 +53,73 @@ repos: | ||
| rev: v1.37.1 | ||
| hooks: | ||
| - id: yamllint | ||
| name: "YAML linting" | ||
| - repo: https://github.com/biomejs/pre-commit | ||
| rev: v1.9.4 | ||
| hooks: | ||
| - id: biome-lint | ||
| additional_dependencies: ["@biomejs/biome@1.8.3"] | ||
| name: "Verifying/updating code with biome (improved prettier)" | ||
| additional_dependencies: ["@biomejs/biome@1.8.3"] | ||
| - repo: https://github.com/cdce8p/python-typing-update | ||
| rev: v0.7.2 | ||
| hooks: | ||
| # Run `python-typing-update` hook manually from time to time | ||
| # to update python typing syntax. | ||
| # Will require manual work, before submitting changes! | ||
| - id: python-typing-update | ||
| name: "Python typing" | ||
| stages: [manual] | ||
| args: | ||
| - --py39-plus | ||
| - --force | ||
| - --keep-updates | ||
| files: ^(plugwise_usb|tests)/.+\.py$ | ||
| - repo: https://github.com/shellcheck-py/shellcheck-py | ||
| rev: v0.10.0.1 | ||
| hooks: | ||
| - id: shellcheck | ||
| name: "Shell checking" | ||
| args: | ||
| - --external-sources | ||
| - repo: local | ||
| hooks: | ||
| # Run mypy through our wrapper script in order to get the possible | ||
| # pyenv and/or virtualenv activated; it may not have been e.g. if | ||
| # committing from a GUI tool that was not launched from an activated | ||
| # shell. | ||
| - id: userdata | ||
| name: userdata | ||
| entry: scripts/pre-commit.sh | ||
| - id: setup | ||
| name: "Setup" | ||
| entry: /usr/bin/env bash -c 'test -d ./venv || scripts/setup.sh' | ||
| language: script | ||
| - id: setup_test | ||
| name: "Setup (extended for testing" | ||
| entry: /usr/bin/env bash -c 'test -f ./tmp/biome || scripts/setup_test.sh pre-commit' | ||
| language: script | ||
| types: [python] | ||
| pass_filenames: false | ||
| - id: mypy | ||
| name: mypy | ||
| name: "Running MyPy" | ||
| entry: scripts/run-in-env.sh mypy | ||
| language: script | ||
| types: [python] | ||
| require_serial: true | ||
| files: ^plugwise_usb/$ | ||
CoMPaTech marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| - id: pylint | ||
| name: pylint | ||
| name: "PyLinting" | ||
| entry: scripts/run-in-env.sh pylint -j 0 | ||
| language: script | ||
| types: [python] | ||
| files: ^plugwise_usb/.+\.py$ | ||
| - id: testing | ||
| name: "Local Testing - Performing Tests" | ||
| name: "Performing Tests" | ||
| # yamllint disable-line rule:line-length | ||
| entry: /usr/bin/env bash -c 'exec env GITHUB_ACTIONS="1" scripts/tests_and_coverage.sh test_and_coverage' | ||
| entry: /usr/bin/env bash -c 'exec env GITHUB_ACTIONS="1" NO_FIXTURES="1" scripts/tests_and_coverage.sh test_and_coverage' | ||
| language: script | ||
| pass_filenames: false | ||
| - id: biome | ||
| name: "Biome (prettier)" | ||
| entry: ./tmp/biome check plugwise_usb/ tests/ --files-ignore-unknown=true --no-errors-on-unmatched --json-formatter-indent-width=2 --json-formatter-indent-style=space | ||
| language: script | ||
| - repo: https://github.com/igorshubovych/markdownlint-cli | ||
| rev: v0.45.0 | ||
| hooks: | ||
| - id: markdownlint | ||
| name: "Markdown linting" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.