Skip to content

Commit ed30a24

Browse files
committed
Lint with ruff instead of flake8
1 parent 274be52 commit ed30a24

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install dependencies
3838
run: |
3939
python -m pip install .[dev]
40-
- name: Lint with flake8
40+
- name: Lint
4141
run: |
4242
make lint
4343
- name: Run tests

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ SHELL=/bin/bash
22

33
.PHONY: lint
44
lint:
5-
python -m flake8 screen_brightness_control --max-line-length 119 --ignore W503
5+
python -m ruff check screen_brightness_control
6+
7+
.PHONY: format
8+
format:
9+
python -m ruff check --select I --fix screen_brightness_control
10+
python -m ruff format screen_brightness_control
11+
python -m string_fixer -c . -t screen_brightness_control
612

713
.PHONY: testquick
814
testquick:

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ dist = [
3636
]
3737
dev = [
3838
"mypy",
39-
"flake8",
4039
"types-pywin32 ; platform_system=='Windows'",
4140
"pytest",
4241
"pytest-mock",

screen_brightness_control/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
from functools import lru_cache
1313
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
1414

15-
from .exceptions import (
15+
from .exceptions import ( # noqa:F401
1616
EDIDParseError,
17-
MaxRetriesExceededError, # noqa:F401
17+
MaxRetriesExceededError,
1818
ScreenBrightnessError,
1919
format_exc,
2020
)

0 commit comments

Comments
 (0)