Skip to content

Commit 171cd12

Browse files
authored
Prek (#149)
Change to prek and pymarkdownlnt & update hooks
1 parent 093d7b7 commit 171cd12

6 files changed

Lines changed: 23 additions & 21 deletions

File tree

.github/workflows/verify.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Latest commit
33
env:
44
CACHE_VERSION: 1
55
DEFAULT_PYTHON: "3.14"
6-
PRE_COMMIT_HOME: ~/.cache/pre-commit
6+
PREK_HOME: ~/.cache/prek
77
VENV: venv
88

99
on:
@@ -75,13 +75,12 @@ jobs:
7575
pip install uv
7676
uv venv --seed venv
7777
. venv/bin/activate
78-
uv pip install pre-commit -r requirements.txt -r requirements-test.txt
79-
pre-commit install
80-
pre-commit install-hooks
81-
- name: Full pre-commit
78+
uv pip install prek -r requirements.txt -r requirements-test.txt
79+
prek install
80+
- name: Full prek (pre-commit)
8281
run: |
8382
. venv/bin/activate
84-
SKIP=no-commit-to-branch pre-commit run --show-diff-on-failure --color=always --all-files
83+
SKIP=no-commit-to-branch prek run --show-diff-on-failure --color=always --all-files
8584
8685
pytest:
8786
runs-on: ubuntu-latest

.markdownlint.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ repos:
4141
exclude_types: [csv, json]
4242
exclude: ^userdata/|^fixtures/
4343
- repo: https://github.com/PyCQA/bandit
44-
rev: 1.8.6
44+
rev: 1.9.2
4545
hooks:
4646
- id: bandit
4747
name: "Bandit checking"
@@ -56,14 +56,14 @@ repos:
5656
- id: yamllint
5757
name: "YAML linting"
5858
- repo: https://github.com/shellcheck-py/shellcheck-py
59-
rev: v0.10.0.1
59+
rev: v0.11.0.1
6060
hooks:
6161
- id: shellcheck
6262
name: "Shell checking"
6363
args:
6464
- --external-sources
6565
- repo: https://github.com/cdce8p/python-typing-update
66-
rev: v0.7.3
66+
rev: v0.8.1
6767
hooks:
6868
# Run `python-typing-update` hook manually from time to time
6969
# to update python typing syntax.
@@ -76,10 +76,11 @@ repos:
7676
- --force
7777
- --keep-updates
7878
files: ^(airos|tests|script)/.+\.py$
79-
- repo: https://github.com/igorshubovych/markdownlint-cli
80-
rev: v0.45.0
79+
- repo: https://github.com/jackdewinter/pymarkdown
80+
rev: v0.9.34
8181
hooks:
82-
- id: markdownlint
82+
- id: pymarkdown
83+
name: MarkDown Lint
8384
- repo: local
8485
hooks:
8586
- id: parsetest
@@ -91,20 +92,20 @@ repos:
9192
files: ^(airos|tests|script)/.+\.py$|^fixtures/userdata/.+\.json$
9293
pass_filenames: false
9394
- id: pytest
94-
name: "pytest"
95+
name: "Testing using pytest"
9596
entry: script/run-in-env.sh pytest --log-level info tests/ --cov='airos/'
9697
language: script
9798
types: [python]
9899
pass_filenames: false
99100
files: ^(airos|tests|script)/.+\.py$
100101
- id: pylint
101-
name: "pylinting"
102+
name: "Linting with pylint"
102103
entry: script/run-in-env.sh pylint -j 0
103104
language: script
104105
types: [python]
105106
files: ^(airos|tests|script)/.+\.py$
106107
- id: mypy
107-
name: mypy
108+
name: "Typing check using mypy"
108109
entry: script/run-in-env.sh mypy
109110
language: script
110111
require_serial: true

.pymarkdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "plugins": { "md013": { "enabled": false }, "md024": { "enabled": false }, "md033": { "enabled": false }, "md041": { "enabled": false } } }

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.6.2] - 2026-01-12
6+
7+
### Changed
8+
9+
- Migrated pre-commit to prek
10+
511
## [0.6.1] - 2026-01-03
612

713
### Added

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "airos"
7-
version = "0.6.1"
7+
version = "0.6.2"
88
license = "MIT"
99
description = "Ubiquiti airOS module(s) for Python 3."
1010
readme = "README.md"

0 commit comments

Comments
 (0)