Skip to content

Commit a2a39de

Browse files
authored
Merge pull request #774 from tempus2016/chore/ruff-format
style: apply ruff format and enforce it in CI
2 parents c8b0899 + ddaf252 commit a2a39de

180 files changed

Lines changed: 5341 additions & 3595 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.git-blame-ignore-revs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Commits that only reformat code. Ignore them in blame:
2+
#
3+
# git config blame.ignoreRevsFile .git-blame-ignore-revs
4+
#
5+
# GitHub's blame view applies this file automatically.
6+
7+
# style: apply ruff format across the codebase
8+
6af294d26500d4ecd328477e4143ac523c31ac05

‎.github/CONTRIBUTING.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ bind-mounted:
6565
Run these locally before pushing:
6666

6767
```bash
68-
# Lint (matches the "Ruff" CI check)
68+
# Lint and formatting (both match the "Ruff" CI check)
6969
ruff check custom_components/taskmate tests scripts
70+
ruff format --check custom_components/taskmate tests scripts # drop --check to fix
7071

7172
# Cards and panel (matches the "ESLint" CI check)
7273
npm ci && npm run lint

‎.github/workflows/lint.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
- name: Run ruff
4040
run: ruff check custom_components/taskmate tests scripts
4141

42+
- name: Check formatting
43+
run: ruff format --check custom_components/taskmate tests scripts
44+
4245
eslint:
4346
name: ESLint (cards + panel)
4447
runs-on: ubuntu-latest

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ repos:
4040
hooks:
4141
- id: ruff
4242
args: [--fix]
43+
- id: ruff-format
4344

4445
- repo: local
4546
hooks:

0 commit comments

Comments
 (0)