File tree Expand file tree Collapse file tree 4 files changed +39
-8
lines changed Expand file tree Collapse file tree 4 files changed +39
-8
lines changed Original file line number Diff line number Diff line change 10
10
branches : [master]
11
11
12
12
jobs :
13
- build :
13
+ lint :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ - name : Set up Python 3.13
18
+ uses : actions/setup-python@v5
19
+ with :
20
+ python-version : 3.13
21
+ cache : " pip" # caching pip dependencies
22
+ - uses : pre-commit/action@v3.0.1
23
+
24
+ test :
14
25
runs-on : ubuntu-latest
15
26
strategy :
16
27
fail-fast : false
27
38
- name : Install dependencies
28
39
run : |
29
40
python -m pip install --upgrade pip
30
- python -m pip install flake8 pytest .[test] -r requirements.txt -r requirements_test.txt
31
- - uses : pre-commit/action@v3.0.1
32
- - name : mypy
33
- run : |
34
- mypy flux_led
41
+ python -m pip install pytest .[test] -r requirements.txt -r requirements_test.txt
35
42
- name : Test with pytest
36
43
run : |
37
44
pytest --cov=flux_led --cov-report term-missing --cov-report xml -- tests
Original file line number Diff line number Diff line change @@ -57,3 +57,25 @@ repos:
57
57
# rev: v2.3.0
58
58
# hooks:
59
59
# - id: codespell
60
+ - repo : https://github.com/pre-commit/mirrors-mypy.git
61
+ rev : v1.15.0
62
+ hooks :
63
+ - id : mypy
64
+ alias : mypy-py313
65
+ name : MyPy, for Python 3.13
66
+ additional_dependencies :
67
+ - pytest
68
+ - webcolors
69
+ args :
70
+ - --python-version=3.13
71
+ files : ^(flux_led)/.+\.py$
72
+ - id : mypy
73
+ alias : mypy-py39
74
+ name : MyPy, for Python 3.9
75
+ additional_dependencies :
76
+ - async_timeout
77
+ - pytest
78
+ - webcolors
79
+ args :
80
+ - --python-version=3.9
81
+ files : ^(flux_led)/.+\.py$
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
3
- """Example to cycle a bulb between colors in a list, with a smooth fade between.
3
+ """
4
+ Example to cycle a bulb between colors in a list, with a smooth fade between.
4
5
5
6
Assumes the bulb is already on.
6
7
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
3
- """This is an example script that can be used to set on and off timers based on the sunrise/sunset times.
3
+ """
4
+ This is an example script that can be used to set on and off timers based on the sunrise/sunset times.
4
5
5
6
Specifically, it will set times on an outside porch light
6
7
to turn on at dusk and off at dawn. It will set the timers for
You can’t perform that action at this time.
0 commit comments