File tree Expand file tree Collapse file tree 5 files changed +39
-3
lines changed
custom_components/loe_outages Expand file tree Collapse file tree 5 files changed +39
-3
lines changed Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : https://github.com/pre-commit/pre-commit-hooks
3
+ rev : v4.6.0
4
+ hooks :
5
+ - id : check-added-large-files
6
+ - id : check-ast
7
+ - id : check-builtin-literals
8
+ - id : check-case-conflict
9
+ - id : check-docstring-first
10
+ - id : check-executables-have-shebangs
11
+ - id : check-json
12
+ - id : check-shebang-scripts-are-executable
13
+ - id : check-symlinks
14
+ - id : check-toml
15
+ - id : check-yaml
16
+ - id : debug-statements
17
+ - id : destroyed-symlinks
18
+ - id : end-of-file-fixer
19
+ - id : mixed-line-ending
20
+ - id : requirements-txt-fixer
21
+ - id : trailing-whitespace
22
+
23
+ - repo : https://github.com/astral-sh/ruff-pre-commit
24
+ rev : v0.4.10
25
+ hooks :
26
+ - id : ruff
27
+ args : [--fix]
28
+ - id : ruff-format
29
+
30
+ - repo : https://github.com/pre-commit/mirrors-prettier
31
+ rev : " v3.1.0"
32
+ hooks :
33
+ - id : prettier
Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ def event(self) -> CalendarEvent | None:
53
53
now = dt_utils .now ()
54
54
LOGGER .debug ("Getting current event for %s" , now )
55
55
interval = self .coordinator .get_event_at (now )
56
+ if not interval :
57
+ return None
58
+
56
59
return CalendarEvent (
57
60
summary = interval .state ,
58
61
start = interval .startTime ,
Original file line number Diff line number Diff line change 1
1
homeassistant == 2024.7.0
2
2
pip >= 21.0 ,< 24.2
3
3
pre-commit >= 3.7.1
4
- ruff == 0.5.0
4
+ ruff == 0.5.0
Original file line number Diff line number Diff line change 17
17
export PYTHONPATH=" ${PYTHONPATH} :${PWD} /custom_components"
18
18
19
19
# Start Home Assistant
20
- hass --config " ${PWD} /config" --debug
20
+ hass --config " ${PWD} /config" --debug
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ cd "$(dirname "$0")/.."
6
6
7
7
python3 -m pip install --requirement requirements.txt
8
8
9
- # pre-commit install
9
+ pre-commit install
You can’t perform that action at this time.
0 commit comments