Skip to content

Commit 229145a

Browse files
bakerkjclaude
andcommitted
ci: add HACS token and move ruff to py314 (inferred)
- Pass github_token to the HACS validation action so the daily scheduled run makes authenticated GitHub API calls, avoiding the 60/hr unauthenticated rate limit. - Drop the explicit [tool.ruff] target-version; ruff derives the target from requires-python (>=3.14.2 -> py314), so it cannot drift out of sync. ruff-format applies PEP 758 (parens-free multi-except) in __init__.py and const.py. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 84fd1b5 commit 229145a

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/hacs-validation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ jobs:
1515
- uses: hacs/action@22.5.0
1616
with:
1717
category: integration
18+
github_token: ${{ secrets.GITHUB_TOKEN }}

custom_components/cpu_capacity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _entry_float(entry: ConfigEntry, key: str, default: float) -> float:
3434
value = entry.options.get(key, entry.data.get(key, default))
3535
try:
3636
return float(value)
37-
except (TypeError, ValueError):
37+
except TypeError, ValueError:
3838
return float(default)
3939

4040

custom_components/cpu_capacity/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def resolve_publish_interval(window: str, source: Mapping[str, Any]) -> float:
5656
)
5757
try:
5858
return float(raw)
59-
except (TypeError, ValueError):
59+
except TypeError, ValueError:
6060
return float(DEFAULT_PUBLISH_INTERVAL_SECONDS)
6161

6262

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@ mypy_path = ["custom_components"]
1919
[tool.pytest.ini_options]
2020
asyncio_mode = "auto"
2121

22-
[tool.ruff]
23-
target-version = "py313"
24-
2522
[tool.uv]
2623
package = false

0 commit comments

Comments
 (0)