Skip to content

Commit 14ca976

Browse files
committed
Fix linting errors
Also tweaked the makefile rules so that `make test` will always lint first. I usually test before pushing but forget to lint, so this should keep me honest
1 parent 1c3d3a6 commit 14ca976

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
python -m pip install -r requirements-dev.txt
4040
- name: Lint with flake8
4141
run: |
42-
flake8 screen_brightness_control --max-line-length=119 --ignore=W503
42+
make lint
4343
- name: Run tests
4444
run: |
45-
python tests/testall.py --synthetic
45+
make test

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
SHELL=/bin/bash
22

3-
.PHONY: test
4-
test:
3+
.PHONY: lint
4+
lint:
5+
python -m flake8 screen_brightness_control --max-line-length 119 --ignore W503
6+
7+
.PHONY: testquick
8+
testquick:
59
python tests/testall.py --synthetic
610

11+
.PHONY: test
12+
test: lint
13+
make testquick
14+
715
.PHONY: testall
816
testall:
917
python tests/testall.py

screen_brightness_control/helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from __future__ import annotations
55

66
import logging
7-
import platform
87
import struct
98
import subprocess
109
import time

0 commit comments

Comments
 (0)