Skip to content

Commit eadd977

Browse files
authored
refactor: reorganize components, improve online status, and enforce linting (tolwi#656)
* reset some sensors when goes offline * simplify online/offline status detection * fixed all linter issues * add GitHub Actions linting workflow * actualize docs
1 parent 55fc6b9 commit eadd977

87 files changed

Lines changed: 4076 additions & 3990 deletions

Some content is hidden

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

.github/workflows/lint.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.13"
20+
cache: "pip"
21+
22+
- name: Install dependencies
23+
run: |
24+
pip install ruff mypy
25+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26+
27+
- name: Lint with ruff
28+
run: ruff check custom_components
29+
30+
- name: Type check with mypy
31+
run: mypy custom_components

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ venv
66
.vscode/settings.json
77
.coverage
88
requirements.test.txt
9-
requirements.txt
109
setup.cfg
1110
tests

0 commit comments

Comments
 (0)