Skip to content

Commit

Permalink
Lint with ruff instead of flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Crozzers committed Jan 19, 2025
1 parent 274be52 commit ed30a24
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install .[dev]
- name: Lint with flake8
- name: Lint
run: |
make lint
- name: Run tests
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ SHELL=/bin/bash

.PHONY: lint
lint:
python -m flake8 screen_brightness_control --max-line-length 119 --ignore W503
python -m ruff check screen_brightness_control

.PHONY: format
format:
python -m ruff check --select I --fix screen_brightness_control
python -m ruff format screen_brightness_control
python -m string_fixer -c . -t screen_brightness_control

.PHONY: testquick
testquick:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ dist = [
]
dev = [
"mypy",
"flake8",
"types-pywin32 ; platform_system=='Windows'",
"pytest",
"pytest-mock",
Expand Down
4 changes: 2 additions & 2 deletions screen_brightness_control/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from functools import lru_cache
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

from .exceptions import (
from .exceptions import ( # noqa:F401
EDIDParseError,
MaxRetriesExceededError, # noqa:F401
MaxRetriesExceededError,
ScreenBrightnessError,
format_exc,
)
Expand Down

0 comments on commit ed30a24

Please sign in to comment.